- DarkLight
Forms
- DarkLight
An Administrator can create a set of predefined questions or messages and attach them to a form. Each question or message is sent as an SMS to the contacts. Based on the response SMS provided by the customer, the next action is taken. Using the Form facility, create questions, write conditions to questions, and link one question to another based on the customer response. You can write a JavaScript function or use an in-built JavaScript function.
The following form elements are available for configuration:
Global Variables
Script Block
Prevalidator
Text
Option Choice
Question Field
Check Box
Choose from a List
Question Fields
Library Function.
Create a Form
Perform the following steps:
Go to the Form tab.
Select a Campaign from the dropdown list. This is a mandatory field.
Select a Form from the dropdown list to create one. This displays the forms available for the selected campaign.
Enter a Form Name and Description.
Select the Call Guide checkbox to activate the call guide functionality. It is used when you want to provide agents with predefined questions or statements that they can follow during a call.
Select the Encoding Required check box if you want your message to be encoded before being sent. This is decoded by the service provider before delivery to the customer.
Select the Bot Testing checkbox and select a Chatbot from the next dropdown list.
Configure the Global Variable, Script Block, Question Field, Text, Open Choice, Prevalidator, Check Box, Choose from a List, Question Fields, and Library Function.
Copying a Form
You can copy a form to other campaigns.
Click the Copy Form icon.
Select the Campaign from the dropdown list to which you want to copy this form.
Enter a unique Form Name.
Click Create to generate the form.
To delete a form, click Delete, then confirm by clicking OK in the pop-up.
Business Fields
All business fields associated with a campaign are populated in this section.
From the left pane, drag and drop the business fields on the value fields to store business fields for conditions. [BFLD.BusinessFieldName] is the format for business field.
Global Variables
You can assign values to Global Variables and use them in the 2-Way SMS form. The values for these variables are appended to the SMS messages that are sent using this script.
Note:
This is an optional feature. Global Variables are case-sensitive.
Campaign Manager provides in-built global variables. These variables come with no default values. You have to assign values to these during runtime. You cannot edit or delete these Global Variable names.
Sys_ID
Sys_Fname
Sys_Lname
Sys_DOB
Sys_Gender
Sys_PhoneNumber
Sys_Email
Sys_AppointmentDate
Sys_AppointmentTime
Sys_LCMKey
To create a global variable:
Click Global Variable from the left pane.
Enter a Key and the assign a Value. For example, Account Type could be the key and Gold could be value.
Click Add to add more global variables.
Click Delete to delete a global variable.
Note:
You can delete only Global Variables that you have created. You cannot delete the in-built Global Variables listed.
Click Remove on the top-right of this section to delete all global variables.
Script Block
You can write or use a JavaScript function to perform calculations or invoke a REST API Webservice. You can use any script function in the condition field, assign value, or call script fields. You can read global variables in the script but you cannot reset the value unless it is a non-primitive type.
Note:
Script variable names and global variable names in the script should be unique.
ActiveX components and AJAX call are not supported in the script block.
Perform the following steps:
Drag and drop the Script Block on the left pane to display the screen.
Enter the script code text if it is a new script or copy and paste from an existing script.
Click Remove to clear the script.
Text
You can use the Text block to enter answers evoked in text form from customers.
Drag and drop the Text on the left pane to display the screen.
Continue the process to creating a form.
Option Choice
You can use Option Choice to offer multiple choices to customers to select one or many answers when on a call with agents.
Drag and drop Option Choice from the left pane to display the screen.
Continue the process to creating a form. See Create a Form.
Prevalidator
Pre-Validator is a condition builder that allows the user to build conditions while sending a message to the customers.
Note:
You cannot add a Prevalidator if the Text Type in the Campaign page is Static.
Create the condition:
Select one of Businessfield, Global Variable, or Boolean Conditions.
Select a condition from the dropdown.
Select a value in the value text box.
Click Add or Delete to add or remove conditions.
If all the conditions are satisfied, the application sends messages (for 2-way-SMS) / questions (for Call Guide) to the customers. Simultaneously, these questions are also displayed on the Agent Desktop.
If the conditions are not satisfied, the messages/questions are not sent out to the customers.
After completing the Prevalidator section, continue the process to creating a form. See Create a Form.
Check Box
You can use Check Box to offer questions of a Yes or No type to a customer. You can configure the application to indicate selection of check box means Yes and non-selection means No.
Drag and drop the Check Box on the left pane to display the screen.
Continue the process to creating a form.
Choose from a List
You can use Choose from a List and offer questions where the answer is in a list. The customer chooses an answer from the options provided. If the answer provided is not in the list, it can be dynamically added to the list by the agent.
Drag and drop the Choose from a list on the left pane to display the screen.
Continue the process to creating a form.
Question Fields
All question fields created for this form are populated here. Add any number of question fields (answer you received for this question) in a question block. You can use question fields in the text area or anywhere in the conditions fields. From the left pane, drag and drop the question fields to set or store this answer for the selected condition.
Note:
String is generally used as the datatype for Question Field. If you want to use a datatype other than string, use the corresponding JavaScript parsing functions such as (parseInt(), parseFloat(), etc.
Question field values are case-sensitive.
Hovering over the Question pane shows a slew of options that you can exercise:
Click the Copy to copy a question.
Click Paste to paste a copied question from the clipboard.
Click Discard to discard the copied question from the clipboard.
Hold and drag the question to move the question to a different position - for example, from third question to fifth question.
Click Delete to delete a question. Click OK to delete and dismiss the dialog box.
Library Functions
Campaign Manager provides a list of in-built JavaScript functions. You can also create customized JavaScripts in the Script Block.
Drag and drop the library functions from the left pane to the value field. The format for library function is txml.(FunctionName). For example, txml.ToLower("GOLD").
Use Library Functions for the following fields:
Assign Value
Call Script
Boolean Condition
Value Field
Text Area
Build Condition
From the Conditions dropdown list, select the conditions for this question.
The Question Fields, Global Variables, Business Field, or Boolean Conditions for which you want to write conditions.
The condition for the question or global variable. Using these conditions users can validate both numeric and string data types. Available choices for the condition are:
Is exactly equal to
Is greater than
Is greater than or equal to
Is less than
Is less than or equal to
Is not equal to
Is starting with
Is ending with
Is contains
Note:
When performing wildcard functions is starting with, is ending with, and is contains, prefix and suffix the string with the “%” sign. For example, %searchvalue%.
Enter a value for the condition. You can use a business field, global variable, JavaScript function, or question field as a value by dragging and dropping them here. You can invoke a Webservice call. You can also give a custom value such as expressions, hard-coded value, and so on.
Select the condition form the dropdown for the next action after this question:
Select Bot: Select this to choose a chat bot. Select a chat bot from the next dropdown. Set a success outcome for the chat bot from the corresponding outcomes dropdown and enter an appropriate end session message in the text box, next to it. Repeat the same procedure as applicable for a failure outcome and click Save.
Select Bot and Execute Script: Select this to choose a chat bot and execute a definite script. Select a chat bot from the next dropdown. In the ChatBot Success section, select an option (If true, If false) from the Boolean Conditions dropdown. Enter a script function name or a boolean expression in the text field, next to the Boolean Conditions dropdown. Choose a corresponding end session outcome and the session message for the command. Repeat the same to set up a command for the ELSE condition.
Go to Next Question: Select this option to send the next question as an SMS to a contact based on the answer received for this SMS . In the Select question dropdown list, select the next question to be followed after this question is sent
Reset & Go to Next Question: Select this option to send the next SMS question as an SMS to a contact by resetting the previous answers for the preceded questions. In the Select question dropdown list, select the next question to be followed after this question is sent.
Assign Value: Select this option to assign a value for a global variable. In the Select Variable dropdown list, select the global variable for which you want to assign a value. In the adjacent field, use a business field, question field (the answer you received for this question), JavaScript function, or even a global variable as a value by dragging and dropping on this field. You can also give a custom value. By assigning a new value for a global variable, the old value is removed from the memory and the new value is taken. After assigning a value for a global variable, select the next option you want from the next dropdown list.
End session: Select this option to end this session. By selecting this option, the session stops after this question is sent. In the Select disposition dropdown list, select a business or telephony disposition. You can send an End session message such as Thanks for participating as a thank you message. This is optional and works only if the response received matches the condition. If an invalid response is received, the same question is re-sent as an SMS.
Call script: Select this option to call a JavaScript function. Enter the script function name in the adjacent field to complete this action. By selecting this option, you can perform custom actions such as calling a Web service, validation, etc. Select the next option you want from the next dropdown list. You cannot return a value from JavaScript function.
Note:
You cannot reset primitive types such as integer, float, decimal, string, and so on.
Use the + Add to add another AND or OR condition.
Click Save.