# Package Tracking

{% hint style="info" %}
*Use this template when you want to enable seamless self-service to **help your customers track their orders.***
{% endhint %}

To use this template, simply choose it from the templates page when you create a new agent. You can then make changes to customize it based on your business needs.

![](/files/-Mb2E5YNi3Npo5Mq2x-s)

### Flow Overview

#### Step 1 - Starting the conversation

We start with a *Speak* node introducing the company to the caller. Using the *Speak* node we don't expect any input from the caller in this node.&#x20;

**Step 2 - Collect the Caller's Query**

After the greeting, we want to understand why the caller is calling. This means that we are looking to collect a value from the user input - with the help of the *Collect Input* node.

In case we can't collect the caller's input, the agent will route the call to a live representative. Therefore, the *No Input* and *Missed* tabs are connected to a *Speak* node, notifying the caller that in this case the call is being routed, followed by the *Route Call* action node.&#x20;

#### Step 3 - Match the Caller's Input

The *Classification* node will match the caller's input to the right response in the right intent. In this use case, the caller requests the whereabouts of his recently ordered package.

If the agent can't match the input to the right intent, the *Missed* tab is triggered, which in this case is connected to the *Speak* and *Route Call* node that transfers the call to an agent.&#x20;

#### Step 4 - Check Package ID

In another *Collect Input* node, the agent collects the Order ID and then sends it over to the third-party service via the *Webhook* node to retrieve the order status.&#x20;

In case we can't collect the caller's input, the agent will route the call to a live representative. Therefore, the *No Input* and *Missed* tabs are connected to a *Speak* node, notifying the caller that in this case the call is being routed, followed by the *Route Call* action node.&#x20;

If the *Webhook* fails to retrieve the order number, we also want to route the call to a live representative. Therefore, the exit point of the *Failed* tab in the *Webhook* node is connected to the entry point of the *Speak* node indicating that the call is going to be transferred.

#### Step 5 - Inform Caller about Delivery Status

One we retrieved the delivery status, we are going to inform the caller about their ETA and ask them if they'd like to receive a text message with a tracking link for the future in a new *Collect Input* node ("Your estimated delivery date is scheduled for $ARRIVAL\_DATE . Do you want me to send you a tracking link via SMS?")

The confirmation of the caller is being collected in the *Conditions* node. If the Caller would like to receive a text message, the agent is going to send the message in a *Send SMS* action node and a *Speak* node indicating the arrival of the message. After sending the message, the agent will terminate the call.

If the caller denies, the agent will simply terminate the call. Therefore, the endpoint of the *Default* tab in the *Conditions* node that indicates the caller's "no" is connected to the entry point of the *Speak* node letting the caller know this call is going to be terminated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://studio.docs.ai.vonage.com/ai-studio/templates/order-tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
