Jump to: navigation, search

Associate Service

CSAPIProxyGMS.png POST {base_uri}/customers/${customer_id}/services/${service_id}

Description

Your application can use this operation after the service was created with the Start Service operation to associate an Anonymous Service with a customer, or to associate the service with a different customer. This operation overrides prior associations. For example:

  1. Associate 'service 1' with 'customer 1'
  2. Associate 'service 1' with 'customer 2'

Result: 'service 1' no longer appears in the active or completed service history of 'customer 1'. See Query Services for further information. This operation can also update some fields of the service resource in the body of the request. In 8.0.2, your application can specify values for extensions (single-valued and multi-valued). If your application already recorded a value or a set of values for a given extension, the previous record is replaced with the new one.

Operation

Prerequisites The service is started, see Start Service.
Associate a service with a customer
ID CV.WS.SRV.2
Method POST
URL {base_uri}/customers/${customer_id}/services/${service_id}
Name   Type   Mandatory Description
URI Parameters
${customer_id} string yes The ID of the customer.
${service_id} integer yes The ID of the service.
Optional Body: Service Start Event<ref> This operation's body can include some fields of the Service Start Event for update (for instance, the interaction ID or the resource ID).</ref>
service_type long or string no The unique ID associated with the type of service, typically the DB ID of a value in the Service Type Business Attribute.

Refer to Configuration Options for more details on Business Attribute mapping.

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">

Refer to Configuration Options for more details on Business Attribute mapping.</ref> of application issuing the service event. May be used to group related applications, potentially across resource types.

application_id integer no The unique ID (e.g. 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 (e.g. GVP, Agent Desktop, 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 service/state/task, for instance, e-mail, voice, chat, etc.
est_duration integer no The estimated service/state/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 key> Any JSON type no Service attached data as key-value pairs. You can add as many key-value pairs as needed.

<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 200
HTTP Title OK

Example

Operation
The following code sample associates the customer with a service, and specifies attached data as json arrays for "Feedback" and "Satisfaction".

POST http://localhost:8080/genesys/1/cs/customers/0004Va58A92T0018/services/1500
{  
 "timestamp": "2009-05-12T12:05:12.145Z",
 "interaction_id": "123ABCAADFJ1259ACF",
 "media_type": 1,
 "resource_id": 5005,
 "resource_type": 2,
 "disposition": 10,
 "Feedback": 
  { 
          "FeedbackType":"survey",
          "rating":7,
          "notes":"warm welcome at frontdesk, thanks for the nice trip"
  },
 "Satisfaction": [
  {
          "rating":2,
          "pertinence":8,
          "useful":true,
          "place":"Terranova mexico resort"
  },
  {
          "rating":8,
          "pertinence":4,
          "useful":false,
          "place":"Fancy resort Paris"
  }
 ]
}

Result

200 OK
This page was last edited on September 12, 2016, at 14:01.
Comments or questions about this documentation? Contact us for support!