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

Id field on Product should deserialize product_id instead of id? #746

Closed
Bucimis opened this issue Mar 10, 2021 · 3 comments
Closed

Id field on Product should deserialize product_id instead of id? #746

Bucimis opened this issue Mar 10, 2021 · 3 comments

Comments

@Bucimis
Copy link

Bucimis commented Mar 10, 2021

segmentio/analytics-react-native#277 (mirrored Appboy/appboy-segment-android#25)

We have an issue where a mutual customer is expecting to be able to pass product_id as the Id field on product objects, but only id is working. I believe it's because when deserializing Product objects, the Android code is expecting id instead of product_id

private static final String ID_KEY = "id";
(which eventually flows down to our integration https://github.com/Appboy/appboy-segment-android/blob/master/appboy-segment-integration/src/main/java/com/segment/analytics/android/integrations/appboy/AppboyIntegration.java#L263)

Is that understanding correct? I think this may only really come up with react native type integrations, where things aren't typed by integrators using the Java objects before being passed into Segment.

@prayansh
Copy link
Contributor

Yea this seems like an oversight, i have filed an internal Jira to map id and product_id to the same value. But until that change is shipped, i would recommend users to map both id and product_id (just like you recommended here). I will post an update here once the change is shipped

@prayansh
Copy link
Contributor

did not intend to close the issue 😓

@prayansh
Copy link
Contributor

@Bucimis #761 should fix this issue. This change will be included in our next release

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