Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DINT-1543 Add taxAmount and priceTotal to AEP order #161

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Conversation

benjaminkalk
Copy link
Contributor

Description

Adding taxAmount and priceTotal to appropriate schema and in AEP order creation utility function to populate the same fields in AEP events.
Data Service changes https://github.com/magento-commerce/data-services/pull/209

Related Issue

https://jira.corp.adobe.com/browse/DINT-1543

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -44,6 +44,8 @@ const createOrder = (
payments,
orderType,
discountAmount: orderContext?.discountAmount,
priceTotal: Number(orderContext?.grandTotal || 0),
taxAmount: Number(orderContext?.taxAmount || 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really wants to set tax amount as 0? Should we include all scenarios with different tax configurations in the QA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we just want to avoid null scenarios, and if it is null then we set to 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

0 is the value. Just don't want to have case when order has taxes but we didn't receive it from the context and set this value as 0.
Let's leave it for now. But need to create a separate ticket to test different scenarios with taxes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A null value would cause the event to not be processed by AEP. That is why we set it to 0.

@benjaminkalk benjaminkalk merged commit 00001bc into main Aug 1, 2024
4 checks passed
@benjaminkalk benjaminkalk deleted the DINT-1543 branch August 1, 2024 18:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants