Trigger a Flow

This guide describes the API available to automatically trigger a flow from an external system.


 

Overview

Use the Inbound API trigger action to systematically kick off your flow following an event in another system. Using this endpoint you can trigger a flow and include parameters that pull custom content into your flow.

For example:

  • After a customer places an order a flow is automatically initiated letting the customer know their order was received and proving the order number.

  • Following resolution of a help desk ticket a flow is automatically initiated sending a customer satisfaction survey to the issue reporter.

 

For more details check out Executing SmartFlows from an External Source.

 

Getting Started

Before you begin using these APIs make sure you've obtained an authentication token, and check out the API Basics page to learn more about basic requirements for using the APIs.

 

Endpoint

To trigger a SmartFlow via API, make an HTTP POST request to:

https://api.intelepeer.com/_rest/v4/sfgen/apitriggers

 

Parameters

  • flowId: string, *Required

    • The Flow ID is the unique SmartFlow identifier found in the Details section of the Configurations Panel. Open your flow and the overall flow Configurations Panel appears on the right side of your screen.

  • ANI: string, *Required

    • ANI is the destination number in outbound flow communications. Use e164 format.

  • DNIS: string, *Required

    • DNIS is the source number (i.e., Caller ID) in outbound flow communications. Use e164 format.

  • other: string

    • Other parameters can be passed into the request using a "$<>" format. When the parameter is referenced in the flow (e.g., $accountbalance), it will be substituted for the value that was sent in the request. For more information, check out the How to Use Variables page.

 

Sample Responses

Code 202 Response

Response code 202 returns a boolean value of true indicating that the flow will be triggered as expected.

 

Code 400 Response

Response code 400 returns a bad request message.

 

Code 401 Response

Response code 401 returns an error that the authorization token is invalid.

 

Code 403 Response

Response code 403 returns a forbidden (or unauthorized) message.

 

Code 404 Response

Response code 404 returns a message that the flow Id is incorrect and the flow is not found.