If no Webhook integrations are present, the creation page will be shown directly, otherwise click on the Create New button to add another Webhook integration.
First, set the Route Name (an arbitrary description for this integration) and Service type. The options on the rest of the page are specific to the service selected, so it is important to set this value correctly.
The options for all but the Generic Webhook service being primarily preset. As such, the rest of the page will focus on the Generic Webhook service type, though the selection of filed names and values is relevant to all integrations.
Generic Webhook customisation
Following the name and service selection, set the Method and Base URL appropriately. The values for these fields will be determined by the system accepting the webhook, so . The integration supports GET and POST requests. POST requests can submit the body as a standard form request, an XML formatted body or a JSON formatted body.
Realtime Webhooks
An option is provide to set the webhook as a Realtime webhook. The realtime webhooks are designed for use with systems that need to provide immediate feedback on phone calls, such as creating a dashboard that shows the number of active calls. As such, each time a call changes status, a new request is sent.
As the realtime webhook reports on calls still in progress, there is no way to include data like the call recording. This data is added with a final call from the regular (non-realtime) version of the webhook once the call data is finalised.
As processing the recording files, generating the MP3 and calling any post-call processing takes a little while, there is an unavoidable delay between the end of the phonecall and the final webhook call to register the call.
For realtime webhooks, the "Unique ID" field name (the code for which is [[uniqueid]]) should be added to the output and save in the local system. Then this value should be checked on each request to check if the call is a new call, or if is a status update for an existing call. If the status is irrelevant, the subsequent requests could just be ignored by the receiving system.
Adding Webhook Data
The fields that the Webhook call will submit now need to be. The Body Key value will be a field name that the receiving endpoint will accept and the Body Value can either be a static value or, more typically, a dynamic value associated with the AVANSER call data.
- Enter a field name in the empty Body Key field
- Click in the empty Body Value field
- Click on the desired field name on the list of the left and the empty Body Value field will be filled in with the field placeholder.
- Click Add to add another key/value pair
- A new blank Body Value will be shown, enter the desired field name
- Repeat step 3 to add the field placeholder, and continue click Add (step 4) to create additional fields until all the desired fields have been added
- A preview of the data that will be sent via the Webhook will be shown in the body.
Webhook Header and Authentication
If the receiving endpoint requires authentication or additional headers to be set, click on the Authentication or Headers tabs to set these values.
- For Authentication, Basic authentication or Bearer tokens can be set, select the appropriate type and enter the Username, Password or Token as required.
- Headers can be set in the same fashion as the Body data in key/value pairs. Both static and dynamic values are supported.
Once all data is set as required, click Update and Continue to save the configuration.