Custom Fields ( CUF's ), System fields, and User input

Modified on Tue, 17 Sep at 7:00 PM

Custom Fields (CUFs)


1. What are Custom Fields?


Custom User Fields (CUFs) in Chatbot Builder AI are variables that store and manage data, helping you personalize chatbot interactions. CUFs come in two main types:


Custom Fields: These store user-specific data, allowing for individualized experiences.

Account Fields: These are global fields that store information accessible across all interactions within the chatbot. For knowledge base purposes, we highly recommend using an account field to store your prompt, ensuring it can be referenced and utilized consistently throughout the chatbot.


Types of CUFs include:


Text: For storing simple text messages and text strings.

Number: Holds numerical values.

Date: Stores specific dates.

Date and Time: Combines both date and time data.

True/False: For binary (yes or no) data.

Long Text: A new field that can hold up to 16 million characters, ideal for storing lengthy content such as your prompt.


CUFs can also be combined with other CUFs to create dynamic and flexible interactions within your chatbot.


This is what the structure of the custom field inside the platform looks like,

{{custom_field_name}}



2. Creating Custom Fields

a. Log in to your account

b. Click on Flows

c. Find and click on Custom Field 



 d. Click on Add.




e. Define the field Name, Type, and add a Description that best fits your custom field function.



f. Continue to save the custom field.




3. Using Custom Field on the Flow Builder


If you’ve already created a custom field to store user input, you’re all set. However, you can also create a custom field directly while building your chat flow.


a. Choose the flow where you’d like to implement the custom field feature.

Within the flow, use the “Get User Data” block to collect input from your subscribers (as shown in the image below).


b. Then click on the “Edit” button to configure the custom field.



c. Now, choose the custom field if you have created it already or you can create a new custom field here in the wizard itself.



When any subscriber on this flow provides the input on this user input, it will get stored on the custom field named “preferred color_laptop bags”.


This is how it will reflect on your subscribers.


This is how the chat flow is constructed.



The user input will be saved in the designated custom field, as mentioned before, and can be viewed on the inbox and contact pages.


For example, the green color provided by the user is stored in the corresponding custom field on these pages.



4. Practical Use Cases:


Custom fields on platforms offer immense value for personalization, enabling you to customize your messages and interactions for individual users, resulting in a more engaging and relevant experience. Here are three practical examples of how you can leverage custom fields for personalization:


a. Personalized Greetings:

  

Custom fields can be employed to address users by their names, adding a friendly and personalized touch to interactions. Here's an example flow for greeting a user by name:

   - When a client subscribes to your chatbot or provides their name, store their name in a custom field e.g., {{first_name}}

   - Create a welcome message that includes their name: "Hi {{first_name}}, welcome to our chatbot! How can we assist you today?"

   - Whenever you need to address the user during the conversation, use {{first_name}} to insert their name


This simple personalization technique can make users feel more valued and engaged with 


b. Product Recommendations:


If you have an e-commerce chatbot, you can use custom fields to recommend products based on a user's previous interactions or preferences. Here's how:


   - Store data about the user's product preferences or purchase history in custom fields e.g., {{favorite_category}} or {{recent_purchase}}

   - Based on this data, create automated messages that suggest related or complementary products. For example, if a user recently bought a smartphone, you can send a message like, "We noticed you purchased a smartphone. Check out our latest phone accessories!"


This personalization not only enhances the user experience but also increases the likelihood of making additional sales.


Note:

To use custom fields on the chat flow, use curly brackets { } on the text block to set the required custom field for your chat flow.


When you start typing, the curly brackets {{ get you the list of the custom fields you had in the platform.


On that custom field list apart from the default System fields from ChatbotBuilder, you will find additional custom fields. They are nothing but the custom fields that you created for storing the user details. 



System Fields


1. Understanding System Fields


System fields in a chatbot act like pre-built containers that effortlessly collect crucial information about clients, such as their name or email. Unlike custom fields, they don't require additional setup; they're like ready-made tools that the chatbot intuitively uses to gather key details from people.


System fields are fields created by Chatbot Builder AI  that allow you to access many contact and bot data that are automatically saved by Chatbot Builder AI.


2. Using System Fields


Chatbot Builder AI includes numerous system fields, not all of which are displayed in the bot builder interface. You can still utilize these hidden system fields within your bot.


Contact CUFs


CUF/Variable

Description

{{first_name}}

The user’s first name, useful for creating personalized and friendly messages.

{{last_name}}

The user’s last name, used to create a more formal personalized experience.

{{full_name}}

Combines the first and last names of the user for full name usage in communications.

{{email}}

The user’s email address, typically used for follow-ups and email notifications.

{{phone}}

The user’s phone number, commonly used for SMS campaigns or support calls.

{{user_country}}

The user’s country, helpful for location-based services, offers, or region-specific messaging.

{{user_state}}

The user’s state or region, relevant for more localized interactions or offers.

{{user_city}}

The user’s city, useful for ultra-local personalized messaging or promotions.

{{inbox_link}}

The link to the inbox on Chatbot Builder AI, allowing agents or admins to access user interactions directly.

{{gender}}

The user’s gender, used for personalized messaging that can be gender-specific.

{{locale}}

User’s full locale (e.g., en_US), indicating both language and regional preferences for communication.

{{locale2}}

A shortened version of the locale (e.g., en) to determine the user’s preferred language only.

{{username}}

The Instagram username of the user, used for social interactions or reference.

{{profile_pic}}

URL of the user’s profile picture, allowing richer personalization with visual elements.

{{timezone}}

The user’s timezone, enabling the bot to send time-specific messages and perform actions based on the user’s local time.

{{user_id}}

A unique identifier for the user in the Chatbot Builder AI system, typically used for internal tracking and API interactions.

{{subscribed_date}}

The date the user subscribed or was added to the system, useful for calculating user tenure or for subscription-based campaigns.

{{fb_chat_link}}

A direct link to the user’s Facebook Messenger inbox for easy access to ongoing chats.

{{me}}

A link allowing users to view or delete their data to comply with GDPR regulations, ensuring transparency and user control.

{{webchat}}

A webchat link that can be shared with users, allowing tracking and retrieval purposes. It is compatible with payloads and offers flexible use cases.

{{user_code}}

A unique code assigned to the user, often used for tracking or identification in internal systems.

{{last_btt_title}}

The title of the last button clicked by the user, useful for tracking user interactions and preferences.

{{last_interaction}}

The timestamp of the user’s last interaction with the chatbot, useful for follow-ups or engagement strategies.

{{last_order}}

The details of the last order made by the user, particularly relevant for e-commerce and transactional bots.

{{last_seen}}

The last time the user was seen interacting with the chatbot, providing insights into user engagement.

{{last_text_input}}

The last text message the user sent to the chatbot, useful for analyzing user input and providing contextual replies.

{{last_input}}

The last input (text, image, video, audio, or file) sent by the user to the chatbot, offering insight into user activity.

{{last_input_type}}

Specifies the type of the last input provided by the user (e.g., text, image, video), helping to categorize interactions.

{{consecutive_failed_reply}}

The number of consecutive failed responses from the chatbot, used for error handling or triggering fallback messages.

{{last_ref}}

Refers to the last entry point or referral link clicked by the user, helping track user sources.

{{last_ad}}

The ID of the last Facebook Ad that led the user to the chatbot, used for marketing attribution and tracking.

{{user_channel}}

Indicates the primary communication channel used by the user (e.g., Messenger, Webchat), helping tailor responses to the platform.

{{user_hash}}

A unique hashed value of the user, offering secure tracking and identification across multiple platforms.

{{user_tags}}

A list of tags applied to the user for segmentation, categorization, or targeting in campaigns.

{{user_external_id}}

External user ID used for third-party platforms like Messenger or Instagram.

{{user_source}}

Indicates the source from which the user originated (e.g., Ads, Facebook comment), useful for marketing analysis.

{{assigned_admin_name}}

The name of the admin assigned to the user, allowing for agent tracking or task assignment.

{{assigned_admin_id}}

The ID of the admin assigned to the user, useful for managing team interactions and accountability.

{{current_user_time}}

The current local time of the user, based on their timezone, useful for delivering time-sensitive messages or notifications.

{{chat_history}}

Returns the last 50 messages exchanged between the user and the business, useful for review or context.

{{chat_history_large}}

Returns the last 200 messages exchanged between the user and the business for a more extended review of past conversations.

{{chat_history_details}}

Returns the last 50 messages exchanged with the sender’s details, helpful for identifying the flow of the conversation.

{{chat_history_details_large}}

Returns the last 200 messages exchanged with sender details, providing an extended history for deeper analysis.

{{last_points}}

Holds the user’s most recent questionnaire score. Recommended to store in a questionnaire-specific CUF after each completion.

{{user_notes}}

Returns all notes added to the user profile, including feedback, past interactions, and comments for agent reference.

{{last_user_note}}

Retrieves the most recent note or comment added to the user profile, providing a quick reference to the latest activity.

{{last_call_recorded}}

Contains the URL link to the most recent call recording associated with the user, useful for reviewing phone interactions. *Note: Only Twilio supports this feature at this time.

{{last_step}}

Stores the STEP ID of the last executed step in a published flow, enabling tracking of the user’s progress through the flow.

{{current_step}}

Contains the STEP ID of the currently active step in a published flow, showing the step the user is currently interacting with.



Instagram Story Reply CUFs


Field Variable

Description

{{last_story_id}}

The story ID of the last Instagram story replied to by the user.


Location


Field Variable

Description

{{last_latitude}}

The last known latitude of the user, available only if the user has shared their location.

{{last_longitude}}

The last known longitude of the user, available only if the user has shared their location.


Appointment CUFs


Field Variable

Description

{{booking_date}}

The date of the user’s scheduled appointment.

{{booking_link}}

The link to the booking confirmation or details for the appointment.

{{booking_id}}

The unique identifier for the user’s appointment booking.

{{booking_calendar}}

The calendar associated with the appointment, often used to view or manage the booking.


E-commerce CUFs


Field Variable

Description

{{cart_checkout_link}}

Link to the user’s checkout page for completing the purchase.

{{cart_last_item_name}}

Name of the last item added to the user’s cart.

{{cart_last_item_quantity}}

Quantity of the last item added to the user’s cart.

{{cart_num_items}}

Total number of items in the user’s cart.

{{cart_other_fees}}

Additional fees associated with the user’s cart (e.g., service fees).

{{cart_shipping_cost}}

Shipping cost for the items in the user’s cart.

{{cart_subtotal}}

Subtotal of the user’s cart before taxes and additional fees.

{{cart_total}}

Total cost of the user’s cart, including all fees and taxes.

{{shop_link}}

Link to the e-commerce shop or store page.

{{money_symbol}}

Currency symbol used for the transaction (e.g., $, €, £).

{{order_coupon_code}}

Coupon code applied to the order, if any.

{{order_coupon_discount}}

Discount applied to the order from the coupon code.

{{order_date_account_timezone}}

The date of the order in the user’s account timezone.

{{order_date_timestamp}}

The exact timestamp of when the order was placed.

{{order_date_utc}}

The UTC time of when the order was placed.

{{order_discount}}

Total discount applied to the order.

{{order_email}}

The email address associated with the order.

{{order_id}}

Unique identifier for the order.

{{order_name}}

Full name of the person who placed the order.

{{order_payment_method}}

The payment method used for the order (e.g., credit card, PayPal).

{{order_phone}}

Phone number associated with the order.

{{order_products}}

List of products included in the order.

{{order_shipping_type}}

Type of shipping chosen for the order (e.g., standard, express).

{{order_shipping_address1}}

First line of the shipping address for the order.

{{order_shipping_address2}}

Second line of the shipping address (e.g., apartment number).

{{order_shipping_city}}

City of the shipping address for the order.

{{order_shipping_cost}}

Shipping cost for the order.

{{order_shipping_state}}

State of the shipping address for the order.

{{order_shipping_zip}}

Zip code of the shipping address for the order.

{{order_shipping_country}}

Country of the shipping address for the order.

{{order_shipping}}

Full shipping information for the order.

{{order_status}}

Current status of the order (e.g., pending, shipped, delivered).

{{order_subtotal}}

Subtotal of the order before taxes and shipping.

{{order_taxes}}

Total taxes applied to the order.

{{order_total}}

Total amount of the order, including all fees, taxes, and shipping.

{{product_name}}

Name of the product, used with triggers like “Product Ordered” or “Product added to cart.”

{{product_quantity}}

Quantity of the product, used with triggers like “Product Ordered” or “Product added to cart.”

{{product_id}}

Unique identifier for the product, used with triggers like “Product Ordered”, “Product added to cart”, or “Product removed from cart.”


3. The System Field isn’t visible; how to use it?

You will not see suggestions for all these above fields on the flow builder. If you want to send the data to Google Sheets or any similar built-in integration and you don’t see the system field on the list, you can create a Custom field and transfer the System field value to your Custom field using the action “Set Custom Field “.



4. Practical Use cases

Incorporate system fields into your chatbot messages. Here is a practical example:


a. Email Subscription Confirmation:

You can use system fields to capture a user's email address and confirm their subscription:


Chatbot message: "Thanks for chatting with us, {{first_name}}! Would you like to subscribe to our newsletter? We already have your email address as {{email}}, is that correct?"


This approach simplifies the subscription process by using the email address already associated with the user's messaging platform account.




User Input


1. Understanding User Input


You can store User Input by using the Get User Data Element in the flowbuilder. User inputs are the messages, responses, or data that users provide when interacting with a chatbot or any automated system. These inputs can come in various forms, such as text messages, voice commands, button clicks, form submissions, and more. User inputs serve as the means through which users convey their questions, requests, preferences, and information to the chatbot.


Gathering and utilizing user input is vital for chatbot interactions as it facilitates personalization, contextual understanding, efficient problem-solving, and enhances overall user experiences. This capability empowers chatbots to be more responsive and valuable tools for both businesses and users.



2. Setting Up User Input Prompts


This is a critical part of creating effective chatbot interactions. Here are three key steps to follow:


a. Define User Input Prompts for Specific Information:


Start by precisely outlining the information you require from users in the conversation. Identify the crucial data or responses necessary to accomplish the chatbot's objectives.


For example:

  • If you're building a travel booking chatbot, you might need information like the destination, travel dates, and budget.
  • If you're building a chatbot for a restaurant, you might want to ask for the user's name, preferred dining date, and dietary preferences. 

These questions serve as prompts to gather specific details from the user.



b. Customize Prompts to Encourage User Responses:

   Craft prompts that are clear, concise, and user-friendly. Consider the following tips:


   - Be polite and friendly in your requests. Use phrases like "Please" or "Could you kindly" to encourage cooperation.

   - Use natural language to make the prompts sound less robotic and more conversational.

   - Break down complex questions into simpler, sequential prompts to avoid overwhelming your clients.

   - Incorporate visual elements like buttons or quick replies to make responding easier.

   - Be context-aware. Use previous user responses or system fields (e.g., {{first_name}}) to personalize prompts.


For example: If you need the user's destination, you could use a prompt like: "Hi {{first_name}}, where would you like to travel to? You can type or select from the options below."


c. Configure Validation Rules if Necessary:

Depending on the nature of the information you're collecting, you may need to set up validation rules to ensure the data collected is accurate and in the expected format, and at the allowed period of collection.


For instance:

 - If collecting email addresses, use validation to check for the presence of "@" and a valid domain. You should also ensure that your client has opted in to receive emails before you send out an email, otherwise, you will receive an error message.




   - For dates, validate that they are in a valid date format and that the dates are within a reasonable range.









   - Ensure your chatbot handles unexpected or incorrect responses gracefully. For instance, if a user inputs an invalid date, offer a friendly error message and prompt them to try again.


Using validation rules ensures data accuracy, minimizes confusion, and fosters smoother and more successful interactions with users.



3. Integrating Custom Fields and System Fields

  • When you collect information from users, store it in CUFs (custom fields).
  • Use that information along with system fields to create personalized messages and provide better help.
  • If you need to remember a user's choice or details for later, custom fields are your go-to tool.
  • System fields are always ready to understand and greet users with their name or in their preferred language.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article