How-To: Import Shopify Order Notes into Acumatica Sales Order Custom Field

  • 17 May 2022
  • 3 replies

Userlevel 7
Badge +3
  • Acumatica Commerce Edition Team Lead
  • 227 replies

Hi All,

In case you have such additional details in your Shopify order and you want to import it into Acumatica with custom field, you can do it with a simple customization.

In Shopify, this data is stored in something that is called Note Attributes

But unfortunately, this data is stored in the Key/Value pair, so it is not easy to map it using the mapping engine.

But we can write the mapping using the code:

public class SPSalesOrderProcessorExt : PXGraphExtension<SPSalesOrderProcessor>
public delegate void MapBucketImportDelegate(SPSalesOrderBucket bucket, IMappedEntity existing);

//MapBucketImport is mapping the eCommerce API object to Acumatica API Object.
public void MapBucketImport(SPSalesOrderBucket bucket, IMappedEntity existing, MapBucketImportDelegate baseMethod)
baseMethod(bucket, existing);

foreach (var detrow in bucket.Order.Extern.NoteAttributes)
if (detrow.Name == "Amazon Order Id")

if (bucket.Order.Local.Custom == null) bucket.Order.Local.Custom = new List<CustomField>();

new CustomStringField()
ViewName = "Document", //Dataview name for the sales order header
FieldName = "UsrField", //Custom field name from the customization
Value = detrow.Value.ValueField()

Please note, the “FieldName = “UsrField”” - this is the place that you need to change to reflect the name of the custom field you use in Acumatica.

Hope it helps.

3 replies

Userlevel 7

Thank you for sharing this with the community @smarenich !

Userlevel 5
Badge +3

We need to pull the customer order po (Notes Attribute) into the customer order field on the sales order.

I tried creating a formula but it is not returning the data. Is a customer required since the note attributes are available for mapping?


Userlevel 7
Badge +3

@dgodsill97 unfortunately, since this data is stored in the Key/Value pair, so it is not easy to map it using the mapping engine. That is why I attached customization. Please try to use the same customization as I have published.


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved