Back to the help center
Help center

Loyalo with Shopify Flow

Shopify Flow automates tasks in your shop. Loyalo works with it in two ways: Flow starts on what Loyalo records in Shopify (tags and subscriptions), and Flow can have Loyalo do something through the API. This article shows both.

Updated: 4 October 2026

What you need

  • The Shopify Flow app. According to Shopify, Flow is free on the Basic, Grow, Advanced and Plus plans.
  • To add points from Flow: the 'Send HTTP request' action. According to Shopify it is only available on Grow, Advanced and Plus.
  • A Loyalo API key with the permission 'Add or deduct points'. You create it under Settings > API & webhooks.
No Loyalo blocks of its own in Flow

Loyalo has no triggers and actions of its own in Flow. For an app like Loyalo (one app per shop) Shopify only allows those on Shopify Plus. With tags, Shopify's own triggers and the API you get the same result, on every plan where Flow allows it.

Starting on a subscription

Loyalo's subscriptions are Shopify subscriptions. So the triggers Shopify has for them work for Loyalo too. One exception: for subscriptions through iDEAL, Mollie does the charging, not Shopify. There the triggers about charges do not tell you whether the direct debit succeeded.

Trigger in FlowWhen
Subscription contract createdA customer starts a subscription
Subscription contract updatedThe subscription changes: paused, resumed, cancelled, another date or other products
Subscription billing attempt successA charge succeeded
Subscription billing attempt failureA charge failed
Subscription billing attempt challengedThe bank asks the customer for a confirmation

Starting on a Loyalo tag

Loyalo puts tags on orders and customers. You start on a customer's tag with the trigger 'Customer tags added'. You use an order's tag in a condition.

TagWhereMeaning
subscriptionOrderAn order of a subscription
subscription_<number>OrderThe number of the subscription
subscription_order_<n>OrderWhich order of this subscription it is: subscription_order_1 is the first
SepaDirectDebitOrderCharged by SEPA direct debit (iDEAL through Mollie)
loyaloOrderEvery order Loyalo made for a subscription
subscription_activeCustomerThe customer has an active subscription
subscription_cancelledCustomerAll subscriptions of the customer have stopped
loyalo-tier-<name>CustomerThe customer's tier
loyalo-b2bCustomerA business customer

You turn the subscription tags on the customer on, and give them your own names, under Subscriptions > Settings, at 'Tags on the customer in Shopify'. Loyalo writes the tier tags and loyalo-b2b when 'Write profile to Shopify' is on under Loyalty > Tiers.

Tags on an order arrive a little later

Loyalo sets the tags shortly after Shopify has created the order. A workflow that starts on 'Order created' and checks the tag straight away can therefore be too early. Check the tag in a workflow that starts later, for example on 'Order fulfilled', or start on one of the subscription triggers above.

Example: 100 points when a customer starts a subscription

  1. Create a keyGo to Settings > API & webhooks and create a key with the permission 'Add or deduct points'. Copy it straight away: it is shown once.
  2. Choose the triggerIn Shopify Flow, create a workflow with the trigger 'Subscription contract created'.
  3. Add the actionChoose 'Send HTTP request' with the method POST and the address below. Set two headers: x-api-key with your key, and Content-Type with application/json.
  4. Fill in the bodyUse the body below. You pick the customer number and the number of the subscription in Flow with 'Add a variable' from the data of the trigger. Loyalo finds the customer by Shopify's customer number. The idempotency_key makes sure the same subscription never gives points twice, even when Flow repeats the request.
  5. Let Flow try again on an errorSet errors of the kind 4XX to 'Retry'. A customer who is brand new is sometimes not in Loyalo yet; at the next attempt they are.
POST https://mwugkfkidoakjoelhtir.supabase.co/functions/v1/v2-api/points
The address of the action
{
  "shopify_customer_id": "{{subscriptionContract.customer.legacyResourceId}}",
  "points": 100,
  "note": "Flow: subscription started",
  "idempotency_key": "flow-contract-{{subscriptionContract.id}}"
}
The body of the request. You pick the two variables in Flow yourself; this is what they look like with this trigger. Instead of shopify_customer_id you can also use email.

When it works, Loyalo answers with the new balance and the workflow continues. If the customer does not exist in Loyalo (yet) the answer is 404; if the customer has too few points for a deduction, 409.

What else Flow can do with Loyalo

  • A message in Slack or an email to your team when a charge fails (trigger 'Subscription billing attempt failure').
  • A note on the customer or a message to your team when a customer reaches a tier (trigger 'Customer tags added', condition on loyalo-tier-…).
  • A separate treatment at shipping for an order of a subscription (trigger 'Order fulfilled', condition on the tag subscription).
Can Flow pause or skip a subscription?

Through Loyalo's API it can, but that asks for the subscription's number in Loyalo. Flow does not have that at hand, so it takes an extra step. For points that is not the case: Shopify's customer number or the email address is enough.

Does this work on Shopify Basic?

The triggers and the tags do. According to Shopify the 'Send HTTP request' action is only available on Grow, Advanced and Plus.

Does the customer get points when Flow sends the request twice?

No. With the same idempotency_key Loyalo books once.

Read next