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

fix: custom mapping to transaction attributes not to be null-ed for e… #141

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

mmustafa-tse
Copy link
Contributor

…com events

Summary

M&S noticed that when they custom map the purchase to another eCom event (Checkout in their case) in their AppsFlyer connection config. The revenue that is mapped to the total amount is not being forwarded. After a thorough investigation, I was able to find the issue within our Apple SDK and not the AppsFlyer kit. When testing locally, I noticed that when a transaction attribute is mapped but no product attribute is mapped, it overrides the existing mapping to the transaction attribute (Revenue/Total Amount in this case) and replace it with a nil projectedDictionary and thus never be forwarded to AppsFlyer (or any integration kit that use the same settings with custom mapping). The fix provided here is instead of overriding the projectedDictionary to a nil one, it just returns it to itself with existing correctly mapped transaction attributes.

Testing Plan

Tested with different scenarios locally and they all worked as expected:

  • Scenario 1: eCom event mapped with transaction attributes only and no product attributes mapped (client issue).
  • Scenario 2: eCom event mapped with both transaction and product attributes.
  • Scenario 3: eCom event mapped with product attributes only and no transaction attributes mapped.

@einsteinx2 einsteinx2 self-requested a review January 31, 2022 16:32
Copy link
Contributor

@einsteinx2 einsteinx2 left a comment

Choose a reason for hiding this comment

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

LGTM

@einsteinx2 einsteinx2 merged commit 19ca3b0 into mParticle:master Jan 31, 2022
@mparticle-automation
Copy link
Contributor

🎉 This PR is included in version 8.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants