How do we set a value for PurchaseOrderNo, ReferenceCode, or SalesPersonCode field?

lowbrowcustoms
Tourist
3 0 3

Question:

How do we set a value for PurchaseOrderNo, ReferenceCode, or SalesPersonCode field, as these properties available on the Shopify Order API?

 

Details:

We are working on this issue of filtering out Shopify orders that originated on eBay so we can properly remit collected sales tax via Avalara. Currently, eBay marketplace calculates, collects and remits sales tax for all orders. However, these orders flow into Shopify and then Avatax erroneously calculates the tax again, which results in double-taxation and showing that we owe tax that is not due, and that we did not collect. 

I am working with Codisto, who make the Codisto LINQ app which we use to manage our eBay listings via Shopify. One of their senior developers told me the only field available to them is source_name, which does indeed house the value 'ebay' for any order originating from eBay. Unfortunately, Avalara is not able to use this field to filter out these orders. Avalara has the following fields available for their advanced custom rules:

unnamed.png

We are looking to house the value 'ebay' in Shopify in the PurchaseOrderNo, ReferenceCode, or SalesPersonCode field. These are not available in the set of properties available on the Order API, and we are looking for a way to solve this problem.

 

Once the 'ebay' value exists in either the PurchaseOrderNo, ReferenceCode, or SalesPersonCode field, Avatax's advanced rules allow transactions originating on eBay to be automatically excluded for sales tax calculations due to each state.

 

Thanks!

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
213 27 39

Hey @lowbrowcustoms 

I don't believe it's possible to set values for the fields you mentioned on the Order object. Have you thought at all about using tagging, or metafields to add the specific information you need for orders? 

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
lowbrowcustoms
Tourist
3 0 3
It is not an issue to identify these as eBay orders in Shopify, the issue
is identifying the Shopify eBay orders as such in Avalara / Avatax for
proper calculation, reconciliation and payment of sales tax to all the
various US states.

The fields that Avalara will work with automatically (those which can be
used to create filters in Avatax) are limited to those I specified.
0 Likes
Greg_Kujawa
Shopify Partner
947 79 202

This definitely sounds like more of an Avalara issue than a Shopify one. Heck, even the order field names don't correspond with the names Shopify even uses -->  https://shopify.dev/docs/admin-api/graphql/reference/object/order. If Avalara can't read order metafields or tags then they are missing the mark. Since those places would logically be places where data like this would be stuffed.

Wondering about the ReferenceCode field that Avalara lists. What would this actually map to in Shopify? If it's an available field not used for anything perhaps that'd be the landing spot. Unless it has something to do with payment authorization or something. A guessing game since the field names don't even really equate.

The most straightforward solution for a rule would be to query each order to determine its publication name. No need for stuffing data into a mystery field. If the publication name indicates eBay then that order can be ignored/excluded from their routine. Like this below.

{
  order(id: "gid://shopify/Order/2645786329250") {
    name
    paymentGatewayNames
    publication {
      name
    }
  }
}

 

0 Likes
erickh
New Member
1 0 0

Have you or anyone found a solution to this?

I am also using Codisto & Avalara and have the same issue.

Thanks

0 Likes
Greg_Kujawa
Shopify Partner
947 79 202

If you need to set certain values in Shopify to link with these other third-party providers, can't you leverage Shopify Metafields? If these values don't need to be seen or managed by the web users and are just required for API integrations behind the scenes, then Metafields would be the alternative. As long as the third-party providers can link to these in Shopify it should work?

0 Likes