Newsletter Studio campaign looks to store content separately and uses that for sending the newsletter
I have created a template that contains the current date. When I send a testmail the current date is displayed correctly. When I schedule 2 campaigns something unexpected happens. I schedule it like this:
Campaign scheduled on the same day: shows current date
Campaign scheduled on the next day: shows date of day before
It is as if scheduling a campaign basically stores the template in its current form, and does not dynamically build the newsletter when it is sent. Is that correct? If so, what can we do about this?
Thanks for your answer. For some things we will be able to use the merge fields, but our newsletter is quite dynamic and must look back a defined time in the past to get the proper content. Replacing that logic with merge fields may be a bit too challenging. We're first going to try to pubish the newsletter again just before we send it and see how that goes.
Too bad. Publishing the newsletter does not make any difference. As soon as you create a campaign, a snapshot is made and that is sent. Once it is scheduled, you cannot change it anymore.
We're going to look at your merge fields options or see if we can find another solution.
I have to admit that this is not a use case that's been kept in mind during the development of this feature. The idea was/is that "what you see is what you get" in terms of the rendered output.
One could think that an easy solution would be to render the page again just before we send out the scheduled campaign. This is probably the right solution but the reason that we did not do this is that the scheduler runs in a background thread and it's complicated to render a Umbraco page from a background thread using the approach that we currently take. Another "risk" with this is also that something goes wrong during the rendering and that a campaign with broken content would be sent since no human would have the chance to see the output before sending starts.
However, I do see that this would be something that is desirable and I will spend some time to see if it can be solved in a better way.
In the meantime, if you can find a workaround that uses merge fields that would be great. I'm happy to help you out if you need any pointers so please let me know what I can do to help you.
I've check with the developer and we're going to create the campaign programmatically at the right scheduled time. I've tried this scenario manually and that seems to do the trick.
Newsletter Studio campaign looks to store content separately and uses that for sending the newsletter
I have created a template that contains the current date. When I send a testmail the current date is displayed correctly. When I schedule 2 campaigns something unexpected happens. I schedule it like this:
It is as if scheduling a campaign basically stores the template in its current form, and does not dynamically build the newsletter when it is sent. Is that correct? If so, what can we do about this?
Hi!
I think I understand, yes the main template will be rendered when you save the email, any merge fields will be applied during the acctual sendout.
I think that a custom merge field that renders the current date would solve your problem: https://www.newsletterstudio.org/documentation/package/11.0.0/develop/merge-field-providers/
Let me know if this works for you.
All the best!
// m
Hi Markus,
Thanks for your answer. For some things we will be able to use the merge fields, but our newsletter is quite dynamic and must look back a defined time in the past to get the proper content. Replacing that logic with merge fields may be a bit too challenging. We're first going to try to pubish the newsletter again just before we send it and see how that goes.
Too bad. Publishing the newsletter does not make any difference. As soon as you create a campaign, a snapshot is made and that is sent. Once it is scheduled, you cannot change it anymore. We're going to look at your merge fields options or see if we can find another solution.
Hi Cees!
I have to admit that this is not a use case that's been kept in mind during the development of this feature. The idea was/is that "what you see is what you get" in terms of the rendered output.
One could think that an easy solution would be to render the page again just before we send out the scheduled campaign. This is probably the right solution but the reason that we did not do this is that the scheduler runs in a background thread and it's complicated to render a Umbraco page from a background thread using the approach that we currently take. Another "risk" with this is also that something goes wrong during the rendering and that a campaign with broken content would be sent since no human would have the chance to see the output before sending starts.
However, I do see that this would be something that is desirable and I will spend some time to see if it can be solved in a better way.
In the meantime, if you can find a workaround that uses merge fields that would be great. I'm happy to help you out if you need any pointers so please let me know what I can do to help you.
All the best!
Hi Markus,
I've check with the developer and we're going to create the campaign programmatically at the right scheduled time. I've tried this scenario manually and that seems to do the trick.
Regards, Cees
Hi again!
That sounds like a good idea as well! Thanks for letting me know!
Please keep me posted if you have any further questions!
All the best!
// m
is working on a reply...