Jump to: navigation, search

Associate Service

POST /genesys/1/cs/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 /genesys/1/cs/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. This operation's body can include some fields of the Service Start Event for update (for instance, the interaction ID or the resource ID).
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 of application issuing the service event. Refer to Configuration Options for more details on Business Attribute mapping. May be used to group related applications, potentially across resource types.
application_id integer no The unique ID (such as 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 (for example GVP, Agent Desktop, Orchestration). Refer to Configuration Options for more details on Business Attribute mapping.
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 service/state/task, for instance, email, voice, chat, etc. Refer to Configuration Options for more details on Business Attribute mapping.
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 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.

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 7, 2018, at 10:34.
Comments or questions about this documentation? Contact us for support!