Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

List of all custom functions

URL: http://192.168.1.42:3000/centraloutboundwebhook-v1/prod

...

Method Name

...

Description

...

createOutbound

...

Done

...

dateCompare

...

fetchUserPreferences

...

updateUserPreferences

...

Done

...

getFlowVariables

...

updatePauseStatusForCLI

...

Done

URL: http://192.168.1.42:3000/chatbotwebhook-v1/prod

...

Method Name

...

Description

...

linkcreation

URL: http://192.168.1.42:3000/googleapiwebhook-v1/prod

...

Method Name

...

Description

...

translateText

URL: http://192.168.1.42:3000/hdfcsenseforthwebhook-v1/prod

...

Method Name

...

Description

...

speechprocessing

URL: http://192.168.1.42:3000/pullreportapiwebhook-v1/prod

...

Method Name

...

Description

...

pullreport

To Check:

...

Method Name

...

Description

...

tonetag/generalwebhook

...

hdfcrural/locateBranch

...

reliance-nippon/ValidateDateAndTime

1. Validate Date and Time

URL : http://192.168.1.42:3000/reliance-nippon-v1/test/

...

1. Validate Date and Time

Status :

Status
colourRed
titleGetting Error

Usage : This webhook is used when you want to check weather any date and time is correct or not, is a holiday, a weekend according to the configured weekdays etc.

URL : http://192.168.1.42:3000/reliance-nippon-v1/test/

Method : ValidateDateAndTime

Request

Flow Variable

Example

Description

$flow.key.inputDate

2019-12-08T05:00:00+05:30, 4 November 2019 etc

Input date that needs to be validated

$flow.key.validMAxDays

5

Given date is must be in future business day and not after that days. ex

Example : if If value is 5 than max 5 future day is valid other than not (excluding holiday).

$flow.key.flowId

58

Flow ID of the flow from which request was sent

$flow.key.workingDaysOff

MOnday,FRiday,sunday

Working days to be consider in validating date

This variable is mandatory parameter, when the type is ‘Appointment’.

$flow.key.accountID

2

Account ID of the request

$flow.key.incrementDays

0

Days to be incremented in input date

$flow.key.appointmentStartTime

2019-11-05T18:00+05:30

Start Time of the appointment

This variable is mandatory parameter, when the type is ‘Appointment’.

$flow.key.appointmentEndTime

2019-11-05T18:00+05:30

End time of the appointment

This variable is mandatory parameter, when the type is ‘Appointment’.

$flow.key.type

Appointment

Type of request received. It can be ‘appointment’ or ‘callback’.

Output Date/time will depend on the this type.

Response

Flow Variable

Example

Description

$flow.key.outputDate

2019-12-08T05:00:00+05:30

Send Output date after validating and crrectingcorrecting.

$flow.key.smsDate

8-12-2019

The output date to be send in SMS

$flow.key.SmsOutputTime

09:00 AM to 06:00 PM

The output time to be send in SMS.

If the type is ‘Callback’, then the time will be of form '08:00 AM to 08:00 PM'

$flow.key.outputTime

09:00 AM to 06:00 PM

The output time after validating

$flow.key.outputDay

Sunday

The output day after validating

$flow.key.timeIsValid

false

‘True' or ' False’ if the time is valid or not respectively, otherwise 'False’

$flow.key.dateIsValid

false

‘True' or ' False’ if the date time is valid or not respectively, otherwise 'False’

2. Initiate Outbound Flow

Status :

Status
colourRed
titleGetting Error

Usage : Using this webhook, you can request to initiate any Outbound Flow of your account using it's API.

...

Flow Variable

Value

$flow.key.obdResponseCode

200

$flow.key.obdReqID

Request ID

$flow.key.obdPhononUUID

Phonon UUID

3. shortURL

...

Status :

Status
colourGreen
titleworking

Usage : Using this webhook, you can shorten a long URL to into a short URL.

URL: https://s.phonon.in/UrlShortner/phonon/shortUrl

Method: POST

Headers:

HeadersKey

TitleValue

Content-Type

application/json

Accept

application/json

...

You can have your custom domain. Contact Support to help you with that.

...

4. updateUserPreferences (Verified)

Status :

Status
colourGreen
titleworking

Usage : Using this webhook, you can update $user.key Flow Variables without requiring a Make Call widget. Great for usage in Email and SMS flows.

...

Flow Variable

Example

Details

$flow.syskey.phonon_uuid

daa638a2-a5e9-4ac0-9934-f2b5e818ac48

$user.key.Language

English

$user.key.requestid

d1f513a9-c5ab-4e0a-92f0-72d0935c6201

$user.syskey.contactNumber

8000374XXX

Enter the unique ID of the Customer such as it's phone number.

$user.syskey.accountID

163

Account ID of the Central Account where the flow is

$user.key.XXXX...

Value

You can save or get any value

Response :

...

Flow Variable

Example

Details

$flow.key.userPrefsUpdationSuccess

SUCCESS/FAILURE

Status of the request sent

As soon as this webhook is executed, user key variables will be updated with the new values of $user.key variables.


5. updatePauseStatusForCLI - Change Break Status of a Direct Dial Agent

...

Status :

Status
colourYellow
titleunable to get response

Usage : Using this webhook, you can change the break status of a Direct Dial Agent. While the Direct Dial Agent is on break, s/he will not be considered for any calls allotment. For example, if your Dialer DID is 918068800809180680XXXXX, you can create an Inbound Flow with the same DID with this webhook. DID Agents can call on the Inbound number to change their pause status anytime (or you can toggle it automatically).

...

Flow Variable

Example

Description

$flow.key.pause

true

Set the Direct Dial Agent Pause Status to be true. Mandatory

Content

false

Set the Direct Dial Agent Pause Status to be false. Mandatory

$flow.key.cli

987996480598799XXXXX

CLI of the Direct Dial Agent. With or Without Country CodeMandatory

Content

919879964805

Content

 

Response :

Flow Variable

Example

Description

$flow.key.cli_pause_update

true/false

The Direct Dial was successfully paused / unpaused

Content

false

The Direct Dial was could not be paused / unpaused

6. fetchUserPreferences

Status :

Status
colourRed
titleGetting Error

URL : http://192.168.1.42:3000/centraloutboundwebhook-v1/prod

Method : fetchUserPreferences

Usage : This webhook is used to fetch all the user key variables linked with the contact number.

Request :

Flow Variable

Example

Description

$user.syskey.contactNumber

9181607XXXXX

Contact Number whose details are to be fetched

$user.syskey.accountID

123

Account ID of request

Response : All user key variables linked with contact number.

7. linkcreation

Status :

Status
colourBlue
titletesting remaining

URL : http://192.168.1.42:3000/chatbotwebhook-v1/prod

Method : linkcreation

Usage : This webhook is used to generate a short URL for a Bot.

Request :

Flow Variable

Example

Description

$flow.key.cli

9181607XXXXX

CLI number

$flow.key.botid

123

ID of Bot

$flow.key.token

In this request, all other flow variable will also be send if provided.

Response :

Flow Variable

Example

Description

$flow.key.shortenUrl

Short URL

$flow.key.botUniqueID

Unique ID of Bot

8. translateText

Status :

Status
colourRed
titlegetting error

URL : http://192.168.1.42:3000/googleapiwebhook-v1/prod

Method : translateText

Usage : This webhook will be used to convert the text from one language to another.

Request :

Flow Variable

Example

Description

$flow.key.inputText

My name is John

Input text to be converted

$flow.key.sourceLang

English

Language of input text

$flow.key.targetLang

Hindi

Language in which you want to translate

$flow.key.apiKey

API Key of Google Account

Response :

Flow Variable

Example

Description

$flow.key.status

Status of webhook request

$flow.key.translatedText

Translated text

$flow.key.detectedSourceLanguage

Source language that was detected (If any)

9. speechprocessing

Status :

Status
colourRed
titlegetting error

URL: http://192.168.1.42:3000/hdfcsenseforthwebhook-v1/prod

Method : speechprocessing

Usage : To webhook will be used to perform speech processing

Request :

Flow Variable

Example

Description

$flow.key.cli

Status of webhook request

$flow.key.speechText

Response :

Flow Variable

Example

Description

$flow.key.status

Status of webhook request

10. Pullreport

Status :

Status
colourRed
titlegetting error

URL : http://192.168.50.21:3000/pullreportapiwebhook-v1/prod/

Method : pullreport

Usage : This webhook is used to write the details of any call record in the report at the given location.

Request :

Flow Variable

Example

Description

$flow.key.reportType

call

Type of the report in which the call data is to be added

$flow.key.dtmf

1

Last DTMF pressed by the used

$flow.key.flowid

8657

Unique ID of flow for which request is to be send

$flow.key.accountID

293

Unique ID of Account for which request is to be send

$flow.key.dnis

99999XXXXX

DNIS number for which data is to be added in report

$flow.key.starttime

2021-01-11T09:00:00.000+5:30

Start time of the call

Response : No response configured

...

How to test internal webhooks ?

In order to test internal webhooks, you need to follow below steps -

  1. Connect to VPN

  2. Open any API Client tool, example - Postman

  3. Enter the URL of internal webhook

  4. Select the method as ‘POST’

  5. Select ‘Body type’ as ‘JSON’

  6. Enter the API request in predefined format in ‘Body’

Predefined Format :

Code Block
{
"method" : "<name of method>",
"keys" : 
[
{
"name" : "<request variable 1>",
"value" :  "<value of request variable 1>"
},
{
"name" : "<request variable 2>",
"value" : "<value of request variable 2>"
},
//follow same pattern if more than 2 request parameters
]
}