klaviyo / klaviyo-api-python

Python SDK for Klaviyo API
https://developers.klaviyo.com
MIT License
35 stars 5 forks source link

Get Profiles: Phone Numbers Return In Wrong Format #48

Closed brandon-clair closed 4 months ago

brandon-clair commented 5 months ago

When requesting profiles with KlaviyoAPI().Profiles.get_profiles(), I'm receiving some that are not in E.164 format. Some come back like "(###) ###-####". Accessing a profile in the console shows that the contact information for such profiles do indeed have them saved in non-standard formats. Shouldn't these values be coerced into E.164 format prior to being sent back in an API response?

Ian-Montgomery-Klaviyo commented 4 months ago

While the current API verifies that phone numbers are sent in E.164 format, the older api versions didn't have the same guardrails. This probably means that the differently formatted phone numbers are saved in the database in that format from before the E.164 verification existed.

brandon-clair commented 4 months ago

Is there any initiative underway to migrate old records to the new standards? (Granted, not all records would indeed be able to convert, but a best-effort approach would be helpful!)

sanfordj commented 4 months ago

Checking on this, I will update this thread when I have more information.

sanfordj commented 4 months ago

Hello again. I spoke with the team responsible for this API and while a migration for this is not currently in the roadmap, they advise you to contact support and have them file a bug ticket for this. Please be sure to include the company IDs that you are using our API for, and a link to this Github issue.

This will help the team prioritize this work. Thanks for bringing this to our attention!