Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

The appConfig.js object


You can control the behavior and appearance of your self-hosted Flex UI instance by specifying configuration properties in a Javascript object housed within a file named appConfig.js.

This file must be made accessible on your Flex UI server at the location:


_10
public/assets/appConfig.js

The Flex UI application attempts to load the appConfig.js file from your server at startup. Flex UI then fetches your account's current Configuration resource via the Flex Configuration REST API, and merges any properties found in the ui_attributes field with the properties defined in appConfig.js to determine the app's effective configuration. Values defined in your server's appConfig.js take precedence over corresponding values defined in ui_attributes via the REST API.

See the REST API configuration guide to learn more about the Flex Configuration REST API.

(information)

Info

The appConfig.js object is only directly accessible if you are running a self-hosted instance of Flex UI. If you are not running a self-hosted Flex instance (i.e. if you access Flex at https://flex.twilio.com(link takes you to an external page)), use the Flex Coniguration REST API to manage your Flex instance's configuration.


Configuration properties

configuration-properties page anchor

To see a complete list of fields you can specify in the configuration object, check out the Flex UI reference docs for the major version of Flex UI that you are using:


This is example content for a valid Flex UI 2.x appConfig.js file.


_29
var appConfig = {
_29
serviceBaseUrl: "https://dancing-owl-1234.twil.io/",
_29
sso: {
_29
accountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_29
},
_29
sdkOptions: {
_29
chat: {},
_29
insights: {},
_29
voice: {},
_29
worker: {}
_29
},
_29
logLevel: "debug",
_29
theme: {
_29
isLight: false
_29
},
_29
componentProps: {
_29
CRMContainer: {
_29
uriCallback: (task) => task
_29
? `https://www.bing.com/search?q=${task.attributes.name}`
_29
: "http://bing.com"
_29
}
_29
},
_29
router: {
_29
type: "memory",
_29
history: {
_29
initialEntries: [ "/agent-desktop" ]
_29
}
_29
}
_29
};


Rate this page: