SOLVED

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Go to solution
Ronn_Burner
Level 4

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Jay, that is good to hear. And you nailed it - I panicked in terror due to the unfamiliarity. Just when I think my Marketo game is solid something like this presents itself and I feel like it's my first day in the instance.

Sanford, I look forward to being a hero. Trust me! This stuff is exhilarating to learn once the "Aha!" moment clicks - and the terror subsides. I've been reading your content for years - Your student is lucky to have you!

I have created this 'Email Script' token implementing the boolean field 'Product X Subscribed' for our 7 products (there will be more to come later but at this point we have only these 7.)

pastedImage_2.png

Am I headed down the right path thus far? I don't want to get to far ahead but just to see if I'm even remotely close to comprehension here 1.) In the end, will this be a token in the email HTML? 2.) Is this only the dynamic content block to pull in information for those products that were, in fact, subscribed to which means I would need to duplicate this script using .equals("") ) for the content block of the products they did not subscribe to?

I'm probably overthinking it because if it does not equal ("1") then obviously it equals ("")

And we're off! I CAN DO THIS! I think I can... I think I can... I think I can...

SanfordWhiteman
Level 10 - Community Moderator

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Am I headed down the right path thus far?

Yep!

1.) In the end, will this be a token in the email HTML?

Yes, you will include the name of the {{my.token}} in the email.

2. Is this only the dynamic content block to pull in information for those products that were, in fact, subscribed to

No, you're including content for both the true and false fields here.

If you want to break it up with all trues first, then all falses second, then have

#if( $lead.field1.equals("1") )
Your field1 is true.
#end
#if( $lead.field2.equals("1") )
Your field2 is true.
#end
#if( $lead.field1.equals("") )
Your field1 is true.
#end
#if( $lead.field2.equals("") )
Your field2 is true.
#end‍‍‍‍‍‍‍‍‍‍‍‍
Ronn_Burner
Level 4

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

If you want to break it up with all trues first, then all falses second, then have

I'm open to suggestions on how to best do this but in my mind (because I wasn't sure how else to make it work) I saw this as 10 individual content blocks and if you sign up for 1 product it only populates that 1 block "Welcoming" them. The other 9 blocks are then the remaining products they did not subscribe to Or if you subscribe to 7 you get "welcomed" from each of them and still pitching the 3 products they did not subscribe to.

So for every product subscription that = TRUE the block will have "Welcome/Confirmation" text and/or image populate it and those that = FALSE will have "You still need this product blah blah" text.

I think perfect world I would love to acknowledge each product they subscribed to (1 to 10) at once AND only 3 of the products they still need to subscribe to - rather than all 9 if they only subscribed to a single product.

I'm sure you can see a clear best way to do this with how Velocity within Marketo works - and i am 100% open to it. In the end I just need to acknowledge/confirm what they DID subscribe to AND mention at least a couple products they have NOT subscribed to.

I'm all ears and eager as can be to learn! And I cannot thank you enough for your help, time and patience! it is beyond appreciated.

SanfordWhiteman
Level 10 - Community Moderator

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

In the end I just need to acknowledge/confirm what they DID subscribe to AND mention at least a couple products they have NOT subscribed to.

As far as I can see, you have exactly that already.For each product, you have the choice to output certain content if their value is "1" (they are subscribed to that product) or if their value is "" (they are not subscribed to that one).

You can do all the "welcomes" first. Only output the welcome for a product if it is subscribed ("1").

Then do all the "pitches". Only print the pitch for a product if it is not subscribed ("").

Ronn_Burner
Level 4

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

You will be shocked at the stupidity of this question so I apologize in advance BUT where is the content being pulled from to populate the "1" and "" within the body of the email?

If Product X Subscribed = "1" that area will populate with the paragraph and/or image specific to that product but where is that built and stored to be pulled from? I know the answer is right in front of my face yet I don't know it.

After I figure that part out. Then am I to simply have a single content block with the Email Script Token {{my.VelocityAllTrueThenAllFalse}} or do I put that token in 8 (1 for each product) different blocks (there are 8 actually, I misspoke and said 7 previously) or since there is a "1" and a "" do I need a total of 16 block with the token in each?

I believe I have this correct in the below image?

Screen Shot 2019-11-11 at 4.32.05 PM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

If Product X Subscribed = "1" that area will populate with the paragraph and/or image specific to that product but where is that built and stored to be pulled from?

It's built right where you currently have "Your Max Digital Subscribed is true" and so on. Replace that with your actual content, including HTML <div>/<img>/<whatever> tags.

Then am I to simply have a single content block with the Email Script Token {{my.VelocityAllTrueThenAllFalse}}

You'd embed the {{my.token}} only once. It does all the output, covering all the permutations.

Ronn_Burner
Level 4

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Got it. I figured it would have to be but I made it way more difficult than I needed to. After seeing this and having that "click" moment really makes re-reading your blog posts actually seem like English. This is very, very cool and skill and knowledge I will continue to to explore and sharpen. Now I want to do this for ALL my automation emails!

I can see this is simple and very flexible to simply add, subtract or edit any product in the token - which will be tremendously helpful as our products are software and are constantly changing.

After reviewing how this process will work I realized I have an additional question. All new subscriptions for any product triggers this email.

As it is now, a lead signs up for new Subscription for 1 to 8 products that triggers this email scanning all the "1" and  "" and populating each products content as it should. However, it's very common that a client will, in fact, subscribe to one of the remaining products they do not yet have on any later date, in which case would once again trigger this same email - which would scan and once again "Welcome" them to a product they already have. You see what I mean.

How should I - or how would you handle that?

SanfordWhiteman
Level 10 - Community Moderator

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Here's where people realize that Booleans are (usually) an inferior substitute for DateTimes.

A non-empty DateTime is effectively a superset of a Boolean, because it indicates both (a) that something is true and (b) when it became true. In contrast, as you're finding out, a Boolean can only record whether something is currently true or false.

If you had these as DateTimes you could find out the ones that became true during the past day and only "welcome" those. Of course that means more advanced Velocity code.

P.S. In the the grander scheme of database design, people know Booleans are resource-efficient, so they don't reach out to DateTimes as fast as they should IMO. It's true that a Boolean can take up only a byte, or even less, while a DateTime takes 6-8 bytes to store -- but still not worth worrying about unless you're talking hundreds of fields and have proven that storage is a real-world concern.)

Ronn_Burner
Level 4

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

Right. I see. Well, we may be okay then - Thanks to Jay back when I created my dynamic programs - he advised the DateTime approach so I did, in fact, add a custom field "Product X Subscribed Date" to go along with the boolean T/F. I used {{system.date}} simply because our CRM to Marketo sync is a one way street daily batch so Time becomes irrelevant. Understanding this better I now see that is information I should have provided to you at the top. My apologies.

Now, that being said, if that works, can you help me get there or does "more advanced Velocity code" translate to "forget about it!?"

All this information is invaluable and I'm eagerly absorbing it.

SanfordWhiteman
Level 10 - Community Moderator

Re: How can I send 1 email with dynamic content blocks for products they have and products they don't have?

You would start with the seminal post on day/time in Velocity: https://blog.teknkl.com/velocity-days-and-weeks/