Hello everyone! I am exploring with the email marketing campaigns and I have an automation configured as follows:
Trigger: Scheduled to Run (every 7 days, no end)
Do This: Get collection data updated in the last week
Do This: Send Marketing Email using “New Arrivals” email template
Issue: The new arrivals collection changes all the time. I do not want to select specific products as this email will go out every 7 days telling people to check out what is new in the shop this week. I do not have the desire or the time to manually update the products in this campaign every week.
Question: How do I configure this to “randomly” select products from the new arrivals collection or how can I embed the new arrivals collection into the email campaign? I have the button to “Shop Arrivals” that will take them to the new arrivals collection, but I want the 3 - 6 products displayed to be randomly chosen from the New Arrivals collection. I do not want the same customers seeing the same products over and over every week. Does that make sense?
I have searched Google high and low for some custom liquid code that might do this for me but I have not found what I am looking for. Anybody have any suggestions on how to do this?
I am Gina from flareAI app - get free sales from Google. Hope you are having a good day.
One approach to achieving this would be to use dynamic content blocks in your email template. Dynamic content blocks allow you to display different content to different subscribers based on their preferences or behavior.
You can create a dynamic content block that randomly selects 3-6 products from the “New Arrivals” collection each time the email is sent. To do this, you would need to write some custom code in Liquid to generate a randomized list of products from the collection, and then use that list to populate the dynamic content block.
Here is an example of what the Liquid code might look like:
This code first retrieves all the products in the “New Arrivals” collection, then uses the sample filter to randomly select 6 of those products. It then loops through the selected products and displays their titles and images in HTML div elements.
You would need to modify this code to fit the structure of your email template, and to ensure that the dynamic content block is only shown to subscribers who meet certain criteria (e.g. have previously purchased from your store or shown interest in new arrivals).
Once you have created the dynamic content block, you can insert it into your email template using the drag-and-drop editor in Shopify Marketing Automation. You would then need to test the email thoroughly to ensure that the dynamic content is working as expected and that the email displays correctly on different devices and email clients.
Don’t hesitate to ask if you need any further clarification.
Hi Gina, I came across this response looking to do something similar. However, the Shopify docs for the custom liquid box in email only show that specific variables are available here. From what I can see (and tested), this code does not run in email. It works fine in a page, just not in that email block. I’m curious if this used to work and they changed something, or if you know of another way to accomplish something similar, maybe with an app?
HI Rebeccca, Did you manage finally to assign a workflow that starts at a specific time and repeats each week? What did you do for showing Radom products (dynamic products) in each email?