Sales tracking connects your store’s purchase and cart activity to Text conversations, so agents can see orders and cart updates in real time. Sales data also feeds into your ecommerce reports, letting you measure revenue driven by chat and AI agents.
This integration is built for custom ecommerce platforms like Adobe Commerce, SAP Commerce Cloud, Salesforce Commerce Cloud, headless storefronts, and custom-built stores. Your developers only need to add a few JavaScript calls — no plugins, connectors, or backend setup required.
What do you need?
A Text account with a connected website
The Chat Widget installed on your store — including on checkout and order confirmation pages, since that's where purchase events need to fire
How does it work?
Sales tracking works by sending ecommerce events from your store to Text through the Chat Widget JavaScript API. Your developer adds JavaScript calls at key moments in the customer journey — for example, when a product is added to the cart or when an order is completed.
Use the following method to send events from your storefront:
LiveChatWidget.call('track_sales_event', { name: '...', data: { ... } })The widget automatically attaches customer identity and page details, then sends the data to Text in real time. Agents instantly see cart and purchase activity inside the Inbox, while sales data is added to your ecommerce reporting and revenue attribution.
This integration requires no plugins, API keys, authentication headers, or backend development, making it ideal for custom ecommerce platforms, headless storefronts, and enterprise commerce solutions.
For implementation details, supported event types, payload structure, and required fields, see the Sales Tracking JS API reference for custom ecommerce integrations.
What do you get?
Real-time visibility for agents
When a customer chats with your team, agents can see:
Order notifications — the moment a purchase is completed, the agent sees the order number, total value, and items bought, directly in the chat
Order details in the sidebar — agents can view recent and past orders, total orders and spend, and purchases made during or after the chat directly alongside the conversation for quick reference.
Wins counter –– a top-bar counter visible for all agents working in Text. Updates whenever someone from the team makes an order. Refreshes every day.
This means your agents never have to ask "did you end up placing that order?" or switch to another tool to check. The context is right there.

Sales reporting
Every tracked order feeds into two reports in Text:
All Sales — shows all orders placed during a chat or within 30 days after a chat, whether the conversation was handled by a human agent or an AI agent. You see total revenue, number of orders, and average time from chat to purchase.
AI Agent Sales — the same metrics, filtered to show only sales attributed to AI agent conversations. Use this to measure your AI agent's direct impact on revenue.
Learn more about ecommerce reports, sales attribution, and revenue tracking.Add sales tracking to your website
Track completed orders
This is the core of the integration. When a customer completes a purchase, fire the order event from your order confirmation page.
Example:
LiveChatWidget.call("track_sales_event", {
name: "store_order_was_created",
data: {
order: {
id: "1042",
order_number: "#1042",
currency: "USD",
total_price: 149.99,
line_items: [
{
product_id: "123456789",
title: "Merino Wool Crew Neck",
quantity: 1,
price: 149.99,
},
],
},
},
});For the full list of required and optional parameters, see the Sales Tracking JS API reference for custom ecommerce integrations.
What does the agent see?
The agent receives an order notification in the chat, including the order number, total value, and a list of items with product images, titles, quantities, and prices. Order details are also available in the sidebar.

How does this connect to reports?
The order appears in the All Sales report and, if the chat was handled by an AI agent, in AI agent Sales. The attribution window is 30 days from the chat. Report data syncs daily, so the order will appear in reports the next day.

How to test your integration?
You don't need a special test mode. Here's how to verify everything works:
Open your store in a browser where the Chat Widget is loaded
Start a chat conversation (or ensure one is already active)
Trigger an event — place a test order or add a product to the cart
Check the agent's Inbox — the notification should appear in the chat feed within seconds
Check your browser console — if required fields are missing or the payload is invalid, the widget logs a warning
The next day, verify that the test order appears in the All Sales report.
Troubleshooting
Order events not appearing in the Inbox
Is the Chat Widget loaded on the page where the event fires? It needs to be present on checkout and confirmation pages, not just the storefront.
Does the page hostname match a connected website in your Text account? See "The silent failure to watch for" above.
Are all required fields present? Check the browser console for warnings.
Orders not appearing in reports
Report data syncs once per day. Check the following day.
If the order doesn't appear in the Inbox, it won't appear in reports either. Start by troubleshooting Inbox visibility first.
Seeing duplicate orders
Check that your integration fires the event only once per order. Common causes: page reloads on the confirmation page, SPA re-renders, or the event firing in both a page-load handler and a callback.
Getting a 422 error
The payload failed validation. The response body includes an error_code and message explaining what's wrong. Common causes: missing a required field, using an unrecognized event name, or a malformed data object. See the JS API reference for the full payload specification.
Getting a 429 error
You've hit the rate limit. This can happen on high-traffic stores. There's no retry mechanism built into the widget — the event is dropped. If this happens consistently, contact support.
Frequently asked questions
Yes. While the integration is called "sales tracking," the event structure can represent any conversion. For example, if your business tracks deposit payments, you can fire the order event when a deposit is confirmed. The agent sees it as a completed transaction attributed to the chat, and it appears in your sales reports.
No — the opposite. This integration exists specifically for stores that don't have a native platform connector. If you do use Shopify, see Connecting the website widget using Shopify instead.
Yes, this API is also dedicated for headless commerce. In this case, you should integrate via this API, not the standard Shopify integration.
Include the thumbnail_url field for each line item — this should be a direct URL to the product image (JPEG, PNG, or WebP). The agent sees it as a thumbnail next to the product name in the order details. If you don't provide an image URL, a placeholder is displayed. The image is loaded directly from your URL, so make sure it's publicly accessible.
Orders appear in the agent's Inbox in real time (within seconds). Report data syncs once per day, so orders show up in All Sales and AI Agent Sales the following day.
No, order events are automatically deduplicated on our side.
What's next
Ecommerce reports — learn how to read and filter your sales reports
Sales tracking JS API reference — full technical documentation with payload specifications and event names