Jump to: navigation, search

Merge Extension Data

  • PUT /genesys/1/cs/services/${service_id}/extensions/${ext_name}/merge
  • PUT /genesys/1/cs/services/${service_id}/states/${state_id}/extensions/${ext_name}/merge
  • PUT /genesys/1/cs/services/${service_id}/tasks/${task_id}/extensions/${ext_name}/merge

Added in: 8.5.110

Description

Updates an extension with the provided key-value pair or creates a new one if the extension does not exist in the given Service, State, or Task. If the extension exists, the system will add the new key-value pair without overwriting the extension's content.


Tip
Use this API to update extensions without reading them first and then calling one of the regular update Update Service Extension, Update State Extension, and Update Task Extension APIs.

Operation

Merge or create Service, State, Task extension data
  • PUT /genesys/1/cs/services/${service_id}/extensions/${ext_name}/merge
  • PUT /genesys/1/cs/services/${service_id}/states/${state_id}/extensions/${ext_name}/merge
  • PUT /genesys/1/cs/services/${service_id}/tasks/${task_id}/extensions/${ext_name}/merge
Field Name   Type   Mandatory Description
URI Parameters
${service_id} Integer yes The ID of the service.
${state_id} Integer yes The ID of the state.
${task_id} Integer yes The ID of the task.
${ext_name} String yes The extension name.
Body Parameters
<extension> or <extension>[] JSON yes The attached data to merge as key-value pairs or as an array of key-value pairs.

You can merge maps, such as:

"${ext_name}": { "offer_name":"VIP credit card black ed.", "type":9, "comments":"proposed to all client" }

This query will not work with extension lists such as:

{ext_name}": [
{ "offer_name":"VIP credit card black ed.", "type":9, "comments":"proposed to all client" },
{ "offer_name":"VIP credit card black ed.", "type":9, "comments":"proposed to all client" }
]


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

Example

Operation to update a service extension
In this scenario, the first PUT request creates an extension, then the POST request merges its extension data with new data, then the GET request queries the service.

PUT /genesys/1/cs/services/8389/extensions/agent{
    "agentID": 2025,
    "score": 85,
    "extensions": [
        "2281",
        "2284"
    ],
    "location": "Toronto"
}

PUT /genesys/1/cs/services/8389/extensions/agent/merge
{ "extensions": [ "228144", "228444" ], "location": "Markham"}

Result

GET /genesys/1/cs/services/8389?extensions=agent 
HTTP 200 OK{
    "service_id": 3005,
    "service_type": 100,
    "est_duration": 300,
    "agent": {
        "agentID": 2025,
        "score": 85,
        "extensions": [
            "228144",
            "228444"
        ]
"location": "Markham"
    }
}
This page was last edited on July 7, 2017, at 11:57.
Comments or questions about this documentation? Contact us for support!