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

Allow customer_id to be specified in identify URL #102

Closed
wants to merge 3 commits into from

Conversation

jrbeck
Copy link

@jrbeck jrbeck commented May 22, 2023

This is a rebase of the work here:

https://github.com/trwalzer/customerio-ruby

The issue is here:

#78

I did nothing new, but I wanted to use the technique @trwazler added, but with a more recent version of the gem.

@jeremyw
Copy link

jeremyw commented Nov 28, 2023

Can this be merged? We're running into this issue as well -- the API does what we need but the Ruby wrapper doesn't.

@@ -183,6 +183,14 @@ def json(data)

lambda { client.identify(attributes) }.should_not raise_error()
end

it "uses provided url_id rather than id" do
Copy link

Choose a reason for hiding this comment

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

Suggested change
it "uses provided url_id rather than id" do
it "uses provided customer_id rather than id" do

@jrbeck
Copy link
Author

jrbeck commented Nov 28, 2023

@jeremyw this is ready to be merged, just waiting for the review. @stephen-pope-customer-io can we get this reviewed?

@stephen-pope-customer-io

You surely mean @hownowstephen , and not me here

@jrbeck
Copy link
Author

jrbeck commented Nov 29, 2023

@stephen-pope-customer-io, thank you!

@richdawe-cio
Copy link
Contributor

@jrbeck @jeremyw Thanks for your changes and the PR.

I implemented a slightly different approach to the one in this PR, which was to make the identify automatically use the cio_id attributed as the customer ID. You can see the PR that I merged, and an example usage at #109

I've published version 5.2.0 of the library in Ruby Gems. I'm happy to revisit it if it's not doing what you need. Could you take a look at this approach and the new library version, and let me know your thoughts, please?

@jeremyw
Copy link

jeremyw commented Dec 8, 2023

@richdawe-cio I don't think that change solves this problem.

We need to be able to pass email as the identifier in the path, and the id in the body.

To be clear: we aren't trying to update the email address on a person. We're trying to identify users a second time using the same email address without having to know their cio_id, when they have a new unique id due to be unique website visitors.

@richdawe-cio
Copy link
Contributor

richdawe-cio commented Dec 8, 2023

@richdawe-cio I don't think that change solves this problem.

We need to be able to pass email as the identifier in the path, and the id in the body.

Thanks for the quick feedback, and clarifying @jeremyw , I appreciate it . That wasn't clear from the original issue or the code changes in this PR. I'll add that feature in too.

I think you may have a different use-case to the original issue. Thanks for helping me understand your use-case.

@richdawe-cio
Copy link
Contributor

richdawe-cio commented Dec 11, 2023

Thanks for opening this PR. In the end, we implemented this in a slightly different way in #111 , by adding a customer_id parameter to the identify method. E.g.:

$customerio.identify(
  :customer_id => "bob@example.com",
  :location => "Australia"
)

Thank you for opening this PR, the discussions on it, and the help resolving this issue with the Ruby client library.

I don't think this PR is needed any longer, so I'm going to close it.

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.

5 participants