Jump to: navigation, search

Start State

POST /genesys/1/cs/services/${service_id}/states/start

Description

Starts a service state of a given type for a given service. UCS assigns auto-incrementing identifiers to the states, just like to services and tasks. States and tasks are assigned 32-bit identifiers.

Operation

ID CV.WS.SRV.5
Method POST
URL /genesys/1/cs/services/${service_id}/states/start
Name   Type   Mandatory Description
URI Parameters
${service_id} integer yes The service ID is specified in the request URI.
Body: State Start Event. This body contains fields from the State Start Event resource.
state_type long or string no The unique ID associated with the state type. Typically, the DB ID of a value in the Service Type Business Attribute.

Refer to Configuration Options for more details on Business Attribute mapping. Enumerated values could be one of the following:

  1. Customer identification
  2. Service identification
  3. Assign service agent
  4. Waiting for service agent
  5. Offering another service while waiting for agent
  6. Offering callback
  7. Callback pending
  8. Delivering service
  9. Waiting for customer input
  10. Offering another service while delivering service
previous_state_id integer no The ID of the previous state.
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 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 service 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 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 applicable to the given state; for instance, email, voice, or chat.
est_duration integer no The estimated state 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 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 key> Any JSON type no State 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 201
HTTP message Created
Header Location: /genesys/1/cs/services/${service_id}/states/${state_id}

where:

  • ${service_id} is the service ID.
  • ${state_id} is the ID of the created state.
Body {"state_id": ${state_id}}

where:

  • ${state_id} is the stateID.

Example

Operation

POST  /genesys/1/cs/services/12345/states/start
{
 "interaction_id":"51",
 "application_type":400,
 "application_id":40,
 "resource_type":200,
 "resource_id":20,
 "media_type":2,
 "est_duration":60,
 "state_type":100,
 "Feedback": 
  {
   "FeedbackType":"survey",
   "rating":7,
   "notes":"warm welcome at frontdesk, thanks for the nice trip"
  },
 "Satisfaction": [
  {
   "rating":2,
   "pertinence":8,
   "usefull":true,
   "place":"Terranova mexico resort"
  },
  {
   "rating":8,
   "pertinence":4,
   "usefull":false,
   "place":"Fancy resort Paris"
  }
  ]
} 

Result

 {"state_id": 1258276}

Feedback

Comment on this article:

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