Skip to main content
Contributor III
April 6, 2024
Solved

Matching customers by phone number as email changes

  • April 6, 2024
  • 1 reply
  • 105 views

We have a custom API with klaviyo to our site. We have orders that come in through different sales channels and each sales channel sends an encrypted email address @saleschannel.com. However, we do collect the customer’s correct first name, last name, and phone number. But when that same customer comes back and buys direct with their real email address, it creates a new profile. Is there any way I can use a webhook to match phone numbers to update these profiles with the actual email address so we can see their whole sales history, with all channels included?

    This topic has been closed for replies.
    Best answer by Brian Turcotte

    Hi @TTG2023!

    This was already answered here in another Community thread:

     

    Essentially, it is expected behavior from Klaviyo that email is the primary identifier, so a new profile will be created when a customer makes a purchase with a new email.

     

    However, you could potentially create your own custom workaround here by adjusting your custom API integration to “check” for existing profiles before creating an order with the “@saleschannel.com” alias, by using the Get Profiles endpoint and filtering by phone number. Then, if the profile exists, you could use the Profile ID and Get Profile to get the email address and attribute the order to that email.

     

    Best,
    Brian

    1 reply

    Brian Turcotte
    Klaviyo Alum
    April 9, 2024

    Hi @TTG2023!

    This was already answered here in another Community thread:

     

    Essentially, it is expected behavior from Klaviyo that email is the primary identifier, so a new profile will be created when a customer makes a purchase with a new email.

     

    However, you could potentially create your own custom workaround here by adjusting your custom API integration to “check” for existing profiles before creating an order with the “@saleschannel.com” alias, by using the Get Profiles endpoint and filtering by phone number. Then, if the profile exists, you could use the Profile ID and Get Profile to get the email address and attribute the order to that email.

     

    Best,
    Brian