Braze tip #3: In-App Messages with customizable images based on custom attributes

published on 07 March 2023

With this quick hack you'll be able to have a single Campaign with In-App Messages that uses different images depending on the user's custom attributes.

This is very useful if you have a promo code which may be different for each user. For example,  let's say your users may have either $10 or $5 OFF so you wish them to receive their corresponding modal in-apps:

dos in apps-254yc

To do so, follow these steps:

  1.  Upload and host the images in the Media Library as shown in this guide and copy each image's URL address.
  2. In the "Enter Image URL" within the "Upload Your Image" section use the following Liquid Syntax code to use the user's custom attributes in order to select the corresponding image
{% if {{custom_attribute.${discount-coupon}}} == 'DISCOUNT10' %}
https://braze-images.com/appboy/communication/assets/image_assets/images/63db2ef49522c33fb26433aa/original.png?1675308788
{% elsif {{custom_attribute.${discount-coupon}}} == 'DISCOUNT5' %}
https://braze-images.com/appboy/communication/assets/image_assets/images/63db2ef30759a6231eef49ad/original.png?1675308787
{% endif %}

3. That's it! Remember to always test if it works as expected!

image-4wdqt

Read more

Built on Unicorn Platform