Webhook & Postback URL
Webhook
When an incoming phonecall arrives, you can trigger a webhook to an external system (like Power Automate/Logic App) to perform certain actions. This can for example be a retrieval of extra CRM data, or create a phone note on the CRM contact card. To configure a webhook, follow the next steps:
- Go to the ROGER365 admin portal
- Click [Toastar for Teams] in the left naviagtion bar
- Select the Profile
- Enter the URL to your HTTP listener in the [Webhook] field
- Click [Save]
The JSON displayed underneath will be send. If multiple contacts in a dataSource (CRM Replicator) are found, a button appears to select the correct contact. After selecting another contact, the webhook will be send again with the new data in the “selectedContact” field.
{
"conversationId": "8ecc770b-1685-4770-cffa-08d84434a9b2",
"originalContactUri": "+31882757600",
"lookupType": "phone",
"dataSources": "ef4f1179-e890-44cb-9748-24f590c66b88",
"selectedContact": {
"id": 25001,
"firstName": "John",
"lastName": "Doe",
"displayName": "Doe, John",
"email": "john@doe.com",
"sipAddress": null,
"street": "Nieuwe Plantage 58",
"zip": "2611 XK",
"city": "Delft",
"country": "The Netherlands",
"company": "ROGER365.io",
"phoneNumber0": null,
"phoneNumber1": "+31882757600",
"phoneNumber2": null,
"phoneNumber3": null,
"phoneNumber4": null,
"phoneNumber5": null,
"custom0": "Customer",
"custom1": "Doe, John",
"custom2": null,
"mobileData0": null,
"mobileData1": null,
"mobileData2": null,
"type": null,
"contactUrl": "null",
"contactId": "null",
"companyId": "null"
},
"selectedContactDataSource": "ef4f1179-e890-44cb-9748-24f590c66b88",
"userAadId": "c1f1a379-3075-461e-8456-193db13ade17",
"type": "newIncomingCall"
}Postback URL
After receiving the JSON via the Webhook you could, for example, retrieve extra CRM info. This new info can be posted back to the already displayed info in Microsoft Teams. You have to send this info in an adaptive card format. More information how to create an adaptive card, click here.
To make sure the info is posted back to the right user, you must include the “conversationId” in your postback url (https://api.roger365.io/v1.0/tft/postcard/<convid>). In this example the postback URL will be:
https://api.roger365.io/v1.0/tft/postcard/8ecc770b-1685-4770-cffa-08d84434a9b2