VARIATIONS

One more step down the product hierarchy – we come to variations (“variants” in Shopify).

Some products have variations, some don’t. That means there should be a way to check if variations are available for a certain product. And Activechat can do this for you too.

When the user selects any product from products dynamic gallery, a set of the system attributes is populated (see PRODUCT block description). One of these attributes 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 the “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 the 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 the specific product.

If there are multiple variation types for the 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!

Was this article helpful to you? Yes No

How can we help?