Skip to main content

Use your store and system data in workflows

Procedures can read data from your connected store and from your business's own connected actions, then use any field of the result in later steps. This article lists what's available and what each result contains.

Store actions

When an e-commerce store is connected, its actions appear in the / menu under Store · <your store>. Search products is always there for a connected store. The other actions appear only if your store supports them. While the store is disconnected, inactive or needs re-authorising, no store actions appear.

Action

Input

Returns

Search products

query (required)

A list of up to 10 products

Get product by id

product_id (required), variant_id (optional)

One product. Without a variant, its default variant

Get order by id

order_id (required)

One order

Get orders by contact

contact_phone (required)

A list with the customer's most recent order (empty if they have none)

Get discount coupon

contact_phone (required), coupon_type (optional)

One coupon, or the running offer

Store actions don't need the customer's confirmation. All of them only read data, except Get discount coupon, which generates a coupon code.

What each result contains

Use these fields with @, in conditions and in Run code, for example @get_order_by_id.order_status (use the name the step saved its result as).

Product

Field

Type

product_id, variant_id, sku

text

title, description

text

url, image_url

text

price, discounted_price

number

currency

text

availability

text, such as IN_STOCK or OUT_OF_STOCK

Order

Field

Type

order_id, order_number

text

order_status

text, as your store names it

created_at, updated_at

text, as YYYY-MM-DD HH:MM:SS (UTC)

order_total

number

currency

text

tracking_link, tracking_number, carrier_name

text

customer_phone

text

products

a list of items, each with id, name and quantity

shipping_address

city, country, postal_code, street

Coupon

Field

Type

coupon_code

text

coupon_type

LEAD, WIN_BACK or DEFAULT (empty for a custom offer)

description

text

source

text

Order statuses come from your store, so write conditions using your store's own words, such as "If the order status is delivered…".

How Get discount coupon works

This action only appears when your store can create coupons and the discount coupon action card is enabled for your business.

  1. If you have a custom offer running now, it returns that offer's description and no code: coupon_code and coupon_type are empty, and source is custom_offer. Otherwise source is coupon.

  2. Otherwise, it picks the coupon type for the customer:

    • LEAD: they have no orders yet.

    • WIN_BACK: their last order is older than the win-back days set on your discount coupon card (30 by default).

    • DEFAULT: everyone else.

  3. To force a type, fill coupon_type with LEAD, WIN_BACK or DEFAULT. A running custom offer still takes priority.

To handle a store that can't create the coupon, add a condition such as "If the coupon couldn't be generated, apologise and hand off to Customer Service."

Your own connected actions

Your AI agent's actions, such as finding bookings or cancelling an appointment, appear under Actions in the / menu. Type part of the name to find one.

  • Actions that fetch data are Read actions. Actions that change something are Write actions, always confirmed by the customer.

  • When an action needs a choice your AI agent normally makes, such as a doctor or branch, or a required input wasn't collected, the AI agent handles that step and asks the customer what it needs. Store actions aren't handed to the agent: collect their required inputs on an earlier line.

Built-in variables

Every procedure can use these without collecting them:

Variable

What it holds

@customer.name

The contact's name

@customer.phone

The contact's phone number

@customer.language

The customer's language

@system.today

Today's date (UTC)

@system.now

The current time (UTC)

Dates in conditions

When a condition is judged, every date it looks at comes with how far it is from today, in your business's timezone. For example, "2026-10-13 10:00:00 (3 days ago)". So conditions like "If the order was placed more than 14 days ago" work without code.

If your store disconnects

A published procedure that uses a store action your store no longer offers is marked Paused by system, with the reason "E-Commerce App Disconnected". The same happens when the discount coupon card is turned off. The label is only a warning: the procedure still starts, but those store steps fail, and the conversation is handed to your team unless a condition handles the failure. The status clears by itself once the store is back, within about 15 minutes.

Did this answer your question?