> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the DHL Action Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt DHL action templates to auto-create dialog tasks.

**Prerequisites:** Configure [DHL](/ai-for-service/integrations/dhl/configuring-the-dhl-action) and [install templates](/ai-for-service/integrations/dhl/configuring-the-dhl-action#install-dhl-action-templates) before proceeding.

Navigate to **Automation AI > Use Cases > Dialogs**, then click the auto-created dialog to open the canvas.

***

## Supported Actions

| Action         | Description                                         | Method |
| -------------- | --------------------------------------------------- | ------ |
| Track Shipment | Tracks a shipment using the DHL tracking ID         | GET    |
| Find Locations | Retrieves locations by country code and postal code | GET    |

***

## Track Shipment

1. Install the template from [DHL Templates](/ai-for-service/integrations/dhl/configuring-the-dhl-action#install-dhl-action-templates).

2. The *Track Shipment* dialog task is added with:

   <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-action-img12-tem-img4.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=74ba83b596320d0584b79c4ec961ecc5" alt="Dialog task added" width="1469" height="841" data-path="ai-for-service/integrations/actions/images/dhl-action-img12-tem-img4.png" />

   * **trackShipment** - User intent to track a shipment by DHL ID.

   * **trackingNumber** - Entity node for the tracking number.

   * **trackShipmentService** - Bot action service to track the shipment. Optionally click **Edit Request**:

     <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img5.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=8181a83a5e9dd0bdede6a66f47e06354" alt="Request" width="1916" height="909" data-path="ai-for-service/integrations/actions/images/dhl-tem-img5.png" />

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img6.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=f2846ca89531c650e651fe6472472913" alt="Response" width="1904" height="911" data-path="ai-for-service/integrations/actions/images/dhl-tem-img6.png" />

     **Sample Response:**

     ```json  theme={null}
     {
       "shipments": [
         {
           "id": "7777777770",
           "service": "express",
           "origin": { "address": { "addressLocality": "-" } },
           "destination": { "address": { "addressLocality": "-" } },
           "status": {
             "timestamp": "2023-05-23T12:30:00",
             "location": { "address": { "addressLocality": "NUREMBERG - GERMANY" } },
             "statusCode": "transit",
             "description": "Arrived at DHL Delivery Facility NUREMBERG - GERMANY"
           },
           "events": [
             { "description": "Arrived at DHL Delivery Facility NUREMBERG - GERMANY" },
             { "description": "Shipment picked up" }
           ]
         }
       ]
     }
     ```

   * **trackShipmentMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to track a shipment.

   <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img7.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=a61aa73337393efee9fc1603b12dd01a" alt="VA console prompt" width="650" height="824" data-path="ai-for-service/integrations/actions/images/dhl-tem-img7.png" />

***

## Find Locations

1. Install the template from [DHL Templates](/ai-for-service/integrations/dhl/configuring-the-dhl-action#install-dhl-action-templates).

2. The *Find Locations* dialog task is added with:

   <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img8.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=fe73cfb06f57ea4fae955dbcae029198" alt="Dialog task added" width="1491" height="903" data-path="ai-for-service/integrations/actions/images/dhl-tem-img8.png" />

   * **findLocations** - User intent to find locations by coordinates.

   * **countryCode** and **postalCode** - Entity nodes for country and postal codes.

   * **findLocationsService** - Bot action service to find locations. Optionally click **Edit Request**:

     <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img9.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=055ac2dd926326ab0ecd79a2cc686018" alt="Request" width="1917" height="824" data-path="ai-for-service/integrations/actions/images/dhl-tem-img9.png" />

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-tem-img10.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=f95444e0af0d06ff25c6f251670feb4e" alt="Response" width="1911" height="907" data-path="ai-for-service/integrations/actions/images/dhl-tem-img10.png" />

     **Sample Response:**

     ```json  theme={null}
     {
       "locations": [
         {
           "url": "/locations/HYD102",
           "name": "Madhapur Office, HYDERABAD",
           "distance": 1076,
           "place": {
             "address": {
               "countryCode": "IN",
               "postalCode": "500081",
               "addressLocality": "HYDERABAD",
               "streetAddress": "H.No.2-52/1, Plot No.12 Opp Kasanigr Hotel,"
             },
             "geo": { "latitude": 17.441049, "longitude": 78.392052 }
           },
           "serviceTypes": [
             "express:drop-off-easy",
             "express:drop-off",
             "express:pick-up"
           ]
         }
       ]
     }
     ```

   * **getLocationsbyCoordinatesMessage** - Message node to display results.

3. Click **Train**, then **Talk to Bot** to test.

4. Follow prompts to find locations.

   <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-action-img11-tem-img2.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=9d8a06bca8925b1e93f4c0b0fa7c91c3" alt="VA console prompt" width="1072" height="907" data-path="ai-for-service/integrations/actions/images/dhl-action-img11-tem-img2.png" />

5. Click and expand the desired result to view location details.

   <img src="https://mintcdn.com/koreai/I4CfGjCj6W3ljkoZ/ai-for-service/integrations/actions/images/dhl-action-img12-tem-img4.png?fit=max&auto=format&n=I4CfGjCj6W3ljkoZ&q=85&s=74ba83b596320d0584b79c4ec961ecc5" alt="View location details" width="1469" height="841" data-path="ai-for-service/integrations/actions/images/dhl-action-img12-tem-img4.png" />


Built with [Mintlify](https://mintlify.com).