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:
- Go to Build > Conversation Skills > Dialog Tasks.
- Click Create a Dialog Task.
- On the Dialog Task pop-up, under the Integration, select the DHL option to view the action templates.
- Select any of the dialog task templates and click Proceed. For example, select the Track Shipment item.
- If you have not configured any integration for your virtual assistant, you will see the Explore Integrations option. Once you click this option, you will be redirected to the Actions page to configure an integration for your VA. For more information, see Actions Overview.
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:
- Refer to the Installing the DHL Action templates section to install this template.
- The Track Shipment dialog task is added with the following components:
- trackShipment: A user intent to track a shipment using the DHL ID.
- trackingNumber – Entity nodes for entering the tracking number.
- 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.
- (Optional)In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
To add one or more responses, scroll down and click the +Add Response button:
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"
}
]
}
]
}
- trackShipmentMessage – A message node with the script to display responses.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to track shipment, as shown below.
Find Locations
Steps to find DHL locations using the country and postal codes:
- Refer to the Installing the DHL Action templates section to install this template.
- The Find Locations dialog task is added with the following components:
- findLocations: A user intent to find locations using the coordinates.
- countryCode and postalCode – Entity node for entering the country and postal codes.
- 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.
- (Optional)In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
To add one or more responses, scroll down and click the +Add Response button:
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": []
}
]
} - getLocationsbyCoordinatesMessage – A message node with the script to display responses.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to find the location using the country and postal codes, as shown below.
- To view the location details, click and expand the desired item in the results.