Leave a Message Form


Leave a message form can be set up as a simple web page (HTML). Please follow the steps to install the example:

  1. In web administration, go to Configuration -> Advanced -> File storage -> Private.
  2. Upload the file custom_raw_content_sample_leave_a_message.html
  3. Upload the file custom_raw_content_sample_leave_a_message_error.html
  4. Upload the filecustom_raw_content_sample_leave_a_message_ok.html
  5. Go to User management -> Domain settings -> ISL Pronto.
  6. Set the value of the Open link for leave a message to the following:/users/custom/sample_leave_a_message.html
  7. Set the value of the Leave a message transcript e-mail to your e-mail address.
  8. Apply the provided custom live chat template (default_template_leave_a_message.xml), check the following topic for instructions: Customizing the web chat layout (The only difference between this custom template and the default template is in the _no_operators_available function so that it checks the value of the setting from step  6).

If a user wants to start a chat when there are no available supporters, he/she will be redirected to the leave a message form when there are no available supporters.

The provided example includes three fields - name, e-mail and message. All three fields are set as mandatory, this is checked by the validateForm javascript function.

Whenever a user submits the leave a message form a notification email will be sent to your e-mail address (set in step 7 above) with the subject set to "ISL Pronto customer message" and the body like this:

Name:         test
E-mail:       someone@example.com
Message:      My test message. 

Submitting the data to ISL Pronto chat

When the user clicks Submit, the leave a message form results will be sent to the chat object in the database. Description of the keys:

  1. redirect (redirect to this link, when the leave a message form is successfully submitted)
  2. redirectOnError (redirect to this link, when the leave a message form failed to submit [this might happen if the id or token is incorrect])
  3. token (security token to prevent multiple submissions of the leave a message form)
  4. id(unique chat id - from CGI parameter CHAT_HTTP_ID)
  5. AUXDATA_emailKeys(use this key to specify the desired fields which should be included in the transcript email - match the field name with the desired nice name, example: name=Name|email=E-mail|message=Message)
  6. AUXDATA_emailSenderKey (the value of this key will be set as the transcript email sender)
  7. MSGDATA_<KEY>(the leave a message form result data)

Leave a message form results

Poll results can be accessed by two methods:

  1. HTTP event MESSAGE (see HTTP events), all the data is submitted with MSGDATA_<KEY>=<DATA>
  2. XMLMSG key messages (see Querying chat history)

Was this article helpful?