Request Demo

If variable is

Just like we parsed the Response using the various Response-<match_criteria> tags. We can also change the flow of conversation based on the value of some variable at any point inside the spreadsheet. For this, the IF type is used. Its format is IF-<var_name>-<match_criteria>. The <var_name> is the source variable whose value is matched with the value given in the Text column using the <match_criteria>. Like Response, the match_criteria can be:

  1. exact_match
  2. regex_match
  3. case_insenstive_match
  4. intent_match
  5. less_than
  6. less_than_equal_to
  7. greater_than
  8. greater_than_equal_to

If the match is successful, it goes to the thread_id mentioned inside the Goto column of that row. Otherwise it continues the conversation from the next row. If the match_criteria is omitted, then it checks for the truth value of the variable i.e. the variable’s value is not false, null, undefined, empty etc. If it is not falsey value, it goes to the thread_id mentioned inside the Goto of that row. If both the variable_name and match_criteria are omitted, it simple goes to the thread_id mentioned in the Goto column of that row. So, this can be used as an ELSE condition inside the spreadsheet.

Suppose a variable input is defined using SetVariable or otherwise.

ID Type Text Goto
IF-input-case_insenstive_match yes, yup, yeah 10
IF 11