Skip to content

Add External ID Field to Contact Model#128

Merged
keith-chartmogul merged 3 commits intomainfrom
keith/del-1612-python-client-library-add-external-id-field-to-contact-model
Mar 13, 2026
Merged

Add External ID Field to Contact Model#128
keith-chartmogul merged 3 commits intomainfrom
keith/del-1612-python-client-library-add-external-id-field-to-contact-model

Conversation

@keith-chartmogul
Copy link
Contributor

@keith-chartmogul keith-chartmogul commented Mar 13, 2026

This PR updates the Contact model to include the external_id field. The external_id field can be either a string or null. The Contact model tests have been updated to demonstrate how the external_id field can be set in both CREATE and UPDATE requests.

@keith-chartmogul keith-chartmogul changed the title Python Client Library - Add External ID Field to Contact Model [del-1612] Add External ID Field to Contact Model Mar 13, 2026
Comment on lines +19 to +20
customer_external_id = fields.String(allow_none=True)
external_id = fields.String(allow_none=True, load_default=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

[minor] Not specifically about this PR, but external_id seems pretty much ambiguous now that it's next to customer_external_id; what external id is the second one referring to? Perhaps it's worth renaming it to something more specific

Also it'd be great if perhaps there is a comment/explanation as to why load_default is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed the schema name for this field to contact_external_id while ensuring that it is still sent to the API as external_id and added a comment regarding the use of load_default.

Copy link
Contributor

Choose a reason for hiding this comment

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

No I mean it's how the field is called even in the REST API: there's customer_external_id and there's external_id. I think the update should've been in the REST API itself and the clients should adjust to it. That's what I meant by not specifically about this PR. Now you're sort of introducing something different here: for Python it's contact_external_id but everywhere else it's external_id 😅 right?

I think we could just merge your previous version as-is and decide if we should rename external_id to contact_external_id on the REST API itself, and then all clients. Or maybe this was just subjective, depending on the consensus really

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, that was definitely not clear from your previous comment. If that is the case and you really feel strongly about renaming the field in the public API then perhaps I should sit on all of these client library PRs until that is renamed and then update these PRs accordingly. 👍

@keith-chartmogul keith-chartmogul requested a review from briwa March 13, 2026 08:15
@keith-chartmogul keith-chartmogul marked this pull request as draft March 13, 2026 10:29
@keith-chartmogul
Copy link
Contributor Author

I received validation from Dijana that maintaining the external_id field naming as currently implemented is the correct path forward.

@keith-chartmogul keith-chartmogul marked this pull request as ready for review March 13, 2026 11:57
@keith-chartmogul keith-chartmogul requested a review from pkopac March 13, 2026 12:03
@keith-chartmogul keith-chartmogul merged commit 60ba6c1 into main Mar 13, 2026
6 checks passed
@keith-chartmogul keith-chartmogul deleted the keith/del-1612-python-client-library-add-external-id-field-to-contact-model branch March 13, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants