This chapter provides a general specification for Config Client type network service.  It contains these sections:

·       Service Overview

·       Service Specific Information

·       Service Requests and Responses

·       Service Events

·       Session Resource

·       Session Resource Requests and Responses

·       Session Resource Events

Service Overview

The Config Client Service provides read-only access to Config Server information.  Each Harmony software component, from MediaBar to Integration Server, retrieves it's configuration information from this service.  The service can be referenced with the type "com.openmethods.ep.config.service".

Service Specific Information

Each registered service has information specific to its service type, vendor, or instance.  This information is available through the getServices Core Request or as part of the events produced by the Service Monitor Service.

{

"vendor", "OpenMethods",

"version", "17.1.0"

}

Service Requests and Responses

This section documents the requests used to retrieve configuration information and the responses that will be returned.

getAgentConfiguration

The getAgentConfiguration request is used by MediaBar client to negotiate the agent related configuration based on what information is available and what information will need to be collected from the user to determine the final configuration data that will be used for that user's session.

The "model" property identifies which call model should be used for the agent session.  If this property is missing or blank, the default model will be used.  The "override" property determines what will happen if there is already a session underway for the given agent.  A value of false will generate a confirmation type response if a session exists.  A value of true will forcefully destroy the existing session and create a new one.

It is recommended that clients initially use a value of false for this property and allow the user to decide if they want to destroy the session.  If the user requests the session be removed, the client would send a second request with a value of true for the "override" property.

Request

{

"command": "getAgentConfiguration",

"data":

{

"customerId": "[customer-identifier]",

"crmInstanceId": "[crm-instance-identifier]",

"crmUsername": "[crm-username]",

"ctiEnvironmentId": "[cti-environment-identifier]",

"ctiAgentId": "[cti-agent-identifier]"

}

}

Partial Match Response – Multiple Environment Options

{

"command": "getAgentConfiguration",

"result": "partial",

"data":

{

"customerId": "[customer-identifier]",

"crmInstanceId": "[crm-instance-identifier]",

"crmUsername": "[crm-username]",

"ctiEnvironmentOptions":

[

{

"ctiEnvironmentId": "[cti-environment-id]",

"ctiEnvironmentName": "[cti-environment-name]",

"ctiEnvironmentType": "[cti-environment-type]",

"ctiEnvironmentTypeName": "[cti-environment-type-name]",

"ctiAgentOptions":

[

{

"ctiAgentId": "[cti-agent-id]",

"ctiAgentUsername": "[cti-agent-username]",

"ctiAgentAskPassword": true | false,

"ctiAgentPassword": "[cti-agent-password]"

}

]

}

]

}

}

Partial Match Response – Multiple Agent Options

{

"command": "getAgentConfiguration",

"result": "partial",

"data":

{

"customerId": "[customer-identifier]",

"crmInstanceId": "[crm-instance-identifier]",

"crmUsername": "[crm-username]",

"ctiEnvironmentId": "[cti-environment-id]",

"ctiEnvironmentName": "[cti-environment-name]",

"ctiEnvironmentType": "[cti-environment-type]",

"ctiEnvironmentTypeName": "[cti-environment-type-name]",

"ctiAgentOptions":

[

{

"ctiAgentId": "[cti-agent-id]",

"ctiAgentUsername": "[cti-agent-username]",

"ctiAgentAskPassword": true | false,

"ctiAgentPassword": "[cti-agent-password]"

}

]

}

}

Success Response

{

"command": "getAgentConfiguration",

"result": "success",

"data":

{

"customerId": "[customer-identifier]",

"customerName": "[customer-name]",

"extensions":

[

{

"namespace": "[namespace]",

"data":

{

<extension data structure>

}

}

],

"crmInstance":

{

"crmInstanceId": "[crm-instance-identifier]",

"crmInstanceName": "[crm-instance-name]",

"extensions":

[

{

"namespace": "[namespace]",

"data":

{

<extension data structure>

}

}

]

},

"ctiEnvironment":

{

"ctiEnvironmentId": "[cti-environment-id]",

"ctiEnvironmentName": "[cti-environment-name]",

"ctiEnvironmentType": "[cti-environment-type]",

"ctiEnvironmentTypeName": "[cti-environment-type-name]",

"extensions":

[

{

"namespace": "[namespace]",

"data":

{

<extension data structure>

}

}

],

"ctiAgent":

{

"ctiAgentId": "[cti-agent-id]",

"ctiAgentUsername": "[cti-agent-username]",

"ctiAgentAskPassword": true | false,

"ctiAgentPassword": "[cti-agent-password]"

"extensions":

[

{

"namespace": "[namespace]",

"data":

{

<extension data structure>

}

}

],

"reasonCodes":

[

{

"id": "[reason-code-id]",

"code": "[reason-code-value]",

"name": "[reason-code-name]",

"description": "[reason-code-description]"

}

]

"interactionDispositions":

[

{

"id": "[disposition-id]",

"text": "[disposition-text]",

"description": "[disposition-description]"

}

]

}

}

}

}

Failure Response

{

"command": "getAgentConfiguration",

"result": "failure",

"failure":

{

"code": "[error-code-for-failure]",

"message": "[error-message]",

"context": "[stack-trace-if-applicable]"

}

"original":

[Contains the original getAgentConfiguration request JSON structure]

}

Secondary Events

This request should not generate any secondary service events.

Service Events

The Config Client type service does not generate service events.