On 7/24/2018, our team publicly launched dynamic content for transactional templates. It is now available for all customers sending over v3 of our Mail Send API. Iterate over lists, handle conditionals and more, thanks to native support for a subset of Handlebars syntax!
More information can be found in our blog post announcement.
You can currently use this feature by manually creating the request body as shown here.
Now, we need to create helper code and examples for this SDK.
I will try to do this, can you assign me to this issue?
That's fantastic @martijnmelchers!
I can't assign people to issues who are outside of the SendGrid org, so I've simply marked it as "status: work in progress".
@thinkingserious Could you merge PR #620 so I won't get conflicts and I can use the continue to use the improved PHPDocs?
Yes, I'll get that one merged ASAP @martijnmelchers. Thanks for your patience!
I'll start once it's merged so no conflicts will occur.
Thanks @martijnmelchers!
I apologize for the delay. I just want to make sure we are all synced up with respect to the style guidelines. Preferably in an automated way.
Hi,
I found dynamic_template_data in personalizations can be used for sending transactional email via cURL call. ref:
https://sendgrid.com/docs/User_Guide/Transactional_Templates/how_to_send_an_email_with_transactional_templates.html
But I want to check is this lib(sendgrid-php) support for setting dynamic_template_data object?
https://github.com/sendgrid/sendgrid-php/blob/master/USE_CASES.md#transactional-templates
much thanks!
Hello @alsuka,
As of right now I think the helper for using dynamic_template_data is still being worked on, but you can still pass it in a JSON payload like is shown here. The difference is you would want a payload that has the dynamic_template_data in each personalization like this. If you have further questions, please let us know.
Fixed with 7.2.0 release :)
Did we have documentation with examples on how to send dynamic data in a call?
^ Was my question -> Found this:
https://github.com/sendgrid/sendgrid-php/blob/master/USE_CASES.md#transactional-templates
Preferring the old methods to this from a simplicity perspective.
Most helpful comment
I will try to do this, can you assign me to this issue?