Primechat
API DocumentsWebsiteLog in
  • START HEREđź‘‹
  • FAQ's
  • Pricing Plans
  • Getting Support
  • PLATFORM
  • Registration
  • Overview
  • Workspace & Members
  • CHATBOT GUIDE FOR BEGINNERS
  • Introduction
  • What is a chatbot
  • Benefits & importance
  • Use cases
  • FLOW BUILDER
  • Flow builder overview
  • Field variable
  • Steps
    • Steps
    • Question Step
    • Variable Operation
    • JSON Operation
    • External Request
    • Send Notification
    • Condition Step
    • Split Step
    • Go to Step
  • Sub Flow
    • Sub Flow
    • Workflow
    • Function Flow
  • CHATBOT CHANNELS
    • Omni+Channel Chabot
    • Webchat Chatbot
    • Facebook Chatbot
      • Facebook Lead Generation
    • Instagram Chatbot
    • Telegram Chatbot
    • Slack Chatbot
    • Wechat Chatbot
    • WhatsApp, SMS & Voice ChatBot
      • WhatsApp Cloud API
      • Set Up Facebook App
      • Get Your Webhook From PrimeChat
      • Start With Test Numbers
      • Build WhatsApp Chatbot With Test WhatsApp Number
      • Supported Message Types
      • Template Message
      • How To Use Template Message
      • WABA: Com Bot
    • Google Business Messenger
  • INTEGRATIONS
    • WooCommerce
    • Stripe
  • OPENAI & PRIMECHAT
    • Create chat completion
    • ChatGPT & PrimeChat Use Cases
    • How to fine-tune ChatGPT for your business
    • Generate the chatbot flow using A.I
    • Power up your live chat with the AI assistant
    • Reply to Facebook and Instagram post comments
    • OpenAI embeddings & building your knowledge base
Powered by GitBook
On this page
  • Tag & Sequence Condition
  • Text Variable Condition
  • Number Variable Condition
  • DataTime Variable Condition
  • JSON Variable Condition
  • Custom Input
  • Math Formula

Was this helpful?

  1. Steps

Condition Step

PreviousSend NotificationNextSplit Step

Last updated 1 year ago

Was this helpful?

With the Condition step, you can go to different steps/sub-flows depends on conditions.

In your Condition step, click on "+ Add Condition Group" to set at least one condition group. "Otherwise" group is always there.

You can make as many condition groups as you need. The matching start from the top to the bottom, once a group is matched, the system goes to a named step. When it fails to match all condition group, the "Otherwise" group will take over it. So it's always a good practice to name a step in the "Otherwise" group even it is very unlikely to be used.

Another important thing to know is the difference between "All conditions" and "Any conditions". It is sitting at the upper right corner of each condition group.

You can list more than 1 condition in a condition group. When you do, it matters whether you choose "All" or "Any".

"All Condition" means to get this group matched, you will need to have all the conditions matched in the group.

However, to get a group with "Any Condition" matched, you only need to have one of the conditions matched.

Tag & Sequence Condition

For tag and sequence condition, you can choose "in" or "not in" from the "Operator". Choosing multiple tags/sequences is allowed.

Text Variable Condition

These are all the operators for text conditions.

For "has any value" and "is empty" of all variable types, when you clear a variable, the variable becomes empty. Thus, "has any value" is false and "is empty" is true for this variable.

Number Variable Condition

These are all the operators for number condition.

DataTime Variable Condition

These are all the operators for DateTime condition.

Note that you will need to put "value" always as the correct format "yyyy-MM-dd HH:mm:ss" no matter which displayed format you choose for that variable.

"before/after" is different from "time before/after". The former compare the whole datetime value while the latter only compare the time value.

JSON Variable Condition

These are all the operators for JSON condition.

The very last 3 operators, "has item matched with ...", require the JSON to be a list of variables, not a list of JSON. In other words, if your JSON is storing a list of normal variables, these 3 operators work. They won't work for a JSON storing a list of JSON.

Custom Input

Custom input is built for compare values in JSON variable. Search "custom input" in the if field:

Pick a value from a JSON, then you can compare it as you use the text variable condition.

Math Formula

With this operation, you can calculate the formula directly in the Action Step - "Set Variable Value" and Condition Step - "Value".

Math operations and function supported:

+, -, *, e, pi, PI, abs(), min(), max(), ceil(), floor(), log(), pow(), round(), sqrt(), sin(), cos(), tan()

Please note that

If the formula is invalid, the system will return 0 to the number variable and empty to the text variable.

condition