Solved

Failed Attribute Change error with email field on new account creation

  • 23 March 2023
  • 3 replies
  • 375 views

Let’s say user created an account, Customer.io received “create account” event and now there is a Customer.io person with following identifiers: cio_id - cio_id_1, id - id_1, email - test@email.com.

Let’s say we have “delete account” function. This function completely removes user’s account from DB, making its email available for complete new sign up. When user performs account deletion, Customer.io not receives “delete account” event because “delete account” function not sends it. 

Let’s say user with email test@email.com performed account deletion. Later this person decided to sign up from scratch. This person decided to use test@email.com again because it was released since last account deletion. So Customer.io receives “create account” event with following identifiers: id - id_2, email - test@email.com. Note that id is different because it is new account, but email is same. Customer.io creates person with following identifiers: cio_id - cio_id_2, id - id_2, email -. Email is missing.

In activity logs I see this error: activity type - Failed Attribute Change, activity name - email (identifier), value - test@email.com, reason - The identifier is already associated with a different profile.

Indeed, Customer.io have two persons. Old one with cio_id_1, id - id_1, email - test@email.com, and new one with cio_id - cio_id_2, id - id_2, email -. Because old person already have test@email.com, new person can’t use test@email.com. But from DB perspective it is completely two separate accounts. 

So my question is: how to assign email identifier to a new person if this email identifier already assigned to an old person?

I can’t call Customer.io API directly and trigger account deletion of old person because I’m calling Customer.io through Segment. In fact account deletion happens on backend side which is not aware of any analytics, including Segment and Customer.io. It frontend who triggers appropriate analytics events (through Segment) and account deletion API call. So with my current architecture it is not possible to tell Customer.io that user removed his/her account.

icon

Best answer by Felix 24 March 2023, 06:31

View original

3 replies

Userlevel 4

Hey Aimamersion,

I am not sure but have you checked out the merge options?

Also when setting up an accoutn you can choose which attribute is your unique identifier: email or id. Your error message sounds like yours is email right now. Maybe switching this to id might help you?

 

Hope that helps,
Felix

Hey Aimamersion,

I am not sure but have you checked out the merge options?

Also when setting up an accoutn you can choose which attribute is your unique identifier: email or id. Your error message sounds like yours is email right now. Maybe switching this to id might help you?

 

Hope that helps,
Felix

Thank you Felix!

Unfortunately automatic merge doesn’t works in my case because following condition is not true: “The profile matched by email does not have an id”. In my case at the moment of creation of “secondary person” I already have a “primary person” with both ID and email. “Secondary person” have new ID but same email. Because “primary person” have different ID, this new “secondary person” can’t be merged with “primary person” based on email field, so this “secondary person” treated by Customer.io as a new “primary person”. And because of this following error occurs: “The identifier is already associated with a different profile”. 

Changing unique identifier to id sounds like a solution. I checked my workspace settings, at the moment I have these identifiers enabled: cio_id, id, email. Before disabling it Customer.io warns: “After this change, multiple profiles could have the same email address”. It is expected in my case.

So I will perform this but before that let me ask if there will be any potential errors or conflicts on Customer.io side if different people will have same email? As I understand the only drawback will be that such people may receive multiple identical emails because different profiles of same person may be added in a same email campaign. But this can be solved by creating “Deleted accounts” segment and excluding this segment from all email campaigns. It is correct?

Userlevel 4

Hey Aimamersion,

yes that is correct. You can also think about deleting the data out of CIO completley to make sure. I am not sure where you are located, but some country laws require you to delete data afte a certain time a relationship ended.

Best,

Felix 🙂

Reply