Jump to: navigation, search

Query Task by ID

GET /genesys/1/cs/services/${service_id}/tasks/${task_id}

Description

Queries a task by its ID for the given service.

Operation

ID CV.WS.SRV.16
Method GET
URL /genesys/1/cs/services/${service_id}/tasks/${task_id}
Name   Type   Mandatory Description
URI Parameters
${service_id} integer yes The service ID.
${task_id} integer yes The task ID.
<extension key> Any JSON type no Task attached data as key-value pairs. You can add as many key-value pairs as needed.

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP message OK
Field Name   Type   Mandatory Description
Body: Task<ref>This response includes the Task representation associated with the task ID.</ref>
state_id integer no The 32-bit integer ID for the state service associated with the task.
task_id integer yes The 32-bit integer ID of the task, assigned by the UCS when the task is started.
task_type long or string yes The unique ID associated with the type of service<ref name="business">Refer to Configuration Options for more details on Business Attribute mapping.</ref>. For instance, this ID can be the DB ID of a value in the Service Type Business Attribute.
service_id integer yes if not specified in top-level resources<ref name="toplevel">Only top-level representations include this field. For instance, if your application retrieves a service which includes nested states and tasks, only the top-level service representations contains this ID.</ref> The service's unique ID if the task is not part of a top-level state or service resource which includes a service ID.
started Task Start Event yes Related start event.
This start event does not contain the "est_duration" field, if this field is already specified at the task level.
completed Task End Event no The related end event if this task is completed.
This end event does not include the "disposition" and "disposition_desc" fields if they are already specified at the task level.
customer_id string no The customer's unique ID<ref name="toplevel"/>.
est_duration integer no The estimated time for completing the item, in seconds.
duration integer no The total duration in milliseconds.
Only relevant for completed tasks.
disposition long or string no ID of the Business Disposition ID<ref name="business"/>.
Only relevant for completed tasks.
disposition_desc string no The reason for assigning the business disposition with the service element. Limited to 256 characters.
<extension key> Any JSON type no Task attached data as key-value pairs. You can add as many key-value pairs as needed.

<references />

Example

Operation

 GET /genesys/1/cs/services/942/tasks/12?extensions=Survey,Proposal

Result

{
 "interaction_id":42,
 "est_duration":460,
 "state_id":24,
 "task_type":55,
 "Survey": 
  {
   "url":"http://ourServer/storage/userAnswers",
   "question1":7,
   "question2":true,
   "question3":"will be better with cable tv and on-demand video"
  },
  "Proposal": [
   {
    "car type":"cabriolet",
    "price":25 000,
    "seats":2,
    "comments":"200 cv, hardtop"
   },
   {
    "car type":"S.U.V.",
    "price":70 000,
    "seats":8,
    "comments":"4wd, leather seats"
   }
   ]
}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on September 7, 2018, at 02:34.