Start State
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:
|
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:
|
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 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 HTTPResponseCodesandErrors for further details on the possible codes that this operation can return.
HTTP code | 201 |
---|---|
HTTP message | Created |
Header | Location: ${base_uri}/service/${service_id}/states/${state_id}
where:
|
Body | {"state_id": ${state_id}}
where:
|
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 16:00.
Comments or questions about this documentation? Contact us for support!