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

Updating A Customer Using cio_id Replaces id Attribute #78

Closed
mikefey opened this issue Dec 7, 2021 · 1 comment
Closed

Updating A Customer Using cio_id Replaces id Attribute #78

mikefey opened this issue Dec 7, 2021 · 1 comment
Assignees

Comments

@mikefey
Copy link

mikefey commented Dec 7, 2021

If there is a workspace that uses both id and email as identifiers, then the cio_id must be passed as the id in order to update the email:

{ id: "cio_<customerio id>", email: "email@test.com" }

This works fine, but then passes the id attribute in the request body, which results in the customer's id attribute also being updated to "cio_<customerio id>". It doesn't seem possible to use the "cio_<customerio id>" in the customer url and not overwrite the id attribute for the customer.

It seems like whichever attribute key is used here (in this case :id) to build the customer_path should not be automatically included in the request body.

@richdawe-cio
Copy link
Contributor

richdawe-cio commented Dec 11, 2023

Thanks for reporting this issue.

This issue has been resolved in a couple of ways now in the Ruby client library:

  1. Since release 5.2.0 (PR: Allow id and email identifiers to be updated when cio_id specified #109 ), if you include the cio_id in the attributes to the identify method, it will use that in the Track API call to identify the person. In this case, no prefix is required on the value of cio_id.

  2. Since release 5.3.0 (PR: Allow customer_id to be specified in identify URL #111 ), there is a new customer_id attribute for the identify method, which allows you to specify whichever identifier you want to identify the person. It can be id, cio_id (prefixed with cio_) or email.

Please see README.md for some examples.

I'm going to close this issue, since I believe it's. If you have any further problems, please feel free to comment on or re-open this issue.

@richdawe-cio richdawe-cio self-assigned this Dec 12, 2023
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

No branches or pull requests

2 participants