SDK 2.0
Front end
Embedding an agent, Front-end script
Front-end script
There are 3 steps to follow in your Front-end code in order to embed a Mindset agent:
1. Add the mindset-sdk2.js
script
2. Add the <mindset-agent>
HTML tag
**3. Get the authToken from your Back-end script and set the <agent-embed>
paramaters
Front-end page full example
Below a sample HTML page including the Javascript script:
Paramaters required for your configuration
YOUR-MINDSET-URL
your Mindset app URL. This will be configured for you by the Mindset team.Sample URL: https://app.mycompany.comYOUR-BACKEND-API-RETURNING-AUTHTOKEN
your BE script URL which need in the request to get the user Email and which will ask the Auth Token to your Mindset app instance (see the Backend-end script below).YOUR-APP-UID
Your appUid is provided by mindset. (it is often just the name of your company).YOUR-AGENT-UID
The agent Uid you want the user chat with. You can find that Agent Uid in the setting of the agent in the Agent Management Portal.