CRM in queue using Puzzel REST API

This article describes how to put a ticket, case etc as a request in queue using the Puzzel REST API.

Authentication

Needed: A Puzzel customer number and user

Curl

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
   "customerKey": "12345", \ 
   "userName": "username", \ 
   "password": "password", \ 
   "clientName": "myCRM", \ 
   "clientVersion": "1.0" \ 
 }' 'https://auth.puzzel.com/api/Authenticate/LogIn'

Request URL

https://auth.puzzel.com/api/Authenticate/LogIn

Refer to https://auth.puzzel.com/swagger/ui/index#!/Authenticate/Authenticate_LogIn for the swagger documentation. 

Response Body

{
  "accessToken": "eyJ...",
  "refreshToken": {
    "customerKey": "12345",
    "sessionId": "12345...",
    "expiryDate": "2024-08-12T21:26:50.51"
  },
  "languageCode": "EN",
  "twoFactorRequired": false,
  "twoFactor": null,
  "logoutFromExternalIdentityProvider": false
}

Add requests in queue using either RequestEtaskAdd or RequestScheduledEtaskAdd

See developer.puzzel.com for more details on both methods.

Curl

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{

  "eTask": {
    "from": "string",
    "to": "string",
    "subject": "string",
    "uri": "string",
    "vipScore": 0,
    "reservedUserId": 123456,
    "reservedUserWaitTime": 0,
    "category": "string",
    "description": "string",
    "variables": [
      {
        "name": "etask_info",
        "value": "string",
        "xdrCopy": true
      }
    ],
    "queueKey": "string",
    "xdrCopy": true
  }

}' 'https://api.puzzel.com/ContactCentre5/12345/etasks'

Request URL

https://api.puzzel.com/ContactCentre5/12345/etasks

Response body

{

"result": 819100048,

"code": 0

}

The result contains the requestId which is required if you wish to later modify this request while in queue for example. Refer to https://developer.puzzel.com/#/Request/RequestEtaskUpdate for methods to update an existing requestId as an example. 

 

Published

Last updated

3
-3