This API is called offline, after a call has ended in the JTEL ACD.

The result of the call, and some statistics regarding the call, are passed to the sales force instance.

This data can be used, for example, to create an activity record in SalesForce associated with the relevant SalesForce record.

To make use of this API, a REST endpoint must be provided in SalesForce for the jtel System to access.

Also, the following daemon must be activated in the jtel system:

\\acd-store\shared\JTELCarrierPortal\AppServer\SalesForce\SalesForce.Daemon.REST.writeCallStatistics.r5

The following pages describe an example implementation.

Request

POST

Data Records

One API call will be made for every associated line of data produced for a call. This means that more than one API call may be made for each call received by the jtel system, depending on how it is configured.

The following table shows this:

API CallStatisticsPartAAcdStatisticsPartBStatisticsPartBAcdStatisticsTransactionCodes
1One CallRouted to ACD Group 1Attempt to call agent WNo data
2Attempt to call agent XNo data
3Routed to ACD Group 2Successful call with Agent YTransaction Code AAA
4Transfer to Agent ZTransaction Code BBB
5Transaction Code CCC

Data Structure

Data is passed to this API as a JSON structure. 

The following fields are provided:

Field NameDescription
SalesForceIDThe Id of the record in SalesForce.
jtelStatisticsPartAIDThe ID of the StatisticsPartA record in the jtel system.
AgentUID

The UID of the agent in the jtel system.

It is recommended, that for example the "NickName" field in SalesForce be used to map values between the systems, if the login UID cannot be made equal.

bOutbound0 = Inbound Call, 1 = Outbound Call.
CallerIDThe caller ID of the caller or called party, in E.164 format (fully qualified including country code) without a proceeding +.
ServiceNumberThe used service number in the jtel system, as configured in the "Service Number" field (database field ServiceNumbers.Name) in the jtel system.
ServiceNameThe used service in the jtel system, as configured in the "Name" field (database field ServiceNumbers.Name2) in the jtel system.
AcdAgentGroupsNameThe name of the agent group used in the jtel system.
AcdConfigurationGroupsNameThe name of the configuration group used in the jtel system. For standalone groups, this will be the same as the agent group name.
dtCallStartThe date and time of the start of the call in the format YYYY-MM-DDThh:mm:ss (local jtel server time).
dtCallAlertThe date and time of call ringing in the format YYYY-MM-DDThh:mm:ss (local jtel server time). This field can be empty, if no ringing occurs.
dtCallConnectThe date and time of call connect in the format YYYY-MM-DDThh:mm:ss (local jtel server time). This field can be empty, if no connect occurs.
dtCallEndThe date and time of call end in the format YYYY-MM-DDThh:mm:ss (local jtel server time). This field can be empty, if no ringing occurs.
nDurationDuration of the call in seconds. -1 means no connection. 0 can mean a very short connection (< 500 ms) indeed.
CONNRES

The result of the call

1 = Connection with agent
2 = No answer (Inbound = from agent, Outbound = from dialled number)
3 = Busy (Inbound = agent, Outbound = dialled number)
4 = Agent refused call during whisper announcement, or agent refused call during ringing
5 = ISDN cause (see Cause field for exact reason).
7 = Error

Cause

The Q.850 cause for the end of the call.

For example, 1 = invalid number, 16 = normal clearing, 17 = user busy.

TransactionCodeExportKeyIf a transaction code was recorded for the call, then this field will contain the export key of that transaction code.

http Status Codes

The following status codes should be used:

Status CodeMeaning

200 – OK

Data was written
409 – Conflict

Writing not possible due to a conflict in the data. Data should not be re-transmitted by the jtel system.

423 – LockedWriting not possible at this time. Data will be re-transmitted by the jtel system in this case.
404 - Not foundSales Force record not found. Data should not be re-transmitted by the jtel system.
  • No labels