Jump to: navigation, search

Start Task

ApiRef2.png POST /services/${service_id}/tasks/start
Available since: 8.0.100.00

Description

This operation starts a task of a given type for the given service. The type is one of the enumerated values recorded for the corresponding business attribute. See Business Attributes in Context Services for further details. UCS assigns auto-incrementing identifiers to states, services, and tasks. For states and tasks, the assigned identifiers are 32-bit integers; for services the identifier is a 64-bit integer.

Operation

ID CV.WS.SRV.8
Method POST
URL /services/${service_id}/tasks/start
Field Name   Type   Mandatory Description
URI Parameters
${service_id} integer yes The unique 64-bit ID of the service.
Body: Task Start Event<ref>This body contains fields from the Task Start Event resources.</ref>
state_id integer no The 32-bit integer ID of the state. See State.
task_type long or string yes The unique ID associated with the type of task, typically the DB ID of a value in a Business Attribute representing customer service tasks for the given organization<ref name="business">

Refer to Configuration Options for more details on Business Attribute mapping.</ref>.

session_id string no The ID of the related session, for instance, the orchestration session or any other business session.
interaction_id string no The ID of the related Genesys interaction. This ID can be used by other Genesys reporting products such as Stat Server, URS, Composer, and GVP.
application_type long or string no The unique ID associated with the type or class<ref name="business"/> of application issuing the service event. May be used to group related applications, potentially across resource types.
application_id integer no The unique ID (Genesys DB ID) for the application issuing the event, such as a GVP VoiceXML application or an Orchestration SCXML application.
resource_type long or string no The unique ID associated with the type or class<ref name="business"/> of resource which provides the service (such as GVP, Agent Desktop, or Orchestration).
resource_id integer no The unique DB ID for the specific resource which provides the service. For instance:
  • the Genesys DB ID of a specific GVP or orchestration platform.
  • the DB ID of a given agent, according to the context.
media_type long or string no The media type<ref name="business"/> applicable to the given task; for instance, e-mail, voice, or chat.
est_duration integer no The estimated task duration in seconds.
timestamp date/time no The UTC time at which the event was raised, with a precision of milliseconds, using the ISO 8601<ref name="ISO 8601">http://en.wikipedia.org/wiki/ISO_8601</ref> representation : [YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z. If the application does not specify this timestamp, the server does it when the event is processed.
<extension name>
Supported since 8.0.2
Extension (single-valued)
or Extension[] (multi-valued)
no Task extension. Your application can add as many task extensions as needed, as long as you created corresponding Extension Schema with the Create Task Extension Schema operation.

<references />

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 201
HTTP message Created
Header Location: ${base_uri}/service/${service_id}/tasks/${task_id}

where:

  • ${base_uri} is the URI of the created service.
  • ${service_id} is the service ID.
  • ${task_id} is the created ID for the new task.
Body {"task_id": ${task_id}}

where:

  • ${task_id} is the task ID.

Example

The following example prerequisites are the creation of an Extension Schema for the "Survey" single-valued extension and one for the "Proposal" multi-valued extension. Operation

POST /services/21456878/tasks/start
{
 "interaction_id":42,
 "est_duration":460,
 "state_id":24,
 "task_type":customer info,
 "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"
	  }
  ]
}

Result

 {"task_id": 15928}
This page was last edited on November 23, 2017, at 14:33.
Comments or questions about this documentation? Contact us for support!