When customers inquire about their order status (“Where IS My Order?” or WISMO), you can build a simple, efficient, and customizable workflow autonomously.
This guide will show you how to create a WISMO workflow using our workflow builder, querying your package tracking API, and displaying package tracking information dynamically.
This guide requires a minimum knowledge of API consumption.
1. Before you start: get familiar with the Workflow builder
Our Workflow builder is the foundation for creating WISMO workflows.
Start by reading these articles:
2. Create the API connection
- Go on the API Connexion section (AI Copilot > Workflows, then select “API Connexion” in the dropdown)
- Create a new API Connexion by clicking on the + Create connection button on the upper right
- Configure the API Connexion as follow:
Information
- Name: PLUGIN:WISMO/XXXX (XXXX being the name of your tool if you wish)
-
Define inputs:
- orderNumber (type=String)
API URL
- Method: select the right method to call your API (it can be GET or POST)
- Define URL: enter your custom endpoint URL
Request body
{
"orderNumber": {orderNumber}
}
Expected response payload
iAdvize requires a structured list of values in order to dynamically generate a carousel in the conversation interface.
We do not have a native advanced concatenation function that allows us to extract and format information from a complex or nested payload.
That is why we request a pre-formatted payload following this structure:
{
"isOrderFound": true,
"shipments": [
{
"image": "https://cdn.mywebsite.com/img/status/in_transit.jpg",
"title": "Package in transit",
"description": "Carrier: UPS\nItems:\n• Stainless steel toaster x1\n• Electric kettle 1.7L x1",
"linkName": "Track this package",
"linkURL": "https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784"
},
{
"image": "https://cdn.mywebsite.com/img/status/preparing.jpg",
"title": "Package being prepared",
"description": "Carrier: FedEx\nItems:\n• Blender 1.5L x1\n• Digital kitchen scale x1",
"linkName": "Track this package",
"linkURL": "https://www.fedex.com/apps/fedextrack/?tracknumbers=123456789012"
},
{
"image": "https://cdn.mywebsite.com/img/status/delivered.jpg",
"title": "Package delivered",
"description": "Carrier: USPS\nItems:\n• French press coffee maker x1",
"linkName": "See delivery details",
"linkURL": "https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=9400110200883647491234"
}
]
}
Extract data
Based on this payload, you can configure the outputs as follows, but please note that the values shown here are only examples of what is possible. You are free to name them differently.
JSON path | Output variable |
$.isOrderFound | isOrderFound |
This value will allow you to control the display of a message based on whether the order was found or not.
JSON path | Output variable |
$.shipments[*].image | carouselImage |
$.shipments[*].title | carouselTitle |
$.shipments[*].description | carouselDescription |
$.shipments[*].linkName | carouselLinkName |
$.shipments[*].linkURL | carouselLinkURL |
By using the JSON Path syntax $.myCollection[*].subProperty, you can extract a list of each subProperty. You can then use this list to display the items in a carousel within the Workflow.
3. Create a dedicated Workflow to handle this feature
- Go to the Workflow section (AI Copilot > Workflows)
- Create a new Workflow by clicking on the + Create button on the upper right
- Fill-in the identity information about your Workflow by giving a Name (I.E.: XXXX Order Tracking) and a Displayed name. You can also customize the look and feel of your Workflow (color, icon, etc).
- Click on the Scenario tab at the top of the interface
- Here's an example of the steps you can create to enable your workflow to answer questions about order tracking:
STEP A: API Connexion card
This card will collect visitor information, then send it to our iAdvize x XXXX integration to collect order tracking information.
- Select your type of card: select “API Connection” in the dropdown-list
-
Connection type
- Select an API connection: choose the one you’ve created previously “PLUGIN:WISMO/XXXX”
- Choose the version: select the latest version (highest number)
-
Inputs
-
Question: Write the question that will be displayed to your visitors, inviting them to enter their order number (and email if you've also configured it in the Connection API in the previous step).
I.E.: What is your order number? - Don't ask this question if bot already knows the answer: uncheck this box
-
Question: Write the question that will be displayed to your visitors, inviting them to enter their order number (and email if you've also configured it in the Connection API in the previous step).
-
Next step after answer
- Define action: select Continue to step
- Choose or create a step: select the item that invites you to create a new Step (it should be + Create step B)
-
Alternative in case of API request failure:
At this step, you can simply choose in Define action: End conversation. You can improve your scenario later by displaying a message informing the user that something has gone wrong.
STEP B: Check if order was found
This step allows you to check whether the command has been found and, for example, to display a message if this was not the case.
Before configuring this step, first click on “+ Add a step” (it should create a new step named “C”)
- Select your type of card: select “Conditions”
-
If
- Click on “Add condition rule”, then:
- Condition name: you can name it “Check if the order was found”
-
Define conditions:
- In the condition line:
- Keep “Variable” value in the first dropdown
- Select the variable “isOrderFound” in the second dropdown
- Keep “is equal” in the third one
- Enters “true” in the textbox
- In the condition line:
-
Action on choice
- Action: select “Continue to step”
- Choice of your action: E (the name of the step you’ve just created before configuring this card)
- Click on “Add condition rule”, then:
-
Else
- Action: select "Continue to step”
- Choice of your action: select the item that invites you to create a new Step (it should be + Create step D)
STEP C: Order not found message
In this step, you will inform your visitor that his order has not been found. You could also invite him to try again.
- Select your type of card: select Multiple choice
- In the textbox, you can enter the following message:
We couldn't find your order, it's possible that your number is invalid, would you like to try again?
- Next step
- Add two choices:
- yes with a “Continue to step” action and select the step A
- no with a “End conversation” action
- Add two choices:
STEP D: Display tracking information to your visitor
In this step, you will be able to display all parcels tracking information
- Select your type of card: select “Rich message”
- In the textbox, you can enter the following message: “Here is your order information:”
- Click on the second icon “Vignette or carousel”
- In the new window, click on “Dynamic” option
- In the:
- image field, click on the icon within the textbox then select the carouselImage variable
- Vignette title field, click on the icon within the textbox then select the carouselTitle variable
- Description field, click on the icon within the textbox then select the carouselDescription variable
- Link URL field, click on the icon within the textbox then select the carouselLinkURL variable
- Displayed text field, click on the icon within the textbox then select the carouselLinkName variable
- Click the Validate button on the upper right corner, then click on the arrow on the upper left corner
- Next step
- Define action: select “End conversation” choice (you can improve it later)
4. Configure your Copilot to delegate this custom behavior to your dedicated Workflow
Enable your workflow to be reached by your Copilot
- Go to the “Routing” section by clicking on Engagement > Routing
- Click on the (+) button on the upper right
Give a name to your new routing rule, I.E.: XXXX Order Tracking
- At the bottom of the window, click on the “+ Add routing groups” button, then click on the Add button
- Click on the Save button
Connect Copilot for shoppers to your order tracking workflow
- Go to the “Copilot for Shoppers” section by clicking on AI Copilot
- Edit your existing Copilot by clicking on the pen icon
- In the Custom behaviors section, click on “Add custom behavior” and fill-in the following fields:
- Behavior name: Order Tracking
-
[1] Need expressed by visitors: you can start by writing something about order status and iAdvize wizard will help you to improve the detection if you click on the Improve button.
I.E.:
This intent involves customers seeking information about the current location of their order. Customers may want to know if their order has been processed, shipped, or delivered. They might also be looking for specific details about the whereabouts of their package, especially if there is a delay or if they are eager to receive their purchase. This intent is common when customers are tracking their order and need updates on its progress.
-
[2] Copilot’s reaction
- Select a behavior: select the Transfer option
- Select a routing rule: select the routing rule we’ve previously created “Distribute to XXXX Order Tracking”
- Click on the Validate button
- Then, click on Publish and close button on the upper right corner