Skip to main content
GUIDE · SHOPIFY FLOW8 min read

Trigger Shopify Flow from TrackLayer events

A practical guide to sending TrackLayer server-side events into Shopify Flow so customer value updates, abandoned checkouts, high-value orders, loyalty rewards, and inventory signals can trigger real merchant actions from backend truth.

Context

What Shopify Flow is

Shopify Flow is Shopify's automation layer for merchants who need more than static store settings. It lets a store react to business events with conditions and actions across customers, orders, products, tags, notifications, and connected apps. In practice, Flow is where operators encode the "if this happens, do that" logic that would otherwise live in spreadsheets, inbox habits, or custom scripts. It is less about analytics and more about turning store activity into operational behavior.

That makes Flow a strong destination for TrackLayer events. TrackLayer already collects and normalizes server-side signals that are harder to trust in the browser alone. When those signals are pushed into Shopify Flow, the merchant gets a control plane for tagging customers, alerting teams, granting rewards, and kicking off downstream processes without forcing application engineers to embed every store rule directly into backend code.

Examples

Use cases

01

Tag VIP customers from TrackLayer LTV events so merchandising, support, and retention automations can branch on high-value customer status without waiting for a manual segment refresh.

02

Auto-tag cart-abandoners when TrackLayer sees a checkout start without a purchase completion event inside the expected window, making recovery and suppression logic easier to manage in Shopify.

03

Send a Slack alert on high-value purchase events so the team can review large orders, flag potential fraud, or trigger white-glove fulfillment for premium customers.

04

Issue gift-card loyalty rewards when repeat purchase or spend-threshold events arrive from TrackLayer, allowing Shopify Flow to operationalize retention offers after server-side confirmation.

05

Create inventory reorder triggers when TrackLayer reports low-stock purchase velocity or high-demand SKU events, letting Flow notify operations before the storefront surfaces stock problems.

Build

Setup

Step 1

Create the Shopify Flow HTTP trigger

Start in Shopify Flow with a workflow that begins from an incoming webhook or HTTP request trigger. The important design choice is to make Flow wait for TrackLayer as the source of truth, rather than deriving automation from frontend heuristics. Name the workflow after the business outcome, not the transport, so future maintainers can see whether it handles VIP tagging, fraud review, reorder alerts, or loyalty rewards.

Shopify Flow
Trigger: Receive HTTP request
Workflow name: TrackLayer → VIP and Ops automation
Accepted content type: application/json
Expected top-level fields:
  event
  occurred_at
  customer
  order
  properties
Step 2

Post TrackLayer events to the Flow endpoint

Configure TrackLayer to forward selected server-side events to the Shopify Flow URL. Keep the payload normalized and destination-friendly. Flow should not need to reconstruct business meaning from raw analytics fragments. Include identifiers, event time, customer context, order context, and a properties object for custom fields that may change over time.

POST https://shopify.com/flow/webhooks/tracklayer-example
Content-Type: application/json

{
  "event": "customer_ltv_reached",
  "occurred_at": "2026-04-23T10:14:00Z",
  "customer": {
    "id": "gid://shopify/Customer/987654321",
    "email": "ava@example.com",
    "tags": ["newsletter", "repeat-buyer"]
  },
  "order": {
    "id": "gid://shopify/Order/123456789",
    "name": "#10492",
    "total_price": 449.00,
    "currency": "USD"
  },
  "properties": {
    "ltv": 1820.40,
    "vip_threshold": 1500,
    "source": "tracklayer"
  }
}
Step 3

Filter on the event name first

Inside Flow, branch immediately on event so one endpoint can safely receive multiple TrackLayer signals. This keeps the integration small while still letting you add new automations later. The first conditional split should classify the event before any expensive or merchant-visible action runs. Use exact event names and version them deliberately if the schema changes.

Condition
If {{trigger.event}} equals "customer_ltv_reached"
  → continue to VIP actions
Else if {{trigger.event}} equals "checkout_abandoned"
  → continue to cart recovery actions
Else if {{trigger.event}} equals "high_value_purchase"
  → continue to Slack review actions
Else
  → stop workflow
Step 4

Filter on business properties second

Once the event family is identified, use Flow conditions on stable properties such as LTV, order total, SKU, tag presence, or inactivity windows. Avoid embedding these rules in TrackLayer unless the logic is truly shared across destinations. Shopify Flow is usually the better place for merchant-owned thresholds because operators can change them without rewriting event collection code.

Condition
If {{trigger.properties.ltv}} >= {{trigger.properties.vip_threshold}}
  → Add customer tag "VIP"

If {{trigger.order.total_price}} >= 300
  → Send Slack message "High-value order needs review"

If {{trigger.properties.cart_age_minutes}} >= 60
  → Add customer tag "cart-abandoner"
Step 5

Run the action layer

After conditions pass, execute the smallest set of actions needed for the workflow outcome. Common patterns include adding tags, sending internal notifications, issuing a gift card, or creating an operational task. Keep TrackLayer responsible for event delivery and canonical naming, then let Shopify Flow express the merchant-specific actions that change most often.

Actions
1. Add customer tags: "VIP", "cart-abandoner", "reward-eligible"
2. Send Slack message to #ops-high-value-orders
3. Create gift card for customer
4. Send internal email to inventory@store.example
5. End workflow
Schema

Event mapping

The goal is to keep TrackLayer canonical and Shopify Flow action-oriented. TrackLayer event names should describe the business signal once, while Flow branches convert that signal into store-specific automations. The mapping below shows a practical pattern where one HTTP entry point receives a normalized payload and each event type fans out into a different operational path.

TrackLayer eventFlow triggerFlow action examples
customer_ltv_reachedReceive HTTP request → event = customer_ltv_reachedAdd VIP tag, notify account team, route customer into premium support workflow
checkout_abandonedReceive HTTP request → event = checkout_abandonedAdd cart-abandoner tag, create follow-up task, suppress duplicate recovery actions
high_value_purchaseReceive HTTP request → event = high_value_purchaseSend Slack alert, tag for fraud review, notify fulfillment lead
loyalty_reward_earnedReceive HTTP request → event = loyalty_reward_earnedCreate gift card, tag reward-eligible customer, email support with reward metadata
inventory_velocity_spikeReceive HTTP request → event = inventory_velocity_spikeNotify inventory team, tag product or order for review, open reorder workflow
Beta

Shopify Functions integration (beta)

Shopify Functions pushes automation closer to the storefront and checkout runtime, which opens a useful beta pattern alongside Shopify Flow. Flow remains strong at orchestration and merchant actions, while Functions can apply server-side personalization inside the purchase path itself. If TrackLayer produces durable audience signals such as VIP, churn-risk, wholesale intent, or product affinity, those signals can inform function-driven behavior where discount logic or checkout customization needs to happen deterministically on the server.

The practical opportunity is audience-driven discounts. TrackLayer can compute or forward audience membership from backend events, Shopify Flow can manage tags or state transitions, and Shopify Functions can use that resulting state to apply discount or merchandising logic at checkout. It is still beta territory because the exact implementation depends on the merchant's Function surface and data model, but the architecture is clear: TrackLayer decides who the customer is becoming, Flow coordinates the store response, and Functions personalizes the transaction in real time.

Diagnostics

Troubleshooting

The workflow never runs

Confirm TrackLayer is posting to the exact Shopify Flow webhook URL, the request is valid JSON, and the workflow trigger is enabled. Then inspect whether the event name in Flow matches the event string sent by TrackLayer exactly.

The workflow runs, but no actions fire

A condition is likely too strict or reading the wrong property path. Log the full payload in a test workflow, inspect the actual structure, and update Flow conditions to reference the fields that TrackLayer is truly sending.

Customers get tagged twice

Deduplicate at the event level in TrackLayer and keep idempotent logic in Flow. If retries are possible, include a stable event identifier and avoid designing workflows where the same event path can reapply a visible action without a guard.

Slack or gift card actions feel delayed

The lag is usually upstream queueing or retry behavior, not Flow itself. Check TrackLayer delivery timing, confirm the webhook endpoint is responding quickly, and separate critical alerts from lower-priority automation if needed.

FAQ

Common questions

Should Shopify Flow listen to every TrackLayer event?

No. Send only the events that have a clear operational or merchandising consequence inside Shopify. Analytics-heavy events can stay in analytics destinations, while Flow should focus on events that actually trigger action.

Can one Shopify Flow endpoint handle multiple event types?

Yes. That is usually the cleanest design. Use one normalized endpoint, branch on event first, then branch on properties. It reduces integration sprawl while preserving clear business logic inside each workflow.

Where should thresholds such as VIP LTV or high-value order amount live?

If the threshold is merchant-controlled and mostly affects Shopify operations, put it in Flow conditions. If it must remain consistent across many downstream systems, compute it in TrackLayer and send the decision or threshold in the payload.

Does this replace Shopify Flow app triggers from other systems?

Not entirely. Native app triggers still make sense when an app already owns the business logic. The TrackLayer pattern is strongest when you want one server-side event layer to drive several automations with consistent naming and timing.

Next reads

Related implementation guides

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.