This method is used to aggregate the total number of incoming calls that use the same token for a specified campaign or interaction. The method updates a Boolean value that is associated with the campaign or interaction.
If you call this API and an instance already exists with identical callerId, jpToken and campaign/interaction IDs, the value for updateIncomingCallsCount will be updated and the time stamp of the current instance will be updated to the current time.
Invoking the Method Using REST
URL Syntax and Example
http(s)://[host:port/internalPath]/Application Name/version/[version]/account/ [accountID]/resources/jp/updateIncomingCallsCount/campaign/{CampaignId}
https://gointeract.io/interact/version/2/account/12345678/resources/jp/updateIncomingCallsCount/campaign/campaign1
http(s)://[host:port/internalPath]/Application Name/version/[version]/account/ [accountID]/resources/jp/updateIncomingCallsCount/interaction/{InteractionId}
https://gointeract.io/interact/version/2/account/12345678/resources/jp/updateIncomingCallsCount/interaction/interaction1
Specific URI Fields
* Only one of the following fields may be used in any call.
URI Field* | Data Type | Description |
---|---|---|
campaignId | string | Identifier for the relevant campaign |
interactionId | string | Identifier for the relevant interaction |
HTTP Method
POST
HTTP Headers
Tenant-Id: <account> Application-Key: <Public API Service application key>
When working in a Multi Environment configuration, the Header must include the name of the current environment:
Environment-Name: <environment-name>
HTTP Body
{ "callerId":"+972 54 4696388", "jpToken" : "Aejhib7" }
URI Field | Data Type | Description |
---|---|---|
callerId | string | Customer phone number |
jpToken | string | Unique token returned from generateToken API |
Sample Request
POST /interact/version/2/account/12345678/resources/campaign/jp/updateIncomingCallsCount/campaign/{CampaignId} HTTP/1.1
Host: localhost:8080
Tenant-Id: {tenantId}
Application-Key: 53736e07e4b05772e6475c2d
Content-Type: application/json
Cache-Control: no-cache
{ "callerId":"+972 54 4696388", "jpToken" : "Aejhib7" }
Expected Responses
Response Scenario | Status Code/Header | Example Message |
---|---|---|
Success | 200 | |
Invalid body parameter(s) | 400 | missing or invalid parameter <parameter> |
Invalid security headers | 401 "Unauthenticated-Reason" Header |
{ "code":"0x7000000", "message": "Request is unauthorized, missing or wrong credentials", "moreInfoUrl":"http://www.jacada.com/support", } |
Outdated campaign/interaction session | 403 | Token expired |
Campaign does not exist | 404 | Campaign <campaign id> was not found |
Interaction does not exist | 404 | Interaction <interaction id> was not found |
General error (internal error from the Interact server) | 500 | exception |
Invoking the Method Using SOAP
WSDL URL
https:/gointeract.io/interact/version/2/agent/soap/agent.wsdl
Headers
Tenant-Id: <account> Application-Key: <Public API Service application key>
When working in a Multi Environment configuration, the Header must include the name of the current environment:
Environment-Name: <environment-name>
Input Parameters
Parameter | Type | Description |
---|---|---|
jpToken | string | Unique token returned from generateToken API |
campaignId | string | An identifier for the relevant campaign |
interactionId | string | An identifier for the relevant interaction |
callerId | string | Customer phone number |
Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://com/jacada/interact/agent/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:UpdateIncomingCallsCountRequest>
<soap:jpToken>Aejhib7</soap:jpToken>
<!--You have a CHOICE of the next 2 items at this level-->
<soap:campaignId>campaign1</soap:campaignId>
<!--<soap:interactionId>interaction1</soap:interactionId>-->
<soap:callerId>+972548120901</soap:callerId>
</soap:UpdateIncomingCallsCountRequest>
</soapenv:Body>
</soapenv:Envelope>
Expected Responses
Response Scenario | Example Message |
---|---|
Success | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:UpdateIncomingCallsCountResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:message>message: Success</ns2:message> </ns2:UpdateIncomingCallsCountResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Invalid body parameter(s) | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:UpdateIncomingCallsCountResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Missing or invalid parameter <parameter></ns2:uniqueId> </ns2:UpdateIncomingCallsCountResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Invalid security headers | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>0x7000000</faultcode> <faultstring>Request is unauthorized, missing or wrong credentials</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Token is invalid or missing | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>Validation error</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Campaign does not exist | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:UpdateIncomingCallsCountResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Campaign <campaign id> was not found</ns2:uniqueId> </ns2:UpdateIncomingCallsCountResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Interaction does not exist | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:UpdateIncomingCallsCountResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Interaction <interaction id> was not found</ns2:uniqueId> </ns2:UpdateIncomingCallsCountResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
General error (internal error from the Interact server) | exception (in XML format) |
Comments