Skip to main content

Overview

Shopify Actions enable your AI agent to provide comprehensive e-commerce support directly within the chat interface. These actions give your agent access to your store’s product catalog, cart, order information, and customer data, allowing it to assist shoppers throughout their entire journey, from discovering products to placing an order and following up afterwards.
You can test Shopify actions and see how they will look using the Chatbase Shopify demo store here
Prerequisite: Before using Shopify Actions, you must set up the Shopify integration with your Chatbase account.

Available Shopify Actions

1. Retrieve and display products

Search and display products from your Shopify catalog. Customers can browse by category, search for specific items, and add products directly to their cart. Shoppers can also search by image: when they send a photo as an attachment, the agent finds matching products from your catalog, even when the product name doesn’t appear in the image.

Best for:

Helping customers discover products, answering questions about inventory, comparing items, and facilitating add-to-cart actions.
Common Use Cases:
  • “Show me red dresses under $50”
  • “What laptops do you have in stock?”
  • “How much is this?” (with a photo attached)

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Retrieve and display products. The action opens as Shopify get products.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Get_Products.When to use: If the user ask about products, use this tool. Summarize the tool’s result in your response, ensuring no images are included within the text response.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Sync Your Products

In the Products section, click Sync products to import your catalog. The initial sync may take some time depending on the size of your store. Once it finishes, the section shows how many products were synced.After the first sync, your products stay up to date automatically. If you ever need to, click Re-sync products to fetch the in-stock products again.Click Continue.
5

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
6

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent product-related questions to verify it returns accurate results.
Shopify action buttons, such as Add to cart and Select options, are automatically translated based on your localization settings.

Keeping Your Theme’s Cart Icon in Sync

By default, when a customer adds a product to their cart through the chat bubble, your theme’s cart icon doesn’t update until the page is reloaded—the item is added, but the cart count still shows 0 until the customer refreshes. Chatbase dispatches custom DOM events whenever the agent changes the cart, so your theme can update its cart UI in real time. With a listener for these events in place, adding one product makes the cart count show 1 right away, with no refresh. The following events are fired:
You can listen to any of these events in your theme’s JavaScript to keep the cart UI in sync:
Multiple event names are dispatched to ensure compatibility across different Shopify themes. You only need to listen to one of them.

How Product Sync Works

To sync your catalog, open the Products section of the action and click Sync products. Chatbase will then retrieve all products from your Shopify store; this may take some time depending on the size of the store. After the initial import, Chatbase automatically listens for changes—whenever a product is added, updated, or deleted in your store, the data syncs in real time. This ensures your agent always has access to up-to-date product information. If you ever need to, click Re-sync products to fetch the in-stock products again. When you delete the action, Chatbase automatically removes its stored product data and stops syncing future updates.
Note that once this action is in use, your agent already has your product data through the sync, so you can exclude product pages from your website training source.

2. Update cart

Let shoppers manage their cart through the conversation: add products, remove them, or change quantities before checkout.

Best for:

Adjusting quantities, removing items the shopper no longer wants, and adding recommended products without leaving the chat.
Common Use Cases:
  • “Add two of these to my cart”
  • “Remove the blue one from my cart”
  • “Change the quantity of the sneakers to 3”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Shopify update cart.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Update_Cart.When to use: Call this tool when the user wants to add a product to their cart, change the quantity of an existing line, or remove a line from the cart. After updating the cart, ask the user if they want to add more products or proceed with creating the order?To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent to add a product to the cart, change its quantity, and remove it again.
Pair Update cart with Create order. The default “When to use” prompt has the agent offer to proceed to the order as soon as the cart changes.

3. Get cart

Display the current contents of a customer’s shopping cart, including items, quantities, prices, and totals.

Best for:

Showing customers what’s in their cart, displaying cart totals, and helping customers review items before checkout.
Common Use Cases:
  • “What’s in my cart?”
  • “Show me my cart total”
  • “How many items are in my cart?”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Shopify get cart.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Get_Cart.When to use: Call this tool when asked about the cart, including the items in the cart, the total price, the quantity of items.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent to show cart contents.

4. Create order

Let your agent place a Shopify order for the shopper directly from the conversation. The order can be built from the shopper’s cart or from specific items the agent (or a procedure) provides, and paid for with a Shopify checkout link, cash on delivery, or as a free order. Orders can be placed from any channel your agent is on: Chat bubble, Help page, Instagram, Messenger, and WhatsApp.

Best for:

Completing a purchase without leaving the chat, “buy it now” flows, cash-on-delivery stores, and sending free replacement or gift orders.
Common Use Cases:
  • “I’m ready to check out”
  • “Place the order for what’s in my cart”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Shopify create order.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Create_Order.When to use: Call this tool when the user wants to place an order.If orders should only ever be placed as a step inside a procedure, and never on the agent’s own initiative, turn on Only use in procedures.Click Save and continue.
4

Configure Behavior

The Behavior section controls how the order is built, how it is paid for, and how it is recorded in Shopify.Order items: where the items in the order come from.Order payment: how the shopper pays.Shipping address phone number: whether the agent collects a phone number for the shipping address.Order tags: tags added to every order this action creates, so you can find them in Shopify admin. Defaults to chatbase. Add or remove tags as needed.Order note: a note attached to the order in Shopify. Defaults to Placed via Chatbase AI agent ( {{paymentModeLabel}} ), where {{paymentModeLabel}} is replaced with the payment method used for the order. Click Add variable to insert other variables, or Reset to restore the default.Click Save and continue.
5

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
6

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by adding an item to the cart and asking your agent to place the order. With Online payment selected, the agent should reply with a Shopify checkout link.
When testing from the Playground with Online payment, the AI agent isn’t aware whether the payment was completed. On supported channels, the agent knows once the shopper pays. Updating the cart doesn’t work in the Playground either, so test Use the cart orders from a live channel such as the Chat bubble.
You can create the Create order action more than once, each with its own Behavior settings, and give each a distinct action name. For example, keep Create_Order (Use the cart + Online payment) for regular checkout, and add Create_Replacement_Order (Skip the cart + Free order) for replacements and goodwill orders. Then reference the right one from a procedure step with @action_name, so each flow places exactly the kind of order it should. Turn on Only use in procedures on the replacement variant so the agent never uses it outside that flow.

5. Create exchange

Handle exchange requests against a past order. The agent creates an exchange draft order that credits the returned items toward their replacements, then opens a Chatbase Helpdesk ticket so a human agent can approve or reject it before the order is placed.

Best for:

Size and color swaps, replacing a wrong or defective item, and any exchange where you want a person to approve before the replacement ships.
Common Use Cases:
  • “I’d like to exchange these for a size 10”
  • “Can I swap this for the black version?”
The exchange order isn’t placed until a human agent approves it. The Chatbase Helpdesk ticket shows a summary of what is being returned and what it is being exchanged for; the human agent approves or rejects it with a single click, and approving pushes the exchange to Shopify. See the Help Desk overview for how tickets are handled.
Ticket Details: By clicking on “Review action”, the human agent will see the exchange details and they can approve or reject the request.

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Shopify create exchange.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Create_Exchange.When to use: Call this tool when the user wants to do a product exchange.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Configure Behavior

The Behavior section controls how the exchange draft order is recorded in Shopify.Order tags: tags added to the exchange order, so you can find it in Shopify admin. Defaults to chatbase. Add or remove tags as needed.Order note: a note attached to the exchange order that summarizes what is being returned, what it is exchanged for, and the resulting balance. The default is:
Click Add variable to insert any of the available order variables, or Reset to restore the default.For example, the default Reason line renders as Reason: Wrong size (merchant fault → free shipping).Click Save and continue.
5

Configure Details Collection (optional)

Under Collect additional details, define the fields the AI gathers in conversation before it opens the exchange ticket in the Chatbase Helpdesk, for example an image of the product that needs to be replaced.Click Add data input and give each field a Name, a Type (for example, image), and a Description that tells the agent what to ask for. Leave Required checked to make the agent collect the field before it opens the exchange, or uncheck it to let the agent open the exchange without that field.Click Save and continue, or Skip if you don’t need any extra details.
6

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
7

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent to exchange an item from a past order. A ticket should appear in your Helpdesk for approval, and the exchange order is placed only after an agent approves it.

6. Retrieve and display orders

Retrieve order information for customers. Customers can check order status, view their purchase history, and get details about specific orders using various filters.

Best for:

Answering order status inquiries, providing tracking information, displaying purchase history, and helping customers find specific order details.
Common Use Cases:
  • “Where is my order?”
  • “Show me my recent orders”
  • “What’s the status of order #1234?”
Order status: The AI agent pulls order status directly from Shopify, so it reflects the latest information Shopify has available on the order status page. Shipped orders appear as “On its way”. To display delivery confirmation, ensure your store uses a trackable carrier (USPS, UPS, FedEx, etc.) or a third-party app that provides delivery updates to Shopify.

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Retrieve and display orders. The action opens as Shopify get orders.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Get_Orders.When to use: If the user ask about orders, use this tool. Summarize the tool’s result in your response, ensuring no images are included within the text response.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent about order status to verify it retrieves the correct information.
Guest customers can look up orders using either:
  • Checkout email + order number
  • Phone number + order number
For authenticated customers, order lookup is automatic, no email address, phone number, or order number is required. Orders are retrieved directly from the signed-in account.

7. Tag an order

Record the outcome of a conversation directly on the customer’s order in Shopify. The agent adds tags you choose to the signed-in customer’s own orders, so the result of the chat is visible on the order itself in Shopify admin.

Best for:

Marking orders as, for example, “damaged”, “missing item”, or “address confirmed” straight from the chat, so your team and your Shopify workflows can act on them.
Common Use Cases:
  • Flagging an order when the customer reports a damaged or missing item
  • Recording that the customer confirmed their delivery details
  • Marking an order for follow-up by your team

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Shopify tag order.
3

Configure General Settings

The fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: tag_shopify_order.Allowed tags: the tags the agent is allowed to apply to an order. Defaults to chatbase. Add the tags you want the agent to choose from, for example damaged, or return-requested, and remove any you don’t want used. The agent only applies tags from this list.When to use: Call this tool when something the customer says about an order should be recorded on the order.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by signing in to your store, telling the agent something about one of your orders, and confirming the tag appears on that order in Shopify admin.
This action cannot be tested in the Action Preview on the dashboard, as it requires the user to be authenticated in order to work properly.
Damaged or missing items. A common procedure pairs this action with Create order: tag the original order (for example damaged) so the case is recorded on it in Shopify, then ship a free replacement with a Create order variant set to Skip the cart + Free order.

8. Check account and send activation email

Check whether the customer is signed in to your Shopify store and, if their account was never activated, email them a link to activate it. This helps shoppers get signed in before using actions that need an authenticated customer, such as updating their profile or billing address.

Best for:

Guiding guests toward a signed-in session, recovering customers who never activated their account, and unblocking account requests that require authentication.
Common Use Cases:
  • “How do I log in to my account?”
  • “I never got an activation email”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Check account & send activation email. The action opens as Shopify account access.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: check_account_access.When to use: Call this tool when the customer cannot sign in to their store account, or never received the email to activate it. If it succeeds, tell the user that if the account exists, we sent an email.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by telling your agent you can’t sign in to your account. The agent should confirm that an activation email has been sent if the account exists.

9. Update customer profile

Enable signed-in customers to modify their account profile information through the agent.

Best for:

Account management, updating contact information, and helping customers keep their profile current.
Common Use Cases:
  • “Update my email address”
  • “Change my phone number”
  • “Update my account information”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Update shopify customer profile. The action opens as Shopify update profile.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Update_Profile.When to use: Call this tool when asked about changing customer profile, including first name, last name, email, or phone number.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent to update profile information.
This action cannot be tested in the Action Preview on the dashboard, as it requires the user to be authenticated in order to work properly.

10. Update customer billing address

Allow customers to add new billing addresses or update existing ones directly through the chat interface.

Best for:

Self-service address updates, helping customers correct billing information, and streamlining account management.
Common Use Cases:
  • “Update my billing address”
  • “Change my payment address”
  • “I moved and need to update my address”
  • “I want to add a new address and set it as default”

Setup Instructions

1

Navigate to Actions

Go to your Chatbase dashboard and select the agent connected to your Shopify store. Click Build > Actions in the left sidebar.
2

Create the Action

Click Create Action and choose Update shopify customer billing address. The action opens as Shopify update address.
3

Configure General Settings

Both fields come pre-filled with working defaults. Leave them as-is unless you need to make a specific change.Action Name: Update_Address.When to use: Call this tool when asked about adding or updating billing addresses or changing the default address.To restrict this action to procedure steps only, turn on Only use in procedures.Click Save and continue.
4

Choose Channels

Use Channels to control where the action is available. This step is optional: toggle the action on or off for each configured channel, then click Save. Some channels may be incompatible with the action and won’t be available for selection.
5

Enable and Test

Ensure the action is toggled to Enabled.
Test the action by asking your agent to update a billing address.
This action cannot be tested in the Action Preview on the dashboard, as it requires the user to be authenticated in order to work properly.

Best Practices

Clear Action Triggers

Write specific “When to use” descriptions to help the AI agent accurately determine when to trigger each action. Include example phrases customers might use.

Test Thoroughly

Test each action with various customer queries before going live. Verify that product searches return accurate results.

Keep Products Synced

In case you notice discrepancies in available products, click Re-sync products in the action’s Products section.

Use Procedures

For multi-step flows like exchanges or damaged-item replacements, build a procedure that calls the right Shopify actions in order, so the agent doesn’t improvise on high-stakes flows.