> For the complete documentation index, see [llms.txt](https://help.dollarlabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.dollarlabs.io/dollarback-store-credit/integrations/shopify-flow-triggers-and-actions.md).

# Shopify Flow: triggers & actions

{% embed url="<https://dollarlabs.neetorecord.com/watch/60921eabf0a3045a9494>" %}

*This article's section starts at 0:00 in the video.*

DollarBack plugs into Shopify Flow with four triggers (react when credit moves) and two actions (move credit from your own workflows), so you can automate tagging, messaging, and even credit itself without code.

## Prerequisites

* The Shopify Flow app installed on your store.
* The Flow integration enabled on **DollarBack admin → Integrations**. No account connection or authentication is needed; enabling it exposes the triggers and actions inside Flow.

## Triggers

Triggers start a workflow when DollarBack does something. Each carries the customer plus these payload fields you can use in conditions and later steps:

| Trigger                | Fires when                                                                                                      | Payload fields                                                                                                      |
| ---------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Store Credit Credited  | A customer's store credit is credited                                                                           | Amount, Currency, Formatted Amount, Expires At, Symbol, eventType (order paid, order edited, …), orderId, orderName |
| Store Credit Redeemed  | A customer spends store credit                                                                                  | Amount, Currency, Formatted Amount, Symbol, eventType, orderId, orderName                                           |
| expiryThreshold        | A customer's credit is about to expire; fires at the reminder thresholds from your Expiry Notification Schedule | Amount, Currency, Formatted Amount, Expires At, Remaining Days Before Expiry, Symbol                                |
| Reward Credit Credited | A referrer earns reward credit through a referral                                                               | Amount, Currency, Formatted Amount, Expires At, Referee First Name, Referee Last Name, Symbol                       |

The order fields (`orderId`, `orderName`, `Expires At`, `eventType`) are optional and can be empty; for example, a signup reward has no order.

## Actions

Actions let any Flow workflow move credit, whatever its trigger: an order event, a customer tag change, a schedule.

| Action               | What it does                                      | Fields                                 |
| -------------------- | ------------------------------------------------- | -------------------------------------- |
| Deposit Store Credit | Adds store credit to the customer in the workflow | Amount, Currency, Expires After (days) |
| Deduct Store Credit  | Removes store credit from the customer            | Amount, Currency                       |

Both actions also ship in a **v2** variant with extra fields: **OfferTitle** (the label shown in credit logs and emails), **NotifyCustomer** (send the credited email), and **SendToIntegration** (forward the event to Klaviyo/Omnisend). Prefer the v2 actions in new workflows; the extras make the credit traceable.

{% hint style="warning" %}
Credit deposited through Flow is real store credit: it appears in the customer's balance and your credit logs immediately, and Deduct can take a balance to zero. Test new workflows on a staff account before turning them on.
{% endhint %}

## Worked recipe: tag big earners

Goal: when a customer earns more than $50 of credit in one go, tag them for a VIP segment.

1. In Shopify Flow, click **Create workflow**.
2. **Select a trigger** → choose **Store Credit Credited** (under DollarBack).
3. Add a **Condition**: `Amount` is greater than `50`.
4. On the "then" branch, add an **Action** → **Add customer tags** → enter `vip`.
5. Name the workflow and turn it on.

Now credit a test customer $51 or more (a qualifying order or a manual credit) and watch the tag appear on their customer page.

Other recipes that work well:

* **expiryThreshold → send marketing email/SMS** via your connected platform for a last-chance nudge.
* **Reward Credit Credited → add customer tags** `advocate` to build a referrers segment.
* **Order paid (Shopify trigger) + Deposit Store Credit v2** for one-off promotions DollarBack's programs don't cover, e.g. a flat $5 for orders containing a specific product.
* **Customer tag added → Deduct Store Credit** to zero out balances when you flag abuse.

## Verify it works

Open the workflow's run history in Flow after triggering it. Each run shows the trigger payload and whether every step succeeded. Cross-check against **DollarBack admin → Analytics** credit logs for deposit/deduct actions.

## Common issues

* The DollarBack triggers don't appear in Flow: enable the integration on **DollarBack admin → Integrations**, then reopen the Flow editor.
* A workflow fired but no credit moved: check the run history for the action's error; Currency must be a valid code for the customer.
* The expiry trigger never fires: you need at least one threshold in the **Expiry Notification Schedule** and credit that actually expires ([Credit expiry and reminders](/dollarback-store-credit/spending-store-credit-and-rewards/credit-expiry-and-reminders.md)).

## Related articles

* [Klaviyo integration](/dollarback-store-credit/integrations/klaviyo-integration.md)
* [Omnisend integration](/dollarback-store-credit/integrations/omnisend-integration.md)
* [Credit expiry and reminders](/dollarback-store-credit/spending-store-credit-and-rewards/credit-expiry-and-reminders.md)
* [Credit logs and scheduled rewards](/dollarback-store-credit/analytics-data-and-account/credit-logs-and-scheduled-rewards.md)
