Skip to content

Using the DHL Action Templates

You can use the Prebuilt Action Templates from your DHL integration to auto-create dialog tasks and test them using the Talk to Bot option.

Steps to create a dialog task using the DHL action templates:

  1. Ensure that you have configured DHL and installed templates successfully. If you have configured it and skipped installing the templates, see Marketplace to install the templates.

  2. Go to Automation AI > Virtual Assistant > Use Cases > Dialogs. All the dialogs are displayed.

  3. Click the auto-created dialog. The the canvas opens with all required entity nodes, service nodes, and message scripts.

DHL Actions

The following DHL actions are supported:

Supported Tasks Description Method
Track Shipment Tracks the shipment using the DHL tracking ID. GET
Find locations Retrieves locations using the country code and postal code from the DHL system. GET

Track Shipment

Steps to track the shipment using the DHL tracking ID:

  1. Refer to the Installing the DHL Action templates section to install this template.
  2. The Track Shipment dialog task is added with the following components:
    Dialog task added

    1. trackShipment: A user intent to track a shipment using the DHL ID.
    2. trackingNumber – Entity nodes for entering the tracking number.
    3. trackShipmentService – A bot action service to find places from an external integration using the place name. Click the Plus icon to expand to view the trackShipmentService bot action component properties.
    4. (Optional)In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
      Request

      To add one or more responses, scroll down and click the +Add Response button:
      Response

      Sample Response:

      {
      "shipments": [
      {
      "id": "7777777770",
      "service": "express",
      "origin": {
      "address": {
      "addressLocality": "-"
      },
      "servicePoint": {
      "url": "http://www.dhl.com/en/country_profile.html",
      "label": "Origin Service Area"
      }
      },
      "destination": {
      "address": {
      "addressLocality": "-"
      },
      "servicePoint": {
      "url": "http://www.dhl.com/en/country_profile.html",
      "label": "Destination Service Area"
      }
      },
      "status": {
      "timestamp": "2023-05-23T12:30:00",
      "location": {
      "address": {
      "addressLocality": "NUERNBERG - GERMANY"
      }
      },
      "statusCode": "transit",
      "status": "transit",
      "description": "Arrived at DHL Delivery Facility NUERNBERG - GERMANY"
      },
      "details": {
      "proofOfDelivery": {
      "signatureUrl": "https://proview.dhl.com/proview/adhocnotify?id=vasdsasss",
      "documentUrl": "https://proview.dhl.com/proview/adhocnotify?id=vQg5"
      },
      "proofOfDeliverySignedAvailable": false
      },
      "events": [
      {
      "timestamp": "2023-05-23T12:30:00",
      "location": {
      "address": {
      "addressLocality": "NUERNBERG - GERMANY"
      }
      },
      "description": "Arrived at DHL Delivery Facility NUERNBERG - GERMANY"
      },
      {
      "description": "Shipment picked up"
      }
      ]
      }
      ]
      }
      
    5. trackShipmentMessage – A message node with the script to display responses.

    6. Click the Train tab to complete the Dialog task training.
    7. Click the Talk to Bot icon to test and debug the dialog task.
    8. Follow the prompts in the VA console to track shipment, as shown below.
      VA console prompt to track shipment

Find Locations

Steps to find DHL locations using the country and postal codes:

  1. Refer to the Installing the DHL Action templates section to install this template.
  2. The Find Locations dialog task is added with the following components:
    Dialog task added

    1. findLocations: A user intent to find locations using the coordinates.
    2. countryCode and postalCode – Entity node for entering the country and postal codes.
    3. findLocationsService – A bot action service to find locations using a country and postal code from an external integration. Click the Plus icon to expand to view the findLocationsService bot action component properties.
    4. (Optional)In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
      Request

      To add one or more responses, scroll down and click the +Add Response button:
      Response

      Sample Response:

      {
      "locations": [
      {
      "url": "/locations/HYD102",
      "location": {
      "ids": [
      {
      "locationId": "HYD102",
      "provider": "express"
      }
      ],
      "keyword": "",
      "keywordId": "",
      "type": "servicepoint"
      },
      "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
      }
      },
      "openingHours": [
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Monday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Tuesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Wednesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Thursday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Friday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Saturday"
      }
      ],
      "closurePeriods": [],
      "serviceTypes": [
      "express:drop-off-easy",
      "express:drop-off",
      "express:drop-off-account",
      "express:pick-up",
      "express:drop-off-prelabeled"
      ],
      "averageCapacityDayOfWeek": []
      },
      {
      "url": "/locations/HYD112",
      "location": {
      "ids": [
      {
      "locationId": "HYD112",
      "provider": "express"
      }
      ],
      "keyword": "",
      "keywordId": "",
      "type": "servicepoint"
      },
      "name": "Gachibowli Office, HYDERABAD",
      "distance": 1840,
      "place": {
      "address": {
      "countryCode": "IN",
      "postalCode": "500032",
      "addressLocality": "HYDERABAD",
      "streetAddress": "Shop No.1, First floor House no. 2-48/T2, Gachibowli"
      },
      "geo": {
      "latitude": 17.435879,
      "longitude": 78.366746
      }
      },
      "openingHours": [
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Monday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Tuesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Wednesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Thursday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Friday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Saturday"
      }
      ],
      "closurePeriods": [],
      "serviceTypes": [
      "express:drop-off-easy",
      "express:drop-off",
      "express:drop-off-account",
      "express:pick-up",
      "express:drop-off-prelabeled"
      ],
      "averageCapacityDayOfWeek": []
      },
      {
      "url": "/locations/HYD119",
      "location": {
      "ids": [
      {
      "locationId": "HYD119",
      "provider": "express"
      }
      ],
      "keyword": "",
      "keywordId": "",
      "type": "servicepoint"
      },
      "name": "Kothaguda X Roads,HYDERABAD",
      "distance": 2332,
      "place": {
      "address": {
      "countryCode": "IN",
      "postalCode": "500084",
      "addressLocality": "HYDERABAD",
      "streetAddress": "Shop No.5, 1st Flr, Satya Towers Satya Towers,H.No.2-17, Kothaguda X Roads"
      },
      "geo": {
      "latitude": 17.4588091,
      "longitude": 78.3672857
      }
      },
      "openingHours": [
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Monday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Tuesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Wednesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Thursday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Friday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Saturday"
      }
      ],
      "closurePeriods": [],
      "serviceTypes": [
      "express:drop-off-easy",
      "express:drop-off",
      "express:drop-off-account",
      "express:pick-up",
      "express:drop-off-prelabeled"
      ],
      "averageCapacityDayOfWeek": []
      },
      {
      "url": "/locations/HYD109",
      "location": {
      "ids": [
      {
      "locationId": "HYD109",
      "provider": "express"
      }
      ],
      "keyword": "",
      "keywordId": "",
      "type": "servicepoint"
      },
      "name": "Jubilee Hills Office, HYDERABAD",
      "distance": 2909,
      "place": {
      "address": {
      "countryCode": "IN",
      "postalCode": "500033",
      "addressLocality": "HYDERABAD",
      "streetAddress": "Plot No.243, Rd No.36 Jubilee Hills,"
      },
      "geo": {
      "latitude": 17.432275,
      "longitude": 78.407039
      }
      },
      "openingHours": [
      {
      "opens": "09:00:00",
      "closes" : "21:00:00",
      "dayOfWeek": "http://schema.org/Monday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Tuesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Wednesday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Thursday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Friday"
      },
      {
      "opens": "09:00:00",
      "closes": "21:00:00",
      "dayOfWeek": "http://schema.org/Saturday"
      }
      ],
      "closurePeriods": [],
      "serviceTypes": [
      "express:drop-off-easy",
      "express:drop-off",
      "express:drop-off-account",
      "express:pick-up",
      "express:drop-off-prelabeled"
      ],
      "averageCapacityDayOfWeek": []
      }
      ]
      }
      
    5. getLocationsbyCoordinatesMessage – A message node with the script to display responses.

    6. Click the Train tab to complete the Dialog task training.
    7. Click the Talk to Bot icon to test and debug the dialog task.
    8. Follow the prompts in the VA console to find the location using the country and postal codes, as shown below.
      VA console prompt to find location
  3. To view the location details, click and expand the desired item in the results.
    View location details