Order Tracking with DHL

A PopFlow Example with Tracking DHL Order Status

Last published at: May 12th, 2023

Description:

In this workflow we are going to use a button on the workspace to call the PopFlow workflow.  It will include the tracking number (from the Incident field.)  Once executed the agent will see a pop up modal with the shipping arrival time.

  • Calls an external API and passes results into a variable.
  • Read more on how to build this PopFlow here.

 

Download  

 

Shipment Tracking – DHL Example

 

This workflow assumes knowledge of using buttons to pass data to the form from a workspace.  Check OM documentation to find out how to manage workspace buttons.

 

In this workflow we are going to use a button on the workspace to call the PopFlow workflow.  It will include the tracking number(from the Incident field.)  This is included in the PopFlow dataset as {trackingNumber}.  Once executed the agent will see a pop up modal with the shipping arrival time

Graphical user interface

Description automatically generated with low confidence

Workflow Structure

 

The initial activity is the HTTPS activity. 

Depending on the status of the API call we progress to aDynamic UI that either shows an error or, if the call is successful, the status of the delivery date.

 


HTTPS

 

Graphical user interface, application

Description automatically generated

 

Now that we have the body configured you just need to configure the HTTPSactivity with

  • HTTPS Method: Use GET for this method
  • Headers:You will need your DHL-API-Key. This is provided when you sign up for the DHL API. Check your DHL API documentation to get your Authorization settings.
  • Parameters: Here we pass the tracking number by using the {trackingNumber} PopFlowVariable.
  • Save Results in: We are using the variable {dhlTracking}

 

Dynamic UI

 

After the call has been executed, we will get either a 200OK or an error message.  Providing a DynamicUI popup for both.

 

Graphical user interface, application

Description automatically generated

 

Success

 

If Successful, the DyamicUI will show a message formatted to provide the Destination Country, Service, and Estimated Delivery time.  The amount of information returned by DHL will differ based on the specific package and service.  You can see in the example we are using data returned in the {dhlTracking} JSON object to provide the information to the customer.  

 

You will need to check your results to see what information you would like to show to the agent.

 

 

Failure

 

Graphical user interface, application, email

Description automatically generated

 

In a failure scenario we simply show an error message for the agent to verify the tracking number and try again.


Related Articles