Use cases and best practices for using conditional blocks in conversation flows for advanced AI agents

What's my plan?

Add-on | AI agents - Advanced

In the dialogue builder, conditional blocks activate dialogue branches based on information in the conversation. This article describes some useful ways to use conditional blocks in conversational flows for advanced AI agents.

This article contains the following sections:

Loop prevention

Entity lists

Customer type/value personalization

API integration value personalization

Preferred language detection

Number conventions

Brand-specific information

Related articles:

Using conditional blocks in conversation flows for advanced AI agents

Loop prevention

Loops are usually not helpful. If a customer has been through a conversational path once, they likely need more information in order to be successful progressing through the rest of the conversation.

To prevent infinite loops, there's a limit on the number of times a conversation can loop through the same block in a dialogue. When an AI agent is attempting to generate a reply, if the conversation flow goes through the same block three times (which might happen if you’ve linked back to earlier blocks), the AI agent stops attempting to generate a response.

You can also set a parameter value to act as a circuit breaker for what would otherwise become a frustrating loop for a customer. Consider the example image below, which shows a dialogue for a customer asking to speak to a human. The first time the customer asks to speak to a human, the AI agent tells the customer that the human agents may be busy and suggests working with it first. After this first message, the dialogue sets a parameter value of passed—this is the circuit breaker. If the customer asks a second time to speak to a human, the dialogue checks for the passed value and, upon seeing it, escalates the customer to a human.

Entity lists

If you prefer not to or can't use buttons, conditional blocks are great for different use cases such as contact methods where you are unlikely to train a specific intent.

By using lists, you can segment information and then take users down a more specific, personalized path.

The example below is based on contact methods, however, you could have another based on information such as where the customer is having the issue. By loading a list of browsers and operating systems you can personalize troubleshooting help.

Customer type/value personalization

Depending on the type of customer that is contacting there may be different procedures or policies, such as merchant vs premium or new customers. Therefore, by pulling this information you can provide a more accurate and appropriate experience based on customer lifetime value or business relationship. An example of this is by pulling the organization information if you are servicing B2B, B2C or D2C use cases - in the screenshot below with Zendesk - this can then be split with the orgCustom parameter.

API integration value personalization

Further personalize AI agent responses based on customer-specific information returned which can be pretty much everything, depending on the use-case, API, and information available to us. Such as; Parcel Status is “Shipped” + Courier is “DHL” + Shipping Mode is “Express”

Firstly, here you can provide more accurate information to the user, but also in the example of express shipping if you just return the value of shipped, you might provide a generic response like "please allow 2-5 days for your order to reach you" that could end up causing customer dissatisfaction when they are either a premium customer that gets it as part of a loyalty scheme or they personally paid for 1-day delivery.

Preferred language detection

When someone is on your help center looking at content in a certain language, it is great to be able to keep a seamless experience by maintaining the language they are seeing the page in.

An example of this is using the get tag depending on which help center the widget is loaded within.

We have an action for chat started to get Tags and then use those tags to trigger the correct language. The below screenshots are with Zendesk as an example.

Number conventions

There are different examples where numbers are specific to a product (brand-based SKU's, destinations), country (such as postal code or phone number), or some kind of convention you have implemented at your business (regional or premium order numbers). This is where the starts with operator is great for personalizing communication.

Brand-specific information

Depending on the type of product that a customer is asking about, you may have specific merchandising agreements that entitle the user to more specific support, and thus you may want to split this based on a conditional block on the brand level. Depending on the Intent you might have responses you might want to provide, such as Care Instructions, Damaged Product, and Pre-Order.