> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dmly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Store automations

> Start flows from Shopify and WooCommerce events, narrow them with order filters, and answer "where is my order?" in the chat automatically.

Once a store is connected (see [Shopify](/integrations/shopify) and
[WooCommerce](/integrations/woocommerce)), two things appear in the automation builder: the
**Store events** tab in the trigger picker, and the **Store (Shopify / WooCommerce)** group in
the step palette. Together they cover the messaging side of running a store: an order
confirmation on WhatsApp, an abandoned-checkout nudge, a back-in-stock alert, and a bot that
answers *"where is my order?"* on its own.

The ten store triggers (**Order placed** through **Customer milestone**) are listed with the
rest in [Triggers](/automation/triggers#store-events). This page covers what's specific to
them: the filters, the store steps, and the ready-made templates.

## Narrowing a store trigger

Every store trigger's settings start with **Store**: **Any connected store**, or one specific
store if you run several. Then, depending on the event:

| Filter                                            | On which events                              | What it does                                                                                                                                            |
| ------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Min order total** / **Max order total**         | Order and checkout events                    | Orders outside the range don't start the flow. Leave blank for any amount.                                                                              |
| **Currency**                                      | Order and checkout events                    | Only orders in this currency (three letters, e.g. `USD`). Blank means any.                                                                              |
| **Payment method contains**                       | **Order placed** only                        | Matches against the order's payment method, ignoring case. The field's own hint: *"Use “cod” to target Cash-on-Delivery orders only."*                  |
| **Total spent reaches** / **Order count reaches** | **Customer milestone**                       | The thresholds that count as the milestone, e.g. total spend reaches 500, or a 5th order.                                                               |
| **Notify contacts tagged**                        | **Product back in stock**, **Inventory low** | A product event has no single recipient, so the flow runs for every contact holding this tag (a `Waitlist` tag, say). Capped at 500 contacts per event. |
| **Only this product**                             | **Product back in stock**, **Inventory low** | Fire for one product instead of **Any product**.                                                                                                        |

**Customer milestone** fires once per customer per automation: a customer who crosses your
spend threshold gets the reward message once, not on every subsequent order.

## Who the flow actually reaches

A store event names a *store customer*, and DMLY has to find the matching
[Contact](/contacts/overview) before a flow can message anyone. It matches by phone number
first, then email. On a **WhatsApp** automation, a customer with no matching contact gets one
created from the order's phone number. On **Messenger and Instagram** no contact is ever
created: Meta only lets you message people who have messaged your page before, so store
events for anyone else are skipped. The trigger's panel shows the matching warning for your
channel.

<Warning>
  A store event says nothing about when the customer last messaged you, so on WhatsApp the
  contact is usually outside the 24-hour window. Start the flow with an approved **WhatsApp
  template** (or a checkout-link step with a template fallback), or the first message won't be
  delivered. See [WhatsApp rules and limits](/broadcasts/whatsapp-rules-and-limits).
</Warning>

## The store steps

The **Store (Shopify / WooCommerce)** palette group holds steps that read and write your
store: find an order, send its status, send a checkout link, send a product, sync the contact,
create a discount code, and write a note onto a store order or customer. The two that carry
the self-service recipe below:

### Find Order

Looks an order up and splits the flow on the result; its **FOUND** and **NOT FOUND** outputs
must both be connected, or publish refuses.

* **Look up by** defaults to **This contact (phone / email)**: the latest order matching
  the person you're already talking to. Or look up by **Order number**, email or phone.
* **Value** is the thing to look up. It takes variables, and the step's own tip is the right
  recipe: *"collect the order number with a User Input step first, then reference its variable
  here."* A leading `#` is fine; it's stripped before matching.

On the FOUND branch, the order's details become flow variables (`{{order.number}}`,
`{{order.status}}`, `{{order.total}}`, `{{order.tracking_url}}` and the rest) usable in any
later step. See the [variables reference](/automation/variables).

### Order Status

Sends one message built from those order variables. Its default body is
`Your order {{order.number}} is {{order.status}} — total {{order.total}} {{order.currency}}.`,
and the **Append tracking link when available** toggle adds a *"📦 Track your package:"* line
whenever the order has a tracking URL, and quietly leaves it off when it doesn't.

## "Where is my order?", answered automatically

The template library ships this as **Order Status Self-Service** (WhatsApp): a contact whose
message contains *order*, *tracking* or *where is my order* is asked for their order number,
**Find Order** looks it up, and the FOUND branch sends the status with the tracking link. The
NOT FOUND branch doesn't guess: it hands the conversation to a human and pauses the bot, so a
mistyped number ends with a person, not a loop. Install it from
[Templates](/automation/templates) and adjust the wording.

## Confirming Cash-on-Delivery orders

COD's problem is fake and second-thought orders: you dispatch, nobody pays. The **COD
Confirmation** template (WhatsApp) makes the customer confirm before you ship:

1. It triggers on **Order placed**, filtered with **Payment method contains** `cod`, so card
   orders never see it.
2. The customer gets a WhatsApp Flow form: a **Confirm order** button on a message quoting
   their order number and total.
3. When they complete the form, the flow writes a note back onto the store order (*"COD order
   confirmed via WhatsApp by"* the customer) where your fulfilment staff will see it, and
   assigns the conversation to the teammate you pick.

An order that's never confirmed simply keeps its unconfirmed note-less state. Dispatch on
confirmation, not on silence. The template needs a published WhatsApp Flow for the form (the
card says **Requires WA Flow**). See [WhatsApp Flows](/automation/whatsapp-flows).

## Abandoned checkouts

**Checkout abandoned** fires when a started checkout goes quiet for about an hour, once per
checkout. Two honest details:

* WooCommerce has no checkout object, so on Woo an *unpaid pending order* is what counts as an
  abandoned checkout.
* A customer who completed a purchase after abandoning is skipped; the nudge never chases
  someone who already bought.

<Columns cols={2}>
  <Card title="Connect Shopify" icon="cart-shopping" href="/integrations/shopify">
    The connect flow and what syncs.
  </Card>

  <Card title="Connect WooCommerce" icon="cart-shopping" href="/integrations/woocommerce">
    Same, for WooCommerce.
  </Card>

  <Card title="Triggers" icon="bolt" href="/automation/triggers">
    The full store-event list, with every other trigger.
  </Card>

  <Card title="Variables reference" icon="brackets-curly" href="/automation/variables">
    Every order, customer and store token.
  </Card>
</Columns>
