Allow customer_id to be specified in identify URL #111
+89
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based on work by @jrbeck in #102 and @trwalzer in #88 and updated to work with the main branch. After some discussion within Customer.io Engineering, the functionality into the
identify
method, with a newcustomer_id
attribute on that. It works in the same way as when it was a separate method.These changes are necessary to allow identify operations where the person is identified by their email address, not
id
orcio_id
. It updatesidentify
so the identifier can be specified separately from the attributes, using thecustomer_id
attribute. So you can e.g.: select a person based on their email address and set up theirid
and other attributes. See for example this use-case.Notes to CIO reviewers:
customer_id
as their first parameter in the identify operation. I'm not sure why the Ruby client library does not. Supporting thecustomer_id
attribute is bringing the Ruby client library.customer_id
on the person.identify
work like other client libraries - first arg is customer_id, attributes follow - so thatcustomer_id
can be created as a person attribute again.