In this example, the JavaScript code agentapp.js is included, and a new AgentApp instance is created by calling the AgentApp constructor. The parent element in which the AgentApp component will be shown is passed.
|
In this example, a specific Interaction is started, in which the search bar and the tabs are hidden. The loaded event is registered to get the page loaded. A connection to the Interaction Server is established on port 9090 (which is not the same as the location of the AgentApp), using the specified applicationKey. A callback function, to be run when the Agent Application completes initializations, is also supplied. The function shown here checks whether a direct link to an interaction ID (intId) or a history instance ID (uniqueId) were supplied in the URL, and then calls the appropriate function from the AgentApp API.
|