Date: Thu, 28 Mar 2024 10:43:05 +0000 (UTC) Message-ID: <1562582269.207.1711622585387@5540f141c850> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_206_979275051.1711622585387" ------=_Part_206_979275051.1711622585387 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Create a <SCRIPT>
tag at the bottom of <BODY=
>
in the HTML into which you want to integrate the chat-bot.
Inside the tag <SCRIPT>
define the parameter "src" wi=
th the url provided by the team Chat-Tonic.
The final version should be displayed in a format similar to the following =
one (where YOURAPP will be provided by Chat-Tonic):<script&nbs=
p;src=3D"https://web.chat-tonic.com/api/v1/load/YOURAPP"></script>=
Asynchronous loading (optional)
It is possible to add a parameter to the URL described above for the script=
, to allow webchat to load asynchronously. This has the advantage of not in=
terrupting the flow of loading your page, and not affect it for PageSpeed. =
The amount of time to wait will depend on your page, depending on how many =
other scripts it needs lo load. It is important to understand that Web Chat=
-Tonic always load AFTER every other content is loaded into the page, and t=
he page is considered interactive. Having said that, the amount of time spe=
cified in this parameter, will add a delay after that happens.
By default Web Chat-Tonic will wait 2 seconds before loading, this has b= een proven by us that does not affect PageSpeed, or user experience.
Example allowing a 5 second delay after the page is loaded:
<script src=3D"https://web.chat-tonic.com/api/v1/load/YOUR=
APP?asyncLoadTime=3D5000"></script>
Full screen landing page (optional)
Normally your web chat can be accessed via the following URL for a fullscre=
en experience, but can also be configured to use different subdomains.
<=
code>https://YOURAPP.web.chat-tonic.com
User information (optional)
In the src URL you can add optional parameters to control the data that cha=
t-tonic will know about the user, that gets passed along web chat-tonic.
locale
: The user=E2=80=99s locale in the format =E2=80=9Ces=
=E2=80=9D or =E2=80=9Ces-AR=E2=80=9D. If not provided, Chat-Tonic will try =
to guess it according to the browser=E2=80=99s settings. This is specially =
useful when your bot is multi-language and you want to force the locale for=
specific web pages to load by default in other languages
lng
: Web Chat-Tonic window language (=E2=80=9Cen=E2=80=9C o=
r =E2=80=9Ces=E2=80=9C)
firstName:
First name of the user interacting
lastName:
Last name of the user interacting
profile.id
: Identification number, like a =
passport number, national identification number, license number, etc, of th=
e user interacting
profile.email
: Email of the user interacting
profile.phone
: Phone of the user interacting
profile.custom.[variable]
: Any variable that we want to rec=
ord of the user interacting; these variables are then shown in the advanced=
view of user profile data in Customer Service
All this variables can be tested using a bot in our staging environment,=
by going to:
https://integracion.web.staging.c=
hat-tonic.com
Or by using the script tag in your staging portal (never use it in a produc=
tion environment):<script src=3D"https://web.staging.chat-toni=
c.com/api/v1/load/integracion"></script>
User context (optional)
There=E2=80=99s an extra variable that can be included in the src URL ca=
lled context
. This variable helps to determine the current con=
text, scope, location, etc. of the web chat window. The context is saved, a=
nd in case it a change gets detected in it, the bot is notified to act acco=
rdingly. This feature needs to be coordinated with Chat-Tonic to allow the =
bot to respond correctly.
For example, a bot might react differently depending on the section on t=
he client=E2=80=99s webpage. If we set the context
when loadin=
g the web chat script, the bot will be notified of that context change (opt=
ionally) or will know the current context each time the user sends a messag=
e. Knowing the location on the webpage might lead to different, or better a=
nswers.
The variable can be anything: a string, a number, a boolean, or even muc= h richer data like JSON, which only needs to be encoded for URL for us to i= t. Complex metadata can be sent to the bot using the context, that will all= ow us to perform better on the bot based on that (and will need to be coord= inated accordingly to do so).
The context can also be changed programatically= a>, which is needed in single-page applications that do not refresh the web= page when changing locations.
Initial greeting (optional)
Change the default initial greeting from the pre-configured one, to a di=
fferent one with initialgreeting
Example changing the default initial greeting to a different keyword:
<script src=3D"https://web.chat-tonic.com/api/v1/load/YOUR=
APP?initialgreeting=3DHola, como estas?"></script>
Video example (in Spanish)