Step 3: Store the user's account type

Now that we've asked the user which account type they have, let's store their response as our variable value.

Values are assigned to variables using actions. Actions can be attached to almost any interaction your user has with your chatbot, including pressing buttons or Quick Replies, sending information, or entering passages, conversations, or entry points.

We're going to add an action to each Quick Reply so the chatbot assigns a specific value to our AccountType variable.

In the Account type triage passage you created:

  1. Click the Personal Quick Reply and click Actions.
  2. Click + Action.
  3. Select Save value to variable.
  4. Unselect the with button title option.
    We'll be using this value in Logic later, so it's best to define our own value here rather than using the Quick Reply text. That way, if someone changes the Quick Reply text later, it won't affect our Logic.
  5. In the Value field, type Personal.
  6. In the to dropdown, select the AccountType variable.
  7. Click Save to close the Actions configuration.

Now let's configure the Business Quick Reply:

  1. Click the Business Quick Reply and click Actions.
  2. Click + Action.
  3. Select Save value to variable.
  4. Unselect the with button title option.
  5. In the Value field, type Business.
  6. In the to dropdown, select the AccountType variable.
  7. Click Save to close the Actions configuration.
  8. Click Save to save the passage.

When the user chooses an account type, the chatbot assigns the value we configured as the value of our AccountType variable. We can use that variable in other passages and Logic.

Now that our variable's ready, we need to create the card application passages we'll be directing the conversation to.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.