Valiopt
← Back to Blog

How to connect an AI customer support agent to your fulfillment system

So you've set up an AI agent to automate some of your support load, now how do you get it resolving issues that require updates in third party software like your OMS, warehouse platform, or fulfillment software?

For e-commerce brands, this can include requests like:

  • Canceling an order before it's fulfilled
  • Changing a shipping address
  • Swapping out an item for a different SKU

If you're using an off the shelf AI agent like Gorgias AI, Intercom Fin, or something similar it's likely that you at least have the Shopify integration built in. The AI can locate orders, maybe even make changes. That usually doesn't get you all the way there: most fulfillment software doesn't sync the Shopify order after it's been imported the first time so you'll have to implement a way to get it updated separately.

The native actions provided by tools like Gorgias and Fin may work for relatively standard workflows, but custom orchestration is needed for order change flows that involve multiple systems or custom rules.

What's the best way to configure a fulfillment integration

The most foolproof and consistent way to integrate your AI helpdesk agent with your fulfillment system is to build a custom tool or action that calls an internal API that orchestrates your OMS data, fulfillment system, and any business logic. Composing this in a single endpoint ensures that the appropriate actions are triggered in each system every time, and makes sure that the right checks happen each time this action is triggered.

For example, if you want to allow your AI agent to perform order cancellations before they are shipped, this endpoint can:

  1. Check the order in Shopify
  2. Validate the fulfillment status in your fulfillment system (has it been picked yet)
  3. Cross-check against any rules you have for cancellations (e.g. within 24 hours)
  4. Simultaneously trigger a cancellation via your fulfillment system, and a refund in Shopify

The AI agent is still responsible for understanding the customer's request and collecting the necessary information. However, your application code, not the language model, handles the sensitive operational workflow.

Setting this up requires you to have some sort of internal backend to host this endpoint, where it can be reached by your AI agent. You'll also want to make sure to set up authentication for security.

Why not set up a separate custom action that the AI agent can use

Many helpdesk AI agents (e.g. Gorgias and Intercom Fin) will allow you to set up custom actions, so another way you could set this up a bit more easily is by simply adding actions / tools that allow the AI agent to hit your fulfillment system's API. This may seem easier, but it can come with some serious risks.

The main risk is that your AI agent doesn't fully follow your SOPs and stitch together these different action calls correctly, or skips an important step that likely won't be caught. These AIs aren't perfect yet, and they sometimes skip tool calls even if you've asked them explicitly. You could end up in a situation where an order gets cancelled in Shopify, but not in the fulfillment system, leading to lost inventory that you can't recoup the cost for.

The best and most surefire way to ensure that the different actions between these systems are stitched together correctly is to configure this logic through a custom endpoint, ensuring that all the necessary actions happen each time.

Comparison between LLM-stitched tool calls and a single orchestration endpoint

What if my fulfillment provider doesn't expose an API

Many of the fulfillment providers we come across are operating in the stone ages from a technology perspective, and they don't expose a modern API like Shopify or other companies.

In this case, one integration option is to use a browser-based integration that either simulates actions directly, or invokes internal APIs to perform actions.

Getting this configured can be finicky: mimicking authentication might require some custom browser scripting, and you'll need an environment that can support standing up a headless browser to perform these actions. This integration might also require maintenance over time if the third party makes changes to their systems.

Still, despite the effort required, it can be worth it. Many common support inquiries require access to fulfillment system data or actions, and this can allow you to automate them end to end, limiting manual follow-ups by your support team.

Is there an option besides doing all of this custom engineering work

Most ecommerce teams don't have engineers on hand to do the work described above, and hiring freelancers can be cumbersome and costly.

Valiopt handles the work described here for you end to end. Our team is familiar with these types of setups and integrations, we set up and maintain the infrastructure for you, and we support your team directly in configuring these flows. Get in touch to see how we can help you deploy better-integrated AI agents that resolve more customer support inquiries end to end.