Adding a Chat Platform Button to an Email
This article shows how to embed a Chat Platform button into your HTML email message. As a result, the recipient of the email will be able to navigate to a chat with your agent.
Retrieving the Chat Platform Button Image
To obtain the image of the Chat Platform button, you'll need to send a request like the following:
https://{account_name}.spitch.chat/spitchat/button.php?button-name=baloon_blue.gif&force-status=on
Here, account_name
refers to the name of your Chat Platform account.
Description of the Request Parameters for /spitchat/button.php:
Parameter | Description |
---|---|
button-name |
The name of the button image that is loaded from the server when the email message is opened in the email client. |
force-status |
This controls the status of the button. If the parameter's value is 'force-status=on' , the Online status button will always be displayed. If the value is 'force-status=off' , the Offline status button will always be displayed. If the parameter is not specified, the button status will depend on the presence of agents online:
|
Please note that the button status is not affected by the Show offline button setting in the button settings. The offline button will be displayed regardless of the value of this parameter.
Standard Images of Chat Platform Buttons
Thus, you can create a button using a static image, or use a dynamic image that depends on the presence of agents who are Online.
Creating a Chat Platform Button to Open Chat from an Email Message
-
Add the following code to your HTML-formatted email message:
Where<a href="https://{account_name}.spitch.chat/spitchat/client.php"> <img src="https://{account_name}.spitch.chat/spitchat/button.php?button-name=baloon_mini_blue.gif&force-status=on" /> </a>
account_name
is the name of your Chat Platform account.Here's an example of a complete message:
<h1>My HTML Formatted Email</h1><pre> Do you have any other questions? <a href="https://test.spitch.chat/spitchat/client.php"> <img src="https://test.spitch.chat/spitchat/button.php?button-name=baloon_blue.gif&force-status=on" /> </a>
-
Send your email message to the recipient by using a method that's convenient for you.
Creating a Link Without Using a Chat Platform Button Image
You can also create any link that suits you, which will redirect the user to the online chat with a Chat Platform agent. You can use your own image for this link. Alternatively, you can create a text link to your chat.
-
To create a link to the chat, add the following URL to the href attribute of your link, redirecting the user to your chat:
https://{account_name}.spitch.chat/spitchat/client.php
Where
account_name
is the name of your Chat Platform account.If your account isn't hosted on Chat Platform servers, the link will appear as:
https://chat.mycompany.com/spitchat/client.php
Here's an example of a complete HTML-formatted email message using a text link:
<h1>My HTML Formatted Email</h1><pre> Have any questions? <a href="https://test.spitch.chat/spitchat/client.php"> Write to us! </a>
-
Send your email message to the recipient by using a method that's convenient for you.