Etask API doc

User Story

Consider that you are a company using a CRM or any other systems, containing customer details and a list of actions/processes that needs to be executed towards serving the customer or performing a generic task like generating reports.

These operations may be required to be done now or sometime in the future. All future tasks piled up in your system needs to be distributed to agents or queues through an intelligent routing mechanism so that the task gets assigned to the rightly skilled agent at the designated day and time.

In this scenario, your system can trigger actions that needs agent’s attention using Puzzel’s Intuitive routing engine for purposes of allocation of a given task to an appropriate skilled agent in a nominated queue or to an appointed agent.

You will have the visibility of End to end task execution, follow ups if necessary and update the status of the task or delete it from the queue.

To do this, you need to...

Add a request:

You need to add a request to the Puzzel routing engine which could be in the form of an email or scheduled task.

Post /{customerKey}/requests

Where customerKey is the customer number in the Puzzel solution

Try it yourself

Example code for RequestAdd is shown below:

{
"data": "{"From":"sender@emailaddress.com","To":"email@youraccesspoint.com","Subject":"YourSubject","Uri":"http://YourCRMDomain.com","VipScore": 100, "reservedUserId": 123456, "reservedUserWaitTime": 3600}",
"type": "mail",
"version": “1.0”
}
Variable Type Description
Data String Contains a list of details such as:
From: Sender’s email address
To: Puzzel’s access point to which the request has to be sent. This access point will typically have a queue mapped to it.
Subject: description of the task
URI: the location where the request is/will be accessible to the agent.
VipScore : determines the priority of the task in the queue. For more details on how to calculate the Vip score read https://help.puzzel.com/hc/en-us/articles/115003721969-Services-Queues
reservedUserId : Unique user id for he agent in Puzzel platform
reservedUserWaitTime: The duration in seconds for which this task will be held for the agent. If not accepted within the allotted time, it will be offered to anyone that has a similar skillset in the queue.
Type String Information type, in this case mail.
Version String Version number of the API

Optionally you can also add name and Key value details that may be relevant to this request which may be displayed to the agent or used for additional routing logic.

To try out this API, you can go to https://developer.puzzel.com/#/Request/RequestAdd

Response:

Result will be a request id of type integer and message.

Get details of a request

If you wish to fetch the details of a task before updating or deleting it, you can use RequestGet method to do it.

Get /{customerKey}/requests/{requestId}

where customerKey is the customer number in the Puzzel solution, requestId is the integer value identifying the request.  

To try out this API, you can go to https://developer.puzzel.com/#/Request/RequestGet

Response:

Returns the following parameters along with others 

Variable Type Description
requestStart Date-time string Time at which request was submitted
queueEntryTime Date-time string Time at which the request entered the queue
sessionTime Date-time string Total time of the request in the queue from the time it was submitted to the time it was queried
joined boolean Tells if the request has been accepted by an agent
Status String The step in the allocation process of the request. Status can be any one of these states: Alerting, Allocated, Busy, CallbackInQueue, Connected, Connecting, Disconnected, Failure, InQueue, InService, NoAnswer, OnHold, Searching, Setup.
Media Type String Can be any of these types: Undefined, Phone, EMail, Sms, Web, Chat, Social
queuePosition Integer The current position of this request in the current queue, if waiting in the queue to be answered
iqSessionId   Unique sessionid for this interaction in the Puzzel platform.
variables Object Key value pairs that may exist for this request.

Update a request:

In the scenario where you wish to check the progress of the task and escalate or modify it, if no action has been performed for a certain amount of time(i.e still in the queue waiting to be answered), then you may need to send in a request to update the status of the request.

Post /customers/{customerKey}/requests/{requestId}/update

Where customerKey is the customer number in the Puzzel solution, requestId is the integer value received from the response of RequestAdd API.

Try it yourself

Example code for requestUpdateObject:

“requestUpdateObject": {
   	 "vipScore": 0,
   	 "reservedUserId": 0,
    	"reservedSecondsFromNow": 0,
    	"additionalInfoSubject": "string",
    	"additionalInfoUri": "string",
}
Variable Type Description
vipScore Integer vipScore : determines the priority of the task in the queue. For more details on how to calculate the Vip score read https://help.puzzel.com/hc/en-us/articles/115003721969-Services-Queues
reservedUserId Integer Displays the UserId of the current user the task is assigned to. You can then change the UserId to assign it to a different user.
reservedSecondsFromNow Integer Reserve the task for this user for a specific amount of time in seconds
additionalInfoSubject String Add additional message for example : urgent or important
additionalInfoUri String Change the location of where the task is/will be accessible to the agent.

To try out this API, you can go to https://developer.puzzel.com/#/Request/RequestUpdate

Response:

Returns the request id of the request that has been updated

Delete a request:

If your system no longer wants a request in the queue or delete from a queue and reassign it to the other, the request is served and closed outside of Puzzel, then you may want to delete it.

Post /{customerKey}/requests/{requestId}/delete

Where customerKey is the customer number in the Puzzel solution, requestId is the integer value received from the response of RequestAdd API.

Try it Yourself:

Example code for RequestDelete

“RequestDelete”:{
  "forceDelete": true
}

To try out this API, you can go to https://developer.puzzel.com/#/Request/RequestDelete

Response:

Returns an integer value “code” to say if deletion was successful and the “id” which is the request id of the requested string.

Published

Last updated

8
-2