Jump to: navigation, search

Query Services

ApiRef2.png
  • GET /services/anonymous/${contact_key}
  • GET /customers/${customer_id}/services

Description

The operations on this page allow users to query for active and/or completed services, either for a specific customer or for anonymous services matching a contact key. The latter case primarily addresses service resumption use cases for services in which the customer is not yet identified. For example, consider the following:

  • The customer calls in from phone number 408-832-7799.
  • The application starts a service, noting contact key "408-832-7799" for further reference.
  • The application is not able to identify the caller based on the phone number.
  • IVR identifies that the customer is calling to set up a new wireless account.
  • The customer is placed in an agent queue. After 10 minutes, the call is dropped.
  • The customer calls back in from the same number. The application still cannot identify the customer based on that number.
  • The application looks up whether there are any outstanding services with identification token "408-832-7799"--one is returned.
  • The application asks the customer whether he or she is calling back in regards to the previous request or for a new wireless request. Upon confirmation, the customer is placed back in the agent queue.

Operations

Query Anonymous Services

Important.png This operation queries anonymous services only.

ID CV.WS.SRV.10
Method GET
URI
  1. Active: /services/anonymous/${contact_key}/active
  2. Completed: /services/anonymous/${contact_key}/completed
  3. All: /services/anonymous/${contact_key}
Field Name   Type   Mandatory Description
URI Parameters
${contact_key} string yes The "contact key" is supplied at the service creation if the service is started before the customer's identification. This key can be used to look up the service with this method, or for further association once the customer is identified (see Associate Service).
started_from date/time<ref name="ISO 8601">http://en.wikipedia.org/wiki/ISO_8601 representation : [YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z</ref> no Filters the services started on or after the given date/time.
started_to date/time no Filters the services started prior to the given date/time.
completed_from date/time<ref name="ISO 8601"/> no Filters the services that were completed on or after the given date/time. Only applicable when querying service history.
completed_to date/time<ref name="ISO 8601"/> no Filters the services completed prior to the given date/time. Only applicable when querying service history.
service_type integer no Filters the services by the application-defined service type<ref name="business">

Refer to Configuration Options for more details on Business Attribute mapping.</ref>. your application can specify several types separated by a comma, as follows: service_types=1,3,45

active_states bool no
  • "true" to include information on the service's active states in the results.
  • "false" by default.
active_tasks bool no
  • "true" to include information on the service's active tasks in the results.
  • "false" (default).
completed_states bool no
  • "true" to include information on the service's completed states in the results.
  • "false" (default).
completed_tasks bool no
  • "true" to include information on the service's completed tasks in the results.
  • "false" (default).
extensions
Supported since 8.0.2
string no Name or list of names for the service extension to return with the matching service resources. You can specify as multiple extension names separated by commas, as follows: extensions=Purchase,Feedback.

By default, no extensions are returned.

<references />

Query Customer Services

Important.png This operation queries services which are not anonymous, that is, services which are associated with a customer id.

ID CV.WS.SRV.10
Method GET
URIs
  1. Active Services: /customers/${customer_id}/services/active
  2. Completed Services: /customers/${customer_id}/services/completed
  3. All Services: /customers/${customer_id}/services
Parameter   Type   Mandatory Description
URI Parameters
${customer_id} string yes The Customer ID, to get associated active or completed services. Note that a customer can be associated with a service either at the service creation or later in the process (see Associate Service).
started_from date/time<ref name="ISO 8601">http://en.wikipedia.org/wiki/ISO_8601 representation : [YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z</ref> no Filters the services started on or after the given date/time.
started_to date/time<ref name="ISO 8601"/> no Filters the services started prior to the given date/time.
completed_from date/time<ref name="ISO 8601"/> no Filters the services that were completed on or after the given date/time. Only applicable when querying service history.
completed_to date/time<ref name="ISO 8601"/> no Filters the services completed prior to the given date/time. Only applicable when querying service history.
service_type long or string no Filters the services by the application-defined service type<ref name="business">

Refer to Configuration Options for more details on Business Attribute mapping.</ref>.

active_states bool no
  • "true" to include information on the service's active states in the results.
  • "false" by default.
active_tasks bool no
  • "true" to include information on the service's active tasks in the results.
  • "false" (default).
completed_states bool no
  • "true" to include information on the service's completed states in the results.
  • "false" (default).
completed_tasks bool no
  • "true" to include information on the service's completed tasks in the results.
  • "false" (default).
extensions
Supported since 8.0.2
string no Name or list of names for the service extension to return with the matching service resources. You can specify several extension names separated by commas, as follows: extensions=Purchase,Feedback.

By default, no extensions are returned.

<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 message OK
Body Service[].

Example

Operation

GET /customers/ABC1234/services/active?active_states=true

Response

  [ // returned in an array
   { "customer_id": "ABC1234",
    "service_id": 4692834,
    "est_duration": 86400,
    "started": {
     "timestamp": "2009-05-07T12:05:20.157",
     // additional [https://docs.genesys.com/Documentation/CS/8.1.x/API/StartEventList#Service_Start_Event Start Event] fields
   }, 
   "active_states":
    [// included given specification of "results" attribute
     { // array of one or more State objects
      "state_id": 5005,
      "state_type": 8, // service delivery
      "started": {
        "timestamp": "2009-05-07T12:08:53.298",
        // additional [https://docs.genesys.com/Documentation/CS/8.1.x/API/StartEventList#Service_Start_Event Start Event] fields
       }
     }
    ]
  }]

Note that, in the above example, the inline State objects do not include active/completed tasks.

This page was last modified on November 23, 2017, at 07:10.

Feedback

Comment on this article:

blog comments powered by Disqus