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

# Using the DHL Action Templates

[Back to Actions Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions)

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

**Prerequisites:** Configure [DHL](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-dhl-action) and [install templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/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](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-dhl-action#install-dhl-action-templates).

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

   ![Dialog task added](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)

   * **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**:

     ![Request](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)

     Click **+Add Response**:

     ![Response](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)

     **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.

   ![VA console prompt](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)

***

## Find Locations

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

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

   ![Dialog task added](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)

   * **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**:

     ![Request](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)

     Click **+Add Response**:

     ![Response](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)

     **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.

   ![VA console prompt](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)

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

   ![View location details](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)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.