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

Document how to use per-recipient substitution data, metadata, etc. #156

Closed
rdawemsys opened this issue Aug 15, 2017 · 2 comments
Closed
Assignees
Labels

Comments

@rdawemsys
Copy link
Contributor

rdawemsys commented Aug 15, 2017

The Transmissions API supports substitution data, metadata and tags are the recipient level, but there's no explanation of how to do this in the documentation. Only this text in https://python-sparkpost.readthedocs.io/en/latest/resources/transmissions.html :

Substitution data can be specified at the template, transmission and recipient levels. The order of precedence is as follows: recipient overrides transmission overrides template.

For reference, substitution data is supported by passing in a dictionary to the send method. E.g.:

response = sp.transmissions.send(
...
  recipients = [
    {
      'address': { 'email': '[email protected]' },
      'substitution_data': { 'name': 'Rachael' }
    }
  ],
...
)

The same may work for metadata and tags, but I have not tested that (yet).

I'm using version 1.3.5.

@jgzamora jgzamora self-assigned this May 23, 2018
@jgzamora jgzamora added the docs label May 23, 2018
@jgzamora
Copy link
Contributor

@rdawemsys I'll look into this. It looks like the code passes each entire recipient object without so it should for metadata and tags as well

@jgzamora
Copy link
Contributor

Addressing this in #178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants