Introduction

You can use TruCHAT fields when building chatbots. In this article we will have a look at some use cases for different types of fields.

Using Contact Fields

Contact Fields are used for user data storage. They are added directly into the system’s lead/contact records and are available not only in the TruCHAT chatbots but also in TruMESSANGING. The data captured in these types of fields is stored permanently for each visitor. These fields are usually created to augment the personal profile of your leads.

Let’s create a Contact Field that will store the user’s name.

Create a chatbot that asks the user's name.

nullFigure 1. Completing the Textbox

Then click the “User Input” button and select the User Input type. Choose “Free Text Only” from the dropdown list.

nullFigure 2. Adding the User Input Element and Choosing Its Type 

Now let’s make sure that the user input is saved to a Contact Field. Enter “@” in the “Save User Input to field” box. You can choose one of the existing Contact Fields from the dropdown list.

nullFigure 3. Saving the User Input to a Contact Field

You can also create a new Contact Field where the user input will be stored. In the “Save User Input to field” box enter “@” and a field name. Then choose the data type from the dropdown list, click “Save”. 

nullFigure 4. Creating a New Contact Field

Thus, the new contact field is created and the user’s answer will be put in it. 

nullFigure 5. The New Contact Field Created

There are also two checkboxes: Process Through AI and User Respond Timeout. If the Process Through AI checkbox is checked, the system will try to match the input with an existing intent. If no match is found, it will then fallback to the default intent response.

nullFigure 6. The Process Through AI Checkbox

Setting a User Respond Timeout lets your chatbot check if a visitor has not responded within a certain amount of time, in which case the conversation can be forwarded to another step.

nullFigure 7. The User Respond Timeout Checkbox

You can find the created field in TruMESSANGING in the “Contact Fields” section.

nullFigure 8. The Created Contact Field in TruMESSANGING

Using Global Fields

Global Fields are available for all chatbots in the account. Through this, you can set a value in one chatbot and it will appear in all chatbots.

Let's take a closer look at the following case: a company has several chatbots that report the same company address. Let’s create a new global field with the company address in one of the chatbots. In the textbox, enter “@@” and a field name.

nullFigure 9. Creating a New Global Field

Choose the data type from the dropdown list, enter the address. Then click “Save”. Fill in the Fallback box if necessary.

nullFigure 10. Creating a New Global Field

The global field with company address is created.

nullFigure 11. The New Global Field Created

Now let’s go to another chatbot. Enter “@@” and choose the created field.

nullFigure 12. Using the Created Global Field in Another Chatbot

nullFigure 13. Using the Created Global Field in Another Chatbot

Now let’s test the chatbot. Click the “Preview” button in the upper right corner. You can see the same address as you entered in the first chatbot.

null

Figure 14. The Chatbot in Use

So, as we can see, it is enough to enter the address in one chatbot to put it in all chatbots.

Using Chatbot Fields

Chatbot Fields are directly tied to one specific chatbot and can not be seen by any other chatbot.

For example, a company has several offices with different addresses and there is a chatbot for each office. Every chatbot reports a unique office address. 

This is what it looks like.

nullFigure 15. A Chatbot Field as Part of a Chatbot

nullFigure 16. A Chatbot Field as Part of Another Chatbot

Using Session Fields

Session Fields are directly tied to an individual chatbot. Their values are not saved once the active visitor chatbot session is ended. 

Session fields are best used for placeholders for data or content that is needed only temporarily. Once the data is collected 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 session fields would be to collect data and then send it out by email.

As an example, create a chatbot that asks what is the best time to contact the user.

nullFigure 17. Completing the Textbox

After that, add the User Input element and choose the User Input type - select “Free Text Only” from the dropdown list.

nullFigure 18. Adding the User Input Element and Choosing Its Type

Now let’s create a new session field where the user input will be stored. In the “Save User Input to field” box enter “@@@@” and a field name. Then choose the data type from the dropdown list, click “Save”. You can also check the boxes Process Through AI and User Respond Timeout as it is shown above.

nullFigure 19. Creating a New Session Field

The new session field is created and the user’s answer will be put in it. 

nullFigure 20. The New Session Field Created

For example, the answer is “Mornings”. You can add this value to the email that is sent to the support manager. After the session, the user’s answer will be cleared out. Next time it may be “Afternoons”. 

Conclusion

Now you know how to use TruCHAT fields of different types so that you can create powerful chatbots that will help better communicate with your audience.