Skip to main content

Deployment Script (Solo Journey)

Embedding the Deployment Script to your website is pretty straightforward. Follow these steps to load the Solo Journey onto your webpage.


Step 01

Place this code in the <head> section of the HTML page.

<script id="a8_solo_script" src="https://<client>.autonom8.com/solo/main.bundle.js"></script>

Step 02

Place this code within the <body> of the HTML page.

const config = 
{
dimension: { width: <e.g. 400>, height: <e.g. 600> },
renderDomId: 'a8_solo_widget',
flowName: '<Your Flow Name>',
apiKey: '<Your API Key>',
orgName: '<Your Org Name>',
appId: '<Your App ID>',
isLive: false,
variables: { "stage": {"type":"string","value":"approval"} }
};
window.a8solo.onInit(config);

Description of the attributes/functions used within the script:

Attribute/FunctionDescription
dimensionSets the Width & Height of the chat window in the “Chat Mode”. Does not apply to the “Widget Mode”.
renderDomIdEnables the “Widget Mode”. Skip this line to have the “Chat Mode” instead. Note: The “Dom” highlights the on-screen position of the Widget (to be configured by the Client's team).
flowNameIt’s a specialized “Name” assigned to your Journey. *To be provided by the A8 Team.
apiKey/orgName/appId*To be provided by the A8 Team.
isLiveValue is set to “false” (by default) during deployment.
variablesIt is left blank by default. However, you can use it to pass variables to the Journey ahead of deployment.
window.a8solo.onInit(config)*Initiates the rendering of the payload (Journey) at the current location.