Tracking code installation
Tracking page visits
Intents and Entities
Building Dialogflow agent and connecting to Activechat
Sending user input to NLP engine
Triggering bot skills by intents and events
Working with entities
NLP best practices
Sending order updates
One more step down the product hierarchy – we come to variations (“variants” in Shopify).
Some product have variations, some don’t. That means there should be a way to check if variations are available for the certain product. And Activechat can do this for you too.
When user selects any product from PRODUCTS dynamic gallery, a set of system variables is populated (see “Displaying product galleries” above). One of these variables is $_selected_product_var_types, containing the list (“pipe”-separated, ” | “) of all variation types available for the product. For example, if there are color and size variations available, this variable will contain “Color|Size” value.
In the bot flow below we check this variable to see if it contains “Size” variations, and if it does – we display yet another dynamic gallery of variations for product that user selected at the previous step (in PRODUCTS dynamic gallery). We’re using $_selected_product_id in this block settings to refer to specific product.
If there are multiple variation types for specific product (for example, both Size and Color), you can select specific variation types to fix while displaying other variations in the dynamic gallery. Just add another variation type in block settings and select value to fix. In the example below dynamic variations gallery will display all Size variations, fixing Title variation to Blue.
Here is how it looks like in the Messenger:
So far – so good. Time to get to real shopping cart and orders!