-
Notifications
You must be signed in to change notification settings - Fork 225
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
Update MC contacts upsert to handle multiple identifiers #2032
base: main
Are you sure you want to change the base?
Conversation
packages/destination-actions/src/destinations/sendgrid/updateUserProfile/index.ts
Outdated
Show resolved
Hide resolved
Hi @msaunders-twilio thanks for raising this PR. Can you tell me where the input payload will come from for please? If so then the usual location for an anonymousId will be at the root of the payload. '@path': '$.anonymousId' Regarding phone_number_id, is this supposed to be the user's actual phone number, or something else? If it is supposed to be the user's regular phone number then it will normally be ingested at Also can you explain what the external_id field is for please? What types of values are expected to populate this field? Cheers, |
Hi @joe-ayoub-segment ,
|
packages/destination-actions/src/destinations/sendgrid/updateUserProfile/index.ts
Outdated
Show resolved
Hide resolved
hi @msaunders-twilio just another minor change. |
Yes, this destination is currently in use by customers. |
packages/destination-actions/src/destinations/sendgrid/updateUserProfile/index.ts
Outdated
Show resolved
Hide resolved
hi @msaunders-twilio the mapping should be to |
Hi @joe-ayoub-segment 👋 Good catch! I updated that default field and am ready for another review. |
Sendgrid Marketinc Campaigns (MC) recently updated our contacts system to allow for more identifier fields. Previously we required
primary_email
for each contact as the unique identifier. With the recent rollout of multiple identifiers, we added the identifier fieldsphone_number_id
,external_id
, andanonymous_id
. Link to our API docs showing this change.Now, only one of these four identifier fields is required to send a contact to Sendgrid MC. With this change, we also allow for the
primary_email
field to be null if one of the other three identifiers is included.To accommodate for multiple identifiers in the MC action destination, I have made the following changes:
phone_number_id
,external_id
, andanonymous_id
primary_email
field optional nowTesting
I tested this locally by sending sample events to my test MC account. I also added a few more test cases to our unit tests for this destionation.