Advanced Use Cases

Implement Order Tracking in Your E-commerce Chatbot

Learn how to leverage our AI Actions feature to implement an order tracking system for your online store.

Implement Order Tracking in Your E-commerce Chatbot


Step 1: Create a Custom Action

Create a custom action using the AI Actions API. Give it a descriptive name such as order_tracking_tool.

Step 2: Define the Tool Description

Set the description to A tool to track the order status for the action.

Order Tracking Example

Step 3: Configure the API Endpoint

Configure the API endpoint that your chatbot will use to retrieve order status information. Below are implementation examples for both Shopify and WooCommerce platforms.

Shopify Order Tracking

Configure Access Token

First, set up the appropriate permissions by following the Shopify Products Training Guide. For order tracking, you'll only need the read_orders permission.

Shopify Access Token Permission

Implement Order Status Retrieval

Select the Order Tracking action and Shopify platform. Input the Shopify domain and the access token

Shopify Order Tracking Testing Example

Once you've confirmed a successful response, save your AI Action configuration.

WooCommerce Order Tracking

For WooCommerce integration, follow the WooCommerce Products Training Guide to set up authentication. You'll only need the read permission.

Woocommerce Order Tracking With Read Permissions

Implement Order Status Retrieval

Select the Order Tracking action and WooCommerce platform. Input the WooCommerce Store Domain, Consumer Key and the Consumer Secret. Input the Order ID Pattern if your order id follows some pattern. Finally, enter a testing order to fetch the status to pass the validation flow.

WooCommerce Order Tracking Action

Prestashop Order Tracking

For Prestashop integration, follow the Prestashop Products Training Guide to get the webservice api key with the following "GET" permissions (read-only access):

  • 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

Implement Order Status Retrieval

Select the Order Tracking action and Prestashop platform. Input the Prestashop Webservice Main Entry Point (should be ending with /api) and the Webservice Key. Input the Order ID Pattern if your order id follows some pattern. Finally, enter a testing order to fetch the status to pass the validation flow.

Prestashop Order Tracking Action

Magento Order Tracking

For Magento integration, you'll need to create an Integration in your Magento admin panel and obtain an Access Token with the following GET permission (read-only access) for order tracking:

Sales:

  • OperationsOrdersActionsView - Read order information

Magento Order Tracking Permissions

Implement Order Status Retrieval

Select the Order Tracking action and Magento platform. Input the Magento REST API Entry Point (must end with /rest) and the Access Token you obtained from the integration. Input the Order ID Pattern if your order ID follows some pattern. Finally, enter a testing order to fetch the status to pass the validation flow.

Shopware Order Tracking

For Shopware 6 integration, you'll need to create an Integration in your Shopware admin panel and obtain API credentials (Access Key ID and Secret Access Key) with read-only access for order tracking.

Follow the Shopware Products Training Guide to create a role and integration. For order tracking, you'll need to add the following view permissions to the role:

  • Order - Read order information (includes associated line items and transaction data)
  • Shipping - Read delivery and shipping information

Shopware Order Tracking Permissions

Implement Order Status Retrieval

Select the Order Tracking action and Shopware platform. Input the Shopware Store Domain (without https:// prefix), the Access Key ID, and the Secret Access Key you obtained from the integration. Input the Order ID Pattern if your order ID follows some pattern. Finally, enter a testing order to fetch the status to pass the validation flow.

Shopware Order Tracking Action

Customize the Base Prompt

To ensure proper interaction flow, update your chatbot's base prompt. Add instructions similar to:

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

Test Your Implementation

Below is an example using a Shopify order number (WooCommerce testing follows the same process, though order number formats may differ):

Shopify Order Tracking Testing Chatbot

The chatbot demonstrates the complete workflow: triggering the order_tracking_tool, collecting the order ID, and presenting the current order status. Users can also access a detailed order tracking page:

Shopify Order Confirmation Page

Frequently Asked Questions

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

Create a custom AI Action, give it a clear name such as order_tracking_tool, describe it as a tool for order status lookup, then configure the API connection for your store platform and test it before saving.

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

For Shopify, you need an access token with the read_orders permission. 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 guide mentions this field for WooCommerce, Prestashop, Magento, and Shopware configurations.

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