Jump to: navigation, search

Associate Service

POST /customers/${customer_id}/services/${service_id}


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.


Prerequisites The service is started, see Start Service.
Associate a service with a customer
Method POST
URL /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 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 n>
Supported since 8.0.2
Extension (single-valued)
or Extension[] (multi-valued)
no Service extensions, where <extension n> corresponds to the unique name of the service extension. Your application can specify as many extensions as needed as long as you defined their schemas with the Create Service Extension Schema operation.

<references />


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 200


The following code sample associates the customer with a service, and specifies records for the predefined "Feedback" single-valued extension, and for the "Satisfaction" multi-valued extension.

POST /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,
          "notes":"warm welcome at frontdesk, thanks for the nice trip"
 "Satisfaction": [
          "place":"Terranova mexico resort"
          "place":"Fancy resort Paris"


200 OK
This page was last edited on November 23, 2017, at 16:00.
blog comments powered by Disqus