Skip to main content
Solved

Shopify Entity Mapping Issue with Free $0 orders


Forum|alt.badge.img
  • Jr Varsity III
  • 69 replies

Hello, 

I have an entity mapping set up to map the location in Shopify to a specific branch in Acumatica. We use Shopify Plus for both ecommerce and point of sale. Each retail location is it’s own branch. 

Here is the mapping code to assign the correct branch:

=Switch(
    CStr([OrderData -> Transactions.LocationId]) = CStr('68260528265'), '10',
    CStr([OrderData -> Transactions.LocationId]) = CStr('68260626569'), '20',
    CStr([OrderData -> Transactions.LocationId]) = CStr('68260659337'), '30',
    CStr([OrderData -> Transactions.LocationId]) = CStr('66861367433'), '50',
    CStr([OrderData -> Transactions.LocationId]) = CStr('68260757641'), '60',
    CStr([OrderData -> Transactions.LocationId]) = CStr('68260593801'), '70',
    True, '00'
)
 

This works for all orders EXCEPT if the order is discounted 100% so the order total is $0.00

Then it appears to not follow any logic here. 

Any recommendations on how to fix this? 

Thanks!

Best answer by bclark

Update: 

For some reason, the connector does not map over any order data from Shopify if the order total is 0. 

I tried having it map over the Device ID, Order Tags, and several other things with no luck. 

Then I tried having it map over a metafield, and that worked!

 

So my resolution for this was to have a Flow in Shopify add a value to a branch metafield if the order total was 0, and then I’ve added this part into the entity mapping. First it looks for the location, then looks at the metafield. Now I don’t have anymore branch mapping errors. 

 

=Switch(          CStr([OrderData -> Transactions.LocationId]) = CStr('68260528265'), '10',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260626569'), '20',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260659337'), '30',         CStr([OrderData -> Transactions.LocationId]) = CStr('66861367433'), '50',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260757641'), '60',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260593801'), '70',         [OrderData -> Metafields.custom.branch] = 'AA', '10',         [OrderData -> Metafields.custom.branch] = 'CH', '20',         [OrderData -> Metafields.custom.branch] = 'FM', '30',         [OrderData -> Metafields.custom.branch] = 'GA', '50',         [OrderData -> Metafields.custom.branch] = 'HL', '60',         [OrderData -> Metafields.custom.branch] = 'TC', '70',         True, '00' )

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 69 replies
  • Answer
  • August 12, 2024

Update: 

For some reason, the connector does not map over any order data from Shopify if the order total is 0. 

I tried having it map over the Device ID, Order Tags, and several other things with no luck. 

Then I tried having it map over a metafield, and that worked!

 

So my resolution for this was to have a Flow in Shopify add a value to a branch metafield if the order total was 0, and then I’ve added this part into the entity mapping. First it looks for the location, then looks at the metafield. Now I don’t have anymore branch mapping errors. 

 

=Switch(          CStr([OrderData -> Transactions.LocationId]) = CStr('68260528265'), '10',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260626569'), '20',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260659337'), '30',         CStr([OrderData -> Transactions.LocationId]) = CStr('66861367433'), '50',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260757641'), '60',         CStr([OrderData -> Transactions.LocationId]) = CStr('68260593801'), '70',         [OrderData -> Metafields.custom.branch] = 'AA', '10',         [OrderData -> Metafields.custom.branch] = 'CH', '20',         [OrderData -> Metafields.custom.branch] = 'FM', '30',         [OrderData -> Metafields.custom.branch] = 'GA', '50',         [OrderData -> Metafields.custom.branch] = 'HL', '60',         [OrderData -> Metafields.custom.branch] = 'TC', '70',         True, '00' )


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2754 replies
  • August 12, 2024

Thank you for sharing your solution with the community @bclark!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings