sendgrid / sendgrid-nodejs

The Official Twilio SendGrid Led, Community Driven Node.js API Library
https://sendgrid.com
MIT License
3k stars 782 forks source link

Issue: what is "customArgs"? Does it correspond to "unique_args" in the API? #1373

Open jameshfisher opened 2 years ago

jameshfisher commented 2 years ago

I want to set unique arguments using this library. However, I can't see any way to do that. I can see a field called customArgs, but it's unclear whether this is the same thing. Can you point me to documentation on field?

jameshfisher commented 2 years ago

I found through testing that setting customArgs: { foo: "bar"} results in the Email Activity dashboard showing an email with "Unique Args: foo: bar".

So it appears to just be badly named. I suggest that the customArgs field in this library is renamed to uniqueArgs, to correspond with the dashboard and the documentation.

jameshfisher commented 2 years ago

(That said, "unique args" is a bizarre name, and should be called "tags" or "private metadata". But the most important thing is consistency - just call it one thing!)