Difference between revisions of "PEC-Developer/Current/SCAPI/ConfigurationNamespace"
Line 36: | Line 36: | ||
{{!}}options | {{!}}options | ||
{{!}}string | {{!}}string | ||
− | {{!}}An array of configuration options or sections to return. Unless otherwise specified, the API | + | {{!}}An array of configuration options or sections to return. Unless otherwise specified, the API returns options from the '''[interaction-workspace]''' section by default. You can specify any of the following: |
*A single option: <tt>genesys.wwe.service.configuration.getOption('voice.auto-answer', succeeded, failed)</tt> | *A single option: <tt>genesys.wwe.service.configuration.getOption('voice.auto-answer', succeeded, failed)</tt> | ||
Line 66: | Line 66: | ||
{{!}}- | {{!}}- | ||
!Description | !Description | ||
− | {{!}}Get configuration options and values in the context of this interaction when they are overridden by a routing strategy. If the interaction is not found or this parameter is missing, the API throws an exception. | + | {{!}}Get configuration options and values in the context of this interaction when they are overridden by a routing strategy. If the interaction is not found or this parameter is missing, the API throws an exception. Note: The getContextualOption method can be applied to any option, even if the option doesn’t support overriding options with a routing strategy in Workspace Web Edition. Only Workspace Web Edition options with the following text in their descriptions can be overridden by a routing strategy: "This option can be overridden by a routing strategy as described in this [https://docs.genesys.com/Documentation/HTCC/8.5.2/IWWDep/OverridingInteractionWorkspaceOptions Configuration Guide]." Using the getContextualOption method doesn’t interfere with how Workspace Web Edition handles options. |
{{!}}- | {{!}}- | ||
!Parameters | !Parameters |
Revision as of 12:45, July 4, 2022
Contents
Learn about the Configuration namespace methods and type definitions in the Service Client API.
Methods
The Configuration namespace includes the following methods:
getOption
Signature | <static> getOption(options) → {Array.<Section>} | ||||||
---|---|---|---|---|---|---|---|
Description | Get configuration options and values for a specific option name or a subset of options from the [interaction-workspace] section or a custom section. | ||||||
Parameters |
| ||||||
Returns | Array.<Section> |
getContextualOption
Signature | <static> getContextualOption(options, interactionId) → {Array.<Section>} | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Get configuration options and values in the context of this interaction when they are overridden by a routing strategy. If the interaction is not found or this parameter is missing, the API throws an exception. Note: The getContextualOption method can be applied to any option, even if the option doesn’t support overriding options with a routing strategy in Workspace Web Edition. Only Workspace Web Edition options with the following text in their descriptions can be overridden by a routing strategy: "This option can be overridden by a routing strategy as described in this Configuration Guide." Using the getContextualOption method doesn’t interfere with how Workspace Web Edition handles options. | |||||||||||||||
Parameters |
| |||||||||||||||
Returns | Array.<Section> |
Type definitions
The Configuration namespace includes the following object types:
Section
Description | Represents the JSON structure of a configuration section. Each section includes a list of key/value pairs for the matching option(s). | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | Object | |||||||||
Properties |
|
Examples
Consider the following scenario:
- You set
interaction-workspace/interaction.case-data.frame-color"="#FFBA00"
. - You also set the override option key:
"interaction-workspace/interaction.override-option-key"="IW_OverrideOptions"
. - An interaction arrives with the attached data
"IW_OverrideOptions"="CaseDataColor"
. - The transaction object "CaseDataColor" annex has the option
"interaction-workspace/interaction.case-data.frame-color"="#FF000088"
.
Here's how this scenario would look for each of the Configuration namespace methods:
getContextualOption()
Use getContextualOption() to get the option:genesys.wwe.service.configuration.getContextualOption("interaction.case-data.frame-color", "1", succeeded, failed)
{
"request": "configuration.getContextualOption",
"data": {
"interaction-workspace": {
"interaction.case-data.frame-color": "#FF008000"
}
},
"userAgent": "WWE Server",
"protocolVersion": 2
}
{
"request": "configuration.getContextualOption",
"errorMessage": "Error: Interaction not found.",
"userAgent": "WWE Server",
"protocolVersion": 2
}
getOption()
Use getOption() to get the option::genesys.wwe.service.configuration.getOption("interaction.case-data.frame-color", succeeded, failed)
{
"request": "configuration.getOption",
"data": {
"interaction-workspace": {
"interaction.case-data.frame-color": "#FFBA00"
}
},
"userAgent": "WWE Server",
"protocolVersion": 2
}