We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
In this article, we will explain how to set up an information card in Webphone specifically for our subscribers using our call center product.
Before we start, we check the following steps:
First, we set up the webhook to obtain the call's UUID when the call starts.
Every time a call starts, a JSON data like the one below is POSTed to you via the HTTPS protocol.
{
"data": {
"hangup_by": null,
"call_flow": [
{
"action": "init",
"detail": {
"id": null,
"type": "contact"
},
"timestamp": 1731840060
}
],
"callee_type": "contact",
"number_id": 328,
"first_touch_duration": null,
"channel_id": 328,
"answered_at": null,
"voicemail_type": null,
"caller_id": null,
"call_duration": null,
"callback_cdr_uuid": null,
"missing_call": null,
"related_id": null,
"callee_number": "905438856301",
"uuid": "2483a75a-56a2-41f1-991b-92b1667e324a",
"callback_time": null,
"related_type": null,
"ended_at": null,
"caller_type": null,
"credited": null,
"channel_type": "number",
"voicemail_url": null,
"callee_id": null,
"user_id": null,
"missing_call_reason": null,
"started_at": "2024-11-17T10:41:00Z",
"bridged_at": null,
"voicemail_id": null,
"contact_id": null,
"callback_user_id": null,
"direction": "outbound",
"caller_number": "+902582440032",
"record_url": null
},
"event": "call_init"
}
Here, you can retrieve the UUID of the call and the customer's number. For this call:
callee_number field.There is an important note regarding the customer number. If the call direction is outbound, the customer number is in the callee_number field; if the call direction is inbound, the customer number is in the caller_number field.
You need to create the information to be displayed as a card in the webphone from your database or CRM system based on the customer number as follows.
{
"card": [
{
"link": "https://my-crm.com",
"text": "My CRM",
"type": "title"
},
{
"label": "Full Name",
"link": "https://my-crm.com/contact/1234",
"text": "Onur Ozgur OZKAN",
"type": "shortText"
},
{
"label": "Company",
"link": "https://my-crm.com/company/1234",
"text": "Acme Inc.",
"type": "shortText"
},
{
"label": "Type",
"text": "Old customer",
"type": "shortText"
},
]
}
Reviewing the JSON above, you will see there is 1 title and 3 label => value pairs in the webphone.
My CRM
Since the Full Name and Company fields have a URL, clicking them will open the provided URL in a new tab. There is no such situation for the Type field.
Important Considerations:
For this operation, we use the POST => /api/v3/calls/{call_id}/cards endpoint in the Hipcall API. You can test it live from the API documentation if desired.
You need to send the UUID of the call received from the Webhook as CALL_ID, and the JSON you created in the previous step as the BODY.
You can ask us questions via our Developer Community forum.