Maintenance Notice - PDF Generation
Dynamic PDF generation for web-based content is temporarily unavailable. This maintenance affects dynamic PDF files that are generated from either the HTML-based page or manual that you are viewing. Links that normally allow this functionality have been hidden, and will reappear as soon as the feature is restored.


Note: Access to static files, including PDF files that are not dynamically generated from our web-based content, is unaffected.

Jump to: navigation, search

Start State

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

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 /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<ref>This body contains fields from the State Start Event resource.</ref>
state_type long or string yes The unique ID associated with the state type. Typically, the DB ID of a value in the Service Type Business Attribute<ref name="business">

Refer to Configuration Options for more details on Business Attribute mapping.</ref>. 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<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 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<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 state; for instance, e-mail, 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<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 State extension. Your application can add as many state extensions as needed, as long as you created corresponding Extension Schema with the Create State 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}/states/${state_id}

where:

  • ${base_uri} is the URI of the created service.
  • ${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 /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}
This page was last edited on November 23, 2017, at 14:11.

Feedback

Comment on this article:

blog comments powered by Disqus