Developer/IT > CTI Integration > Endpoints

Endpoints

Whisbi has 3 endpoints that your CTI needs to call when there are call status changes or agent availability status changes. These endpoints ensure correct communication between your CTI and Whisbi

1. Call management – Endpoint

This first endpoint opens Whisbi sessions automatically.

You need to send a POST HTTP request to our endpoint when the Whisbi agent answers the call.

Please make sure you apply the correct base URL when sending a POST HTTP request. There are different base URLs for different regions. See the list below.

This is an example of the information you must include in your CTI logic:

POST:

https://[insert region base URL here]/api/cti_integration/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/calls

body:
{
“caller_id”: “+34654654654”,
“user_extension”: “agent@Whisbi.com”
}

Copy Code

Parameters:

integration_id: This is provided by Whisbi. In the example above it is represented with ‘xxxx-xxx…’ in the URL.

caller_id: the customer phone number of the incoming call

user_extension: this is the unique videoagent identifier inside your system that answers the Whisbi call (Remember that you sent this information to match it with the Whisbi account)

2. Agent availability management – Endpoint

This second endpoint allows us to always sync agent availability status in your CTI with the Whisbi agent status.

To make this possible, this endpoint must be called every time your agents changes status. Your CTI needs to consider all possible situations. Some common examples are listed below:

  • Whisbi agent disconnects from CTI (set status to busy)
  • Whisbi agent connects to CTI (set status to free)
  • Whisbi agent answers a NON Whisbi call (set status to busy)
  • Whisbi agent transfers a call so they are available again (set status to free)
  • Whisbi agent hangs up a call (set status to free)
  • Whisbi agent changes the status manually using your tools (set status to free or busy)

You need to send a PUT HTTP Request to our endpoint when the Whisbi agent changes their availability. This is the information you must include in your CTI logic:

PUT

https://[insert region base URL here]/api/cti_integration/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/status

body:
{
“user_status”: “free”,
“user_extension”: “agent@Whisbi.com”
}

Copy Code

Parameters:

integration_id: this is provided by Whisbi. In the example above it is represented with ‘xxxx-xxx…’ in the URL.

user_status: this is the new user status that has to be updated in Whisbi. The parameters are “free” when the user becomes available and “busy” when not.

user_extension: this is the unique videoagent identifier inside your system that answers the Whisbi call (Remember that you sent this information to match it with the Whisbi account)

3. Session result management – Endpoint

This third endpoint allows you to send the result status of the end of a session.

To make this possible, this endpoint must be called at the end of a Whisbi’s agent session.

You need to send a POST HTTP Request to our endpoint when the session of the Whisbi agent ends. This is the information you must include in your CTI logic:

POST

https://[insert region base URL here]/api/cti_integration/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/result

body:
{
“result_status”: “sale”,
“user_extension”: “agent@Whisbi.com”
}

Copy Code

Parameters:

integration_id: this is provided by Whisbi. In the example above it is represented with ‘xxxx-xxx…’ in the URL.

result_status: this is the status of the end of the session. The parameters are “sale” when it’s been a sale, “no-sale” when not, and “invalid”. It’s allowed to send numeric result status that whisbi can provide you in order to send specific result status.

user_extension: this is the unique videoagent identifier inside your system that answers the Whisbi call (Remember that you sent this information to match it with the Whisbi account)

agentExtension: this is the parameter that checks if a session result has been set using the CTI endpoint. This parameter has to be sent in the session alive call from the Agent Desktop. If the session result has been set using the CTI endpoint, the ‘Schedule Call’ and ‘Set Result’ buttons will be disabled in the Agent Desktop.