The Outbound Data Action Function allows you to programatically change the default state/configuration of an outbound Spoke call, right as the call is about to be placed.
When you set up Spoke, you set up company defaults for items such as call recording, the CallerIDs customers see when your team make calls, etc. Outbound Data Actions allow you to change this default behavior on a call-by-call basis.
Here are some examples of what you can do with Outbound Data Actions:
- You may have call recording turned on for the entire company, but when the CEO makes a call, you may want for turn call recording off.
- When your Customer Support team makes a call to a premium customer, you want the customer to see your premium support line number calling. Rather than having to rely on your team knowing who is a premium customer and manually selecting the right CallerID before they call, you can intercept their call and ensure the right number is selected.
- When a user attempts to make a call to a country you know they should not be calling, you can block the call from being made for that user but allow the call to go through for others.
Here's how it Outbound Data Actions work:
- User A in Spoke dials a phone number
- The Spoke Outbound Data Action calls some custom code that you have written, and says to your code: "Spoke User A is about to call this customer number, and we plan on presenting this CallerID (ANI) to the Customer."
- Your code can then either: A) let that call go ahead as planned, or B) ask Spoke to:
- use this CallerID instead
- turn call recording off/on
- block this call
How to enable Outbound Data Actions
- Login to your Spoke Account Portal.
- Go to the Other menu, select Developers and click on the Data Actions tab.
- Enter the URL to your custom call application
- Spoke will give you a signing secret to secure the data transmission
Outbound Data Actions Request Payload
This is the Request Payload that Spoke will send to your application.
|callerID||The CallerID (number) that Spoke is proposing to show to the customer for this call|
|contactNumber||The phone number being called|
|contactID||If you have your CRM connected to Spoke, this will be your CRMs ID field for the contact|
|contactEmail||If you have your CRM connected to Spoke or you have uploaded contact records, this will be the email of the contact being called|
|userID||This is the internal UserID of the Spoke Phone user who is placing the call|
|userExtension||This is the email address of the Spoke Phone user who is placing the call|
Data Actions Response Payload
This is the response payload options that your application can send back to Spoke. If you do not send back a response, Spoke will proceed with the call as planned. You can send back one or both of these parameters.
|callerID||This is the CallerID you would like Spoke to use. This must be in a valid e164 format.|
If you wish the call to proceed, either do not set this parameter, or pass back
To block this call from taking place, pass back
How to write a custom app that responds to Spoke's outbound calls
Your development team or systems integration partner writes a custom app that does your decision logic. This app logic can be simple (e.g. don't allow anyone but theses five Spoke users to call Fiji), to more complex apps that connect to your CRM to lookup customers to make decisions.
A good place to start is to use Twilio Serverless Functions as your application environment.
Tags: CallerID, ANI, Outbound Data Action