Advanced Use Cases

Implement Order Tracking in Your E-commerce Chatbot

Let customers ask "Where's my order?" in the chat. Your AI agent looks the order up in your store with the built-in Order Tracking AI Action and replies with its status. It works with Shopify, WooCommerce, PrestaShop, Magento and Shopware. No coding or API work is needed.

Implement Order Tracking in Your E-commerce Chatbot

Before you start

  • A paid plan: AI Actions are available on all paid plans.
  • Your store's read-only credentials (see the table below). Shopify needs none, just a connected store.
  • A real order number from your store, to test the setup.

How it works

The customer asks about an order, the AI agent asks for the order number, calls the Order Tracking action, which reads the order from your store, and the AI agent replies with the status

The action only reads orders. It fetches the one order the customer names.

What you need for each store

StoreWhat you needFields to fill in
ShopifyA store connected to Chat Data. Nothing to paste.None
WooCommerceA REST API key with Read permissionWooCommerce Store Domain (without https://), Consumer Key, Consumer Secret
PrestaShopA Webservice key with read (GET) access to order dataPrestashop Webservice Main Entry Point (ends with /api), Webservice Key
MagentoAn Integration Access Token that can view ordersMagento Store Domain (REST Endpoint) (ends with /rest), Access Token
Shopware 6An Integration with read access to orders and shippingShopware Store Domain (without https://), Access Key ID, Secret Access Key

How to create each key is in the platform sections below.

Your store keys are saved with the action

Unlike product import, the Order Tracking action keeps the credentials you enter: your AI agent uses them every time a customer asks about an order. Give the key read-only access, as described below. To stop access, delete the action or revoke the key in your store.

Step 1: Add the Order Tracking action

  1. Open Settings > AI Actions.
  2. Choose the Order Tracking card.
  3. Give it a name, such as order_tracking_tool.
  4. Set the description to A tool to track the order status.

Order Tracking Example

Step 2: Connect your store

  1. Under Platform, pick your store.
  2. Fill in the fields for your store (see the sections below). For Shopify, the connected store is filled in for you.
  3. Optionally, enter an Order ID Pattern (for example ORDER-001). The AI agent then rewrites order numbers that customers type in a different format.
  4. Enter a Test Order ID from your store and click Test Configuration. You can save the action only after the test finds the order.
  5. Save the action.

Shopify Order Tracking

Connect the store first: install the Chat Data app from the Shopify App Store, or click Integrate with Shopify in your AI agent's Integrations tab. See Add Chatbots to Shopify Stores. The order permissions are granted when you approve the app.

Then pick Shopify as the platform. The AI agent can look an order up by order number or by the email used at checkout, and returns the order status, fulfillment and tracking details, line items and quantities, and totals.

WooCommerce Order Tracking

Create a consumer key and secret by following the WooCommerce Products Training Guide. Only the Read permission is needed.

Woocommerce Order Tracking With Read Permissions

Pick WooCommerce and fill in WooCommerce Store Domain, Consumer Key and Consumer Secret.

WooCommerce Order Tracking Action

Prestashop Order Tracking

Create a Webservice key by following the Prestashop Products Training Guide. Give it GET (read-only) permission on: addresses, carriers, currencies, customers, order_carriers, order_cart_rules, order_details, order_histories, order_invoices, order_payments, order_slip, order_states, orders.

Prestashop Order Tracking Permissions

Pick PrestaShop and fill in Prestashop Webservice Main Entry Point (ends with /api) and Webservice Key.

Prestashop Order Tracking Action

Magento Order Tracking

Create a Magento Integration and get its Access Token by following the Magento Products Training Guide. Don't skip its step 6, turning on Allow OAuth Access Tokens to be used as standalone Bearer tokens: without it, Test Configuration fails and you can't save the action. For order tracking, the Integration needs one read-only permission: Sales > Operations > Orders > Actions > View.

Magento Order Tracking Permissions

Pick Magento and fill in Magento Store Domain (REST Endpoint) (ends with /rest) and Access Token.

Shopware Order Tracking

Create a role and an Integration by following the Shopware Products Training Guide. Add these view permissions to the role:

  • Order: order information, including line items and transactions
  • Shipping: delivery and shipping information

Shopware Order Tracking Permissions

Pick Shopware and fill in Shopware Store Domain (without https://), Access Key ID and Secret Access Key.

Shopware Order Tracking Action

Step 3: Customize the Base Prompt

Add a line like this to your AI agent's base prompt so it asks for the order number first:

If the user inquires about order status, request their order number before using the order_tracking_tool to retrieve the status.

Use the name you gave the action in Step 1.

Test Your Implementation

Ask your AI agent about an order. Here is a Shopify example; other stores work the same way, though order number formats differ:

The AI agent asks for the order number, then shows the order confirmation number, total, financial status and fulfillment status

The AI agent asks for the order number, calls order_tracking_tool, and shows the current status. Customers can also open the store's order page:

Shopify Order Confirmation Page

Related: AI Actions · Add Chatbots to Shopify Stores

Frequently Asked Questions

How do I add order tracking to a Chat Data chatbot?

Open Settings > AI Actions and choose the built-in Order Tracking action. Give it a clear name such as order_tracking_tool, describe it as a tool for order status lookup, pick your store platform, enter its read-only credentials (none for a connected Shopify store), then test it with a real order ID before saving. No coding or custom API is needed.

What credentials or permissions do I need for Shopify and WooCommerce order tracking?

For Shopify you need no credentials at all — connect your store through the Chat Data Shopify app and the order permissions are granted during that approval. For WooCommerce, you need authentication set up with read permission, plus the store domain, consumer key, and consumer secret.

When should I use the Order ID Pattern field?

Use it when your store's order IDs follow a specific format or pattern. The AI agent then rewrites order numbers that customers type in a different format. The field is optional and available for every platform.

What should I add to the chatbot base prompt for order tracking?

Instructing the chatbot to ask the user for their order number before calling order_tracking_tool to retrieve the order status.

Previous
Internationalization