Need help: Back in Stock Email will be sent out to recipients after its DOI confirmation only

  • 19 September 2023
  • 4 replies


Hey klaviyo community,

as some of you may know German regulatories are strict on online marketers here. Therefore to be able to send a Back in stock/ Back in order flow to the people who signed up for it, I must have their consent via double opt in mail before.

The problem: Back in stock is a metric not a list and therefore no DOI can be triggered over the affiliation of a profile to a list.

I would need something like this:

Trigger: When someone Subscribed to back in Stock
Service Email: Send out Double Opt In Mail.
Back in Stock Delay: Wait until recipients item is back in stock AND recipients consented to marketing mail via DOI
Back in Stock: Email #1

Can somehow help me with that? My logical thinking is not strong enough 😅 




Best answer by germancynic 20 September 2023, 17:08

View original

4 replies


Solving my own question. Epic success 😁

Jokes aside, my logical thinking was strong enough. This is the solution:

We modified the code, so that a signup to Back in Stock would not only set a metric but also the affiliation to a list. You can find our code here:

<script src=""></script>
var klaviyo = klaviyo || [];
account: "XXXXXX",
list: 'XXXXXX',
platform: "shopify"
trigger: {
product_page_text: "📧 Notify me!",
product_page_class: "btn",
product_page_text_align: "center",
product_page_margin: "0px",
replace_anchor: false
modal: {
headline: "📧 {product_name}",
body_content: "<span style='font-size: 16px;'>Ja, ich möchte per Mail informiert werden, sobald das hier vorgestellte Produkt wieder verfügbar ist.",
email_field_label: "Deine Email",
button_label: "Benachrichtigung erhalten",
subscription_success_label: "Du bist dabei! Wir sagen dir Bescheid, wenn wir nicht mehr sold out sind.",
footer_content: "<span style='font-size: 12px;'>Meine oben eingetragene Mailadresse wird ausschließlich für die Verfügbarkeitsbenachrichtigung verwendet und nicht an Dritte weitergegeben. Meine Einwilligung kann ich jederzeit mit Wirkung für die Zukunft widerrufen. Die <a href='URL TO YOUR DATA PRIVACY SITE' target='_blank'>Datenschutzerklärung</a> mit weiteren Details habe ich zur Kenntnis genommen.",
font_family: '"YOUR FONT",light;',
drop_background_color: "#000",
background_color: "#fff",
text_color: "#222",
button_text_color: "#252525",
button_background_color: "#YOUR BUTTON CI",
close_button_color: "#ccc",
error_background_color: "#fcd6d7",
error_text_color: "#C72E2F",
success_background_color: "#d3efcd",
success_text_color: "#1B9500",
newsletter_subscribe_label: "Ja, ich möchte eine Back-in-Stock-Nachricht erhalten.",
subscribe_checked: false

So the person is added to the list which you can set up using any list ID. Cool backtest: I recommend setting up a Back in Stock List and a Back in Stock Segment (triggered by metric), the amount of recipients should always be the same, if its not you have an error. 

The list MUST have DOI set in the list settings. I also recommend to adapt the DOI and success pages in that specific list, so that the wording is not contributed to “newsletter” but to “back in stock notification”.

If code is ready and list is set up you can modify the back in Stock Flow.

You can use Klaviyos “Back in Stock Flow - Standard” but you must set up a flow filter. Feel free to steal mine:


Hint: I always leave these flows on Manual because I feel its safer.

Hope that helps,

Best germancyncic

Userlevel 7
Badge +35

Hey @germancynic!

That would be awesome! I’m glad you found a solution, and I think it would be great if you’d be able to post it for other Community members who may face the same issue someday!





Hey @Brian Turcotte,

@retention solution is good but not enough for German regulatories because its a single opt in not a double optin. In the meantime I found the solution myself, should I answer my own question with the answer?

Userlevel 7
Badge +35

Hi @germancynic!

Our Community Champion @retention actually gave a great solution for this use case here: