Using External APIs in Workflows

Prev Next

Dialpad’s Expert Workflows offer a powerful way to guide your customers to the right place the moment they call. These intelligent systems go beyond basic phone menus by understanding exactly what a caller needs and adapting the experience in real-time. You can easily set up automated steps that allow callers to solve simple problems on their own without ever needing to wait on hold for an agent.

By routing calls efficiently, you respect your customers' time and keep your team focused on the conversations that matter most. Adopting these workflows ensures that every call receives a professional and polished response, which builds trust in your brand. While extremely helpful, they can be complex and a little intimidating to work with.

Here are some use cases for where and how you can use external APIs in workflows in your contact center.

Data dip and transfer to a contact center

You can create a Data Dip API that retrieves a Dialpad Contact Center ID based on a given inbound phone number.

Using a data dip allows you to automatically route callers to the correct department based on their history, enabling them to skip frustrating menus and unnecessary button presses. This ensures high-priority or existing customers are instantly connected to the right team, reducing wait times and unnecessary transfers.

To set up an expert IVR workflow to use Data Dip, go to your Dialpad Admin Settings.

  1. Select Channels & IVR > IVR workflows

  2. Select the IVR workflow and select Launch Expert in the Expert node in the workflow

  3. Add a Send Message node to log the “inbound phone number” (also called the ANI or Caller Number) using the customer.businessid.phone variable

    Note

    Send messages can be seen within DE in the Supervisor Tab.

  4. Once the inbound number has been logged, add a Send a Message node to park the call

  5. In the External API node, retrieve data from an API with a phone number

    Note

    It’s recommended to assign a variable in case the URL encoding doesn’t work as expected.

  6. Add a Wait for Message node

  7. Add a Send Message node to log the API results

  8. Add a Branch node for an API response; one for a successful response and one for an unsuccessful response

  9. Add some Assign Variable nodes for the ‘transfer URL’ to log the URL

    Note

    Add one variable for ‘Set URL’ (successful response) and one variable for ‘Set Default URL’ (unsuccessful response).

  10. Add a Send a Message node with a Call Resume widget

  11. Add a Wait for Message node

  12. Add a Send a Message node with a Call Transfer widget

  13. Select Publish expert

  14. Select Publish workflow

    The call will now be transferred to the appropriate contact center based on the inbound phone number.

Operator Transfer Workaround

When transferring to agents/operators for a given contact center/department, if no one is available, it will route to the IVR twice. To resolve this issue, you can create a workaround using the Custom Context API.

Using a Custom Context API enables your IVR to access external customer details, such as account status or recent orders, providing personalized self-service options that resolve issues even when no agents are available. This significantly improves the customer experience by preventing dead ends and ensuring your team has the necessary context to follow up efficiently later.

To create an expert IVR workflow to perform an operator transfer without looping back to the IVR again, go to your Dialpad Admin Settings.

  1. Create an IVR workflow

  2. At the beginning of the workflow, add an Expert step and name it ‘CheckLoop’

  3. Add an External API node for Get Custom Context

  4. Add a Branch node to check for the ‘customer.session.voice.calluuid’

    Note

    Add this API query within the Branch node.

    1. If a call UUID is found, the call is a fallback call

      Note

      Set variable nodes accordingly to handle the call gracefully.

    2. If the call UUID is not found, create a context with the ‘calluuid’

  5. Select Publish expert

  6. Select Publish workflow