Introduction

TruCHAT has many different types of fields that you can use inside of your chatbot scripts to collect and process data and to hold content. Each field type has a unique purpose and understanding all of these field types is especially important in developing efficient and effective chatbots. In this article we will cover the different purposes and best practices in creating and using these fields.

Standard TruCHAT Fields

 

Description

These fields are prebuilt into the TruCHAT platform and are available to use when needed. These fields can be populated with values through the actions in your chatbot scripts or they may be automatically updated with valid data based on activity and existing known values.

To show you a simple example of the standard fields: there is a “First Name” common field that should always be used to store all lead’s first name and then you can insert the variable value of that field in a welcome back text content message (see Figure 1).

Another example of a standard TruCHAT field is a “Chat Time (sec)” system field that keeps track of the current length of a visitor’s chat session. You can implement a conditional test using the “Chat Time (sec)” and branch to another specific part of the chatbot script based on if the chat session has exceeded a certain amount of time.

null

Figure 1. An Example Of The Standard Fields

 

The List Of The Standard Fields

 

Common – First Name, Last Name, Full Name, Email, Phone

User – Country, State, City, Zip Code, Address Line 1, Address Line 2, Gender, Company, Title, LinkedIn Name, Facebook Name, Twitter Name, Mobile Number, Slack Name, Telegram Name

Session Values – IP Address Country, IP Address Country Code, IP Address State, IP Address City, IP Address Zip, IP Address, IP Address, Page, Page URL, Page URL Fragment, Referring Website Address, User Returned To Your Website, Device, OS, Connection Type, Chat Last Response, Chat Last Free Text Response, Chat Last Quick Reply Response, Chat Last File Upload Name, Chat Last File Upload URL, Chat Last File Upload Comments, Chat Last File Upload Classification

Date – GMT Date Time, GMT Current Year, GMT Current Month, GMT Current Day, GMT Current Hour, GMT Current Minute, GMT Current Second, GMT Current Day Of Week, Bot Date Time, Bot Current Year, Bot current Month, Bot Current Day, Bot Current Hour, Bot Current Minute, Bot Current Second, Bot Current Day Of week, Visitor Date Time, Visitor Current Year, Visitor Current Month, Visitor Current Day, Visitor Current Hour, Visitor Current Minute, Visitor Current Second, Visitor Current Day Of Week

System – Current Chat ID, Last Chat ID, Received Messages, Chatter Responses, Chatter Text Responses, Default Intent Responses, AI Responses, Agent Is Available, Chat Time (sec), Chat Active Time, Metatag TruCHAT, Event Argument, URL Param Argument, URL Segment Argument, Verification Code

Chatbot – Bot Name, Bot Title

TruVisibility Account – Account Owner, Owner, Owner Email, Owner Phone

 

Manually Created TruCHAT Fields

TruCHAT allows you, as the chatbot developer, to create an unlimited number of new fields to use in your chatbots if there are not standard fields that are already supplied that are appropriate. For example, you should always use the existing common fields of first name, last name, email, and phone in your chatbot scripts as they are already available and there is lots of platform-dependent functionality built into those fields. Your chatbot scripts can read and write to all of these manually created fields.

There are four types of manually created fields that you can create and each one has specific system functionality and characteristics. They can be found in the Chatbots section, the More tab, and in the Fields section (see Figure 2). It is especially important that you use the right type of field to accomplish what you need to get done with your chatbot scripts.

null

Figure 2. Manually Created TruCHAT Fields

 

Contact Fields

Contact Field is a field that will be added directly into the system’s lead/contact records and will be available not only in the TruCHAT chatbots but will also be available in TruMessaging. The data captured in these types of fields will be stored permanently for each visitor. A chatbot can read and write to these types of fields for each visitor that uses the chatbot. These fields are usually created to augment the personal profile of your leads.

An example use of a contact field would be if you wanted to capture from your chatbot visitors their business type (see Figure 3). This value will be stored and accessible by your chatbot scripts for each visitor that supplies this value and will be viewable in the Leads Admin area. This value will also be available in TruMESSAGING contact records as well.

Very important: please note that these created contact fields are permanently added to the lead/contact record. Use these fields judiciously as you should only create contact fields that are important to save with each contact record. Too many of these types of fields created will bloat the data records.

null

Figure 3. An Example Of A Contact Field

 

Global Fields

Global Field is a field that would be created to store values that any and every chatbot in the account could access. These fields are shared across your TruCHAT Account and you can see and manually update the current value.

An example use of this type of field could be to create a counter that all uses of the calendar appointment chatbot in your TruCHAT account that you increment every time an appointment is set on any chatbot in the account (see Figure 4). You can view the value at any time, or you can reset the value when needed.

null

Figure 4. An Example Of A Global Field

 

Chatbot Fields

Chatbot Field is a field that is directly tied to one specific chatbot and can not be seen by any other chatbot and is not part of any lead’s record. These fields were designed to allow chatbot developers to use data or content that is housed outside of the scripts of the chatbot to make personalizing the content shown in the chatbot very easy to access instead of trying to track down the exact spot in the scripts. The chatbot field data would be dynamically inserted in the chatbot at the right spot.

An example use of a chatbot field would be to create field that would store the email address of who is to be sent any support issues directly from within this chatbot (see Figure 5). You can update the value of the field at any time by simply going to the variable and changing the address.

null

Figure 5. An Example Of A Chatbot Field

 

Session Fields

Session Field is a field that is directly tied to an individual chatbot that only exists during the active visitor chatbot session. Values are not saved once the session is ended so each time a session starts, all these types of fields will be null or empty. These session fields are best used for placeholders for data or content that is needed only temporarily. Once the data is collected in the visitor’s session in these types of fields, they can be written out to a TruCHAT Sheet, Google Sheet, or any third-party platform that works with the TruCHAT API. Another use of these session fields would be to collect data and then send that data out by email.

An example use of a session field would be a field that could be used as part of a math formula that is calculated (see Figure 6). These fields would temporarily store the values and then at the end of the session, they would be cleared out.

Very important: please note that values of all session fields are temporary and are not stored or remembered after a visitor’s chatbot session ends. You can optionally write these values out during the session to a sheet, include in an email or write out to a third-party application using the TruCHAT API.

null

Figure 6. An Example Of A Session Field

 

Conclusion

The power of TruCHAT and its toolset is immense. Field usage is a core part of the platform and it is especially important that you understand and utilize the correct field types when creating fields for your chatbot scripts. Also, please familiarize yourself with the standard fields that are available so you use the appropriate fields for data collection and you understand what data is automatically calculated for you so you can build powerful multi-functional chatbots.