First, you'll need to identify which pages you want to add the Smart Assistant to.
To include the Smart Assistant, you first need to add in a script tag to your website:
<script src="https://{customerSpecificDomain}/tenantScript.js" type="application/javascript"></script>
Once the script is added, the following JS code will enable the Smart Assistant:
initSmartAssistant();
And that's it! Depending on what features the customer has opt'd into, the Chatbot, Message Assist, or other Smart Assistant features will be accessible to patients on the implementing page.
You can add different options to the Smart Assistant when initializing it. Options are always optional as defaults will be selected if not provided.
var options = {
noDelay true,
tenant: 'main',
brand: 'providence'
};
initSmartAssistant(options);
noDelay is a boolean value to determine if the grace icon shows on the page immediately or shows up after a small delay
tenant is a string value to identify the health care context
brand is a string value for the brand, supports providence or swedish
If you want to try loading the bot in a non production environment, you can use the following:
<script src="https://{customerSpecificDomain}/tenantScript.js" type="application/javascript"></script>
Caution!
You must be careful to use the correct script, always use the prod URL in production and the stage URL in non production sites.
The following is a very minimial example of loading the the smart assistant into a plain html page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://{customerSpecificDomain}/tenantScript.js" type="application/javascript"></script>
</head>
<body>
<script>
function loadSmartAssistant() {
initSmartAssistant({
noDelay: true,
});
}
// Main init point
window.addEventListener('DOMContentLoaded', (event) => {
loadBot();
});
</script>
</body>
</html>