getConfiguration Method
Call this mandatory method to get configuration information that enables the toolbar to evaluate the features supported by Fusion Service. Based on the evaluation, the toolbar informs Fusion Service of any features that must be disabled. For more information, see the disableFeature API method.
Here's a list of the getConfiguration method parameters:
Parameter |
Description |
---|---|
callback |
Returns results to the caller toolbar, and retrieves configuration information in the form of a JSON formatted string. |
configtype |
The type of configuration information returned by Fusion Service. Possible values are TOOLBAR, TOKENS, PAGES, LOOKUP_OBJECTS, ALL, or FA_TOKEN. This is an optional parameter with a default value of TOOLBAR. |
The return value is based on what the configType parameter passes. It includes the agent name along with the other information listed in the following table:
Parameter |
Description |
---|---|
TOOLBAR |
Returns a list of features supported by Fusion Service. It also returns information about the toolbar, such as whether it's enabled, and if so, its dimensions. These values are preconfigured, but you can set up and modify them using Functional Setup Manager. |
TOKENS |
Returns information about both system and user-defined tokens. You can set up and modify these values using Functional Setup Manager. |
PAGES |
Returns information about both system and user-defined screen pop pages, including code, name, parameters, and associated tokens. You can set up and modify these values using Functional Setup Manager. |
LOOKUP_OBJECTS |
Returns information about business objects that are used to perform reverse lookup. Returns information about both system and user-defined screen pop pages, including code, name, parameters, and associated tokens. You can set up and modify these values using Functional Setup Manager. |
ALL |
Returns all of information as the other configType
values, except that of |
FA_TOKEN |
Returns a JWT token to be used by toolbar implementation to authenticate against Fusion Service when calling the REST APIs. A specific call to this configType is required to obtain the JWT token. |
Here's sample code to call the getConfiguration
method
<html>
<head>
<script type="text/javascript" src="http://domain:port/ora_support/js/mcaInteractionV1.js">
</script>
<script type="text/javascript">
function callGetConfiguration() {
svcMca.tlb.api.getConfiguration(function (response) {
if (response.result == 'success') {
alert('Success! Configuration is: ' + response.configuration);
} else {
alert('Operation finished with error: ' + response.error);
}
});
}</script>
</head>
<body>
<input type="button" value="Configuration" onclick="callGetConfiguration()"/>
</body>
</html>
Here's a sample response for configuration data with
configType LOOKUP_OBJECTS
{
"lookupObjects":[
{"name":"ServiceRequest"},
{"name":"Account"},
{"name":"Contact"}
]
}
Here's a sample response for configuration data with
configType FA_TOKEN
{
" faTrustToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6Im9ZcTdYODhqNXZwYWd3R2t2UGpMWjgxcloxdyJ9eyJleHAiOjE0MDg1NDAxMDIyNjEsImlzcyI6Ind3dy5vcmFjbGUuY29tIiwicHJuIjoiQ1VTVF9TRVJWSUNFX01HUiIsImlhdCI6MTQwODUyNTcwMjI2MX0TkJRAeQbF3xqG0IFZ0oy44aOJKMCpJ0CTxj5Iq19YKe6BAziydxlKTN8lwyr3YbcITqju-fU-i8vFx_XXx9E3iI9l5L_VDlVkXh96CLQPRYa5kW-ruLYeDOhhQL4M7ke8vPMArEp5rPoEOhJXnXYKKTJpCmE5RqJ_Zx00nPxJTY"
}