Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dynamic Template Support #648

Closed
thinkingserious opened this issue Jul 26, 2018 · 11 comments · Fixed by #657
Closed

Add Dynamic Template Support #648

thinkingserious opened this issue Jul 26, 2018 · 11 comments · Fixed by #657
Labels
difficulty: medium fix is medium in difficulty status: work in progress Twilio or the community is in the process of implementing type: twilio enhancement feature request on Twilio's roadmap

Comments

@thinkingserious
Copy link
Contributor

Issue Summary

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.

Acceptance Criteria

Documentation

@thinkingserious thinkingserious added status: help wanted requesting help from the community difficulty: medium fix is medium in difficulty up-for-grabs type: twilio enhancement feature request on Twilio's roadmap labels Jul 26, 2018
@martijnmelchers
Copy link
Contributor

I will try to do this, can you assign me to this issue?

@thinkingserious thinkingserious added status: work in progress Twilio or the community is in the process of implementing and removed good first issue status: help wanted requesting help from the community labels Jul 27, 2018
@thinkingserious
Copy link
Contributor Author

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".

@martijnmelchers
Copy link
Contributor

@thinkingserious Could you merge PR #620 so I won't get conflicts and I can use the continue to use the improved PHPDocs?

@thinkingserious
Copy link
Contributor Author

Yes, I'll get that one merged ASAP @martijnmelchers. Thanks for your patience!

@martijnmelchers
Copy link
Contributor

I'll start once it's merged so no conflicts will occur.

@thinkingserious
Copy link
Contributor Author

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.

@alsuka
Copy link

alsuka commented Aug 10, 2018

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!

@kylearoberts
Copy link
Contributor

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.

  • Kyle

@thinkingserious
Copy link
Contributor Author

thinkingserious commented Aug 15, 2018

Fixed with 7.2.0 release :)

@jaarkko
Copy link

jaarkko commented Aug 27, 2018

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.

@thinkingserious
Copy link
Contributor Author

Hello @jaarkko,

Here you go. Thanks!

With Best Regards,

Elmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: work in progress Twilio or the community is in the process of implementing type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants