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 external_id field to trackEvent Action #2011

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tcgilbert
Copy link
Contributor

This update adds the ability to map a Segment field to Klaviyo's external_id in their create event api.

Screenshot 2024-04-26 at 1 57 28 PM

This comes at the request of the Klaviyo team:

The only other request I have Thomas is that in track/identify mappings for Klaviyo Actions, I’d love to have the ability to add “external_id” in as a profile property. This would help on our side of attributing events in the case where if we wanted to map the segment user_id to an external_id on our end, we could track events without a hard email / phone in the payload (like track calls).

Testing

Tested locally:
Screenshot 2024-04-26 at 1 48 40 PM

Comment on lines +26 to +29
external_id: {
label: 'External ID',
type: 'string'
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a straightforward change. Just a few questions:

  1. Does adding support for external_id break with any conventions in other Actions? e.g. does another Action also support external_id, but maybe have it named or handled differently?

  2. Should there be default mappings for the external_id (and maybe also phone_number and email ) field?

  3. Has this been end to end tested some how? Has it been confirmed that the external_id gets to Klaviyo correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does adding support for external_id break with any conventions in other Actions? e.g. does another Action also support external_id, but maybe have it named or handled differently?

No. All the other actions actually have an external_id field, so if anything this makes the actions more congruent.

Should there be default mappings for the external_id (and maybe also phone_number and email ) field?

Can you add default mappings to properties within a object type? If so, I think this would make sense

Has this been end to end tested some how? Has it been confirmed that the external_id gets to Klaviyo correctly?

I've been sending events from Actions tester to Klaviyo, and can verify that the external_id is arriving within klaviyo. If there is any other way to test, happy to do so as well. Here is one for "Order Completed", external_id was empty previsouly

Screenshot 2024-04-29 at 9 12 17 AM

@tcgilbert
Copy link
Contributor Author

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