Skip to main content
All CollectionsFeaturesFlows
Flow component: Condition
Flow component: Condition
Updated over a week ago

The Condition component allows you define the next step of your flow depending on a condicion based on variables, chat session or last received message.

Conditions based on conversation variables

When using a Variable to evaluate the condition you have the following options available:

  • First Name: First name of the contact as registered in your contacts

  • Last Name: Last name of the contact as registered in your contacts

  • Full Name: Full name of the contact as registered in your contacts

  • Language Code: A two characters code indicating the language detected by 2Chat

  • Last User Message: Text with the last message received in the conversation

  • Phone Number: Customer's phone number used to chat

  • Country Code: Country code related to the phone number

  • Country Name: Country name related to the phone number


Conditions based on the chat session

When using the a Chat Session to evaluate the condition you have the following options available:

  • Contact Exists: Allows you to validate if the contact is new or if it's already created in your contacts.

  • First texted: Useful when you need to execute actions depending on the time of the first text from the user.

  • Last user message: Text from the last message received by the user

  • Last user message date: Date and time of the last user message.

  • Last agent message: Text from the last message sent to the user

  • Last agent message date: Date and time of the last message sent.


Conditions based on Last Received Message

When using the a Last Received Message to evaluate the condition you have the following options available:

  • Message time: Message reception time

  • Message length: Returns the length of the last message

  • Content: Text from the las message

  • Has media: True if it has video or image and False if it doesn't

  • Has text: True if the last message is text, False if it doesn't

  • Has sticker: True if the last message is a sticker, False if it doesn't

  • Is Audio: True if the last message is an audio, False if it doesn't


About condition comparisons

Depending on the variable data type you can use different comparisons.

  • Date can use the following operators

    • Between

    • Before

    • In the last

    • Not in the last

  • Time can use the following operators to enable the condition depending on the time range that will apply. For example, Monday through Friday from 9 am to 5 pm. The time zone is the one of your number connected to 2Chat.

    • Inside time range

    • Outside time range

  • Text can use the following operators

    • Equals

    • Doesn't equal

    • Contains

    • Doesn't contain

    • Starts with

    • Doesn't start with

    • Ends with

    • Doesn't end with

  • Number can use the following operators

    • Equals

    • Doesn't equal

    • Greater than

    • Less than

  • True/False can use the following operators

    • Equals

Did this answer your question?