Skip to main content

Adobe Commerce (Magento 2) Integration - Knowledgebase / SalesPad / Extended Modules - Cavallo Technical Support

Adobe Commerce (Magento 2) Integration

Authors list

Overview

Cavallo’s integration with Adobe Commerce (FKA Magento 2) handles automatic syncing of inventory and sales information between SalesPad/GP and an Adobe Commerce website. Product and inventory level information is pushed from SalesPad/GP to the website so that customers have visibility of which products are available. Sales orders created by customers on the website are pulled down to SalesPad/GP so that they can be processed and fulfilled. Fulfillment and tracking information for each sales order is pushed back to the website for customer visibility. Payment information can be imported from the website, and PayFabric authorizations can be imported for capturing within SalesPad Desktop. When sales orders are invoiced or voided, those updates are communicated back to the website.

This document covers configuration for all components of the Adobe Commerce integration. To download a PDF version of this documentation that also includes specifics on the exact Adobe Commerce API endpoints used, see the attachment at the bottom of this article.

Table Of Contents

General Information On Expressions

Overview

Many integration settings allow the use of expressions to configure how internal and external entities should be matched, or to designate which values are assigned from external to internal entities.

Each expression editor will have a set of source objects to match or map from, and a set of destination objects to be matched or populated. These editors allow additional complexity beyond simply mapping source object fields to destination object fields.

As an example, below is the default expression for Customer Bill To Address Assignment Mapping - Contact_Person. In this case, the Adobe Commerce order is the source object, and a SalesPad/GP CustomerAddr is the destination object. When a new SalesPad/GP CustomerAddr is created in the process of creating a customer for an imported order, this expression is used to populate the Contact_Person field.

xY5cHep6Em16d3Dj3MnzJGujizFZkZ7QQo5zXwk_e23QBoz5ibASa5UjIefrV-PoVI2ex4DscyU_-To59R2Hp4QQ8DjPOkJrVJFQ.png?access_token=snclfk-hrpcnauhhv-694914be4e233f7e50d4c7d8057cee6bd9871b34

Rather than a single customer name field with the customer’s full name, Adobe Commerce has separate first and last name fields, so the Contact_Person field cannot be populated by simply mapping one field to another. The Concat function is used to append the Adobe Commerce Customer last name to the first name, with a space in between. If the customer’s first name is “Jane” and last name is “Doe”, the Contact_Person field will be “Jane Doe”.

Expression editors can also be used to assign hardcoded values when populating fields. In the below example configuration of the Customer Assignment Mapping setting, all customers will be created with value “Z-US$” in the Currency_ID field.

nnmjrenmxcExCMjx_DXvjS6QwClL1UuE9vzHX9wNP5Pem7JpAWlqZmqH-zhQQeN07vi6iQ2IydjbC_6qiyIgeuZ3VbzaU4cF6bm8.png?access_token=snclfg-yqynbbacxk-dbf8af48393b62ee3fe58f33dbdb50311afada10

For an example of a more complex use case, the below expression includes an IIF (if statement) conditional. Comments may be included to provide notes for future reference.

4Ea96zHS3JhAfEQvVBigPkeMUZBQxtv3-j_ZmNEf924s3iA8VSqjymYEx25iVywZVM3XHe9r0BLw53EL6TVDKxPh2i3LK_8ZOBtM.png?access_token=snclfh-rgzkcgppdd-eaec58421a364ea2b67c5903a45f23efeaa16bf1

The complete expression language documentation can be found here.

Sibling and Child Relationship

A combination of sibling and child expressions can be used during matching. The expressions can be joined using logical operators such as AND, OR, etc.

For example, to match customer address on Address Line 1 field and Zip field or xZip user field, set the Address Line 1 child operator to AND and the Zip and xZip sibling operator to OR:

bVWdy80YXc7pTH15QwDrOK_RKf5FQYhsvcwJy4o3MMma8TLcKDxCd4xfSm_eyEYP3Ej_PzFYVv9dHfrveSpn4_Mj8n8i-tKztjoE.png?access_token=snclff-kgayqfothq-9c3d62fd7de52ecb7cc5837ca62cf273d2aa7e06

Product Export

Overview

Export Item Masters and Price Levels from SalesPad/GP to Adobe Commerce. This component provides flexibility to specify which items and associated values are pushed to Adobe Commerce.

General Settings

Export Images During Inventory Export - Disable this setting to prevent exporting images during Product Export. This could speed up the Product Export considerably. NOTE: Images can still be exported with the Product Image Export while this setting is disabled. Defaults to True.

Matching Settings

Product Item Master Matching - This setting will be used to try and match every Adobe Commerce item to a GP Item. If a match is found, the GP Item will be used to update the Adobe Commerce product. NOTE: This setting applies to Inventory Export, Inventory Level Export and Inventory Image Export components.

MzxRCswIX5cWhUr-AlC6d3CLwBEO9HjRWBBUgD7Uefr_YPGW8LRkqfTsQ264w9GQ-wdCZBdOFFkQucyG6kFVYHM8YtFAy_UeWNH0.png?access_token=snclfi-sgbflmyqgz-13483f119013068b72d35110aaf44b0414b91f57

Lookup Settings

Product Export Filter - Define the criteria for which GP Item Numbers should be exported to Adobe Commerce. If left blank, all Active items will be exported. NOTE: This setting applies to Product Export and Product Image Export components.

Only one priority row should be added to the left grid. The conditions on the right will be used to determine which Item Masters will be exported to Adobe Commerce. In the example below, the system will export all items that start with HD-.

W-4o8vv-NZxk2Y8auEbwZHREWlohTiTURh1Lx3se-0egVhobYXPyO28mpxjZpcOdmTFXZi1XIzP0UmWjxpzzHlK-wBggxekV7PXw.png?access_token=snclfg-jmvjqrnavd-8a33a8f9b87ce2390f170c73d968629afc9def34

Item Price Lists Export Filter - Define the criteria for which Item Price Lists should be exported to Adobe Commerce. If left blank, no price lists will be exported.

Create only one record within the left grid and define which price lists should be exported on the right. It is recommended to only export one Price List entry per combination of Item, Quantity, Price Level. These price levels are loaded per Item that is to be exported, therefore filter criteria should only load Price Levels that match the Item Number (see example below).

Given that Adobe Commerce does not have a concept of UofM, consider loading Price Lists for only the item’s base UofM. In a multi-currency company, the conditions should also filter on Currency ID.

In the example below, 2 different Price Levels are sent to Adobe Commerce: Retail and Engineer.

19OSxz6HwLXGdFmTEnpXpOEx_X5ms8KJ-gVab1TjPmURK2VDLPlNknJ3qaLuqsSpeqBylOkJdKkxLdWPeLkx6XU4ex-1hXYk9L0.png?access_token=snclfh-lvieogpioc-8ff7dbbd2b6a1f1b9bbfe699a058e64b991afdb7

For HD-20, only 3 of the Price Levels will be exported in this example.

SalesPad

WSqpAJNjMP4jNhN55DsocTPm1Cy3c_mqRHNSUlcH2whO_ogfzXtG0mvduOrE26LqnhUVKcF8lliTtscqYLC2iVNuJN6H_7IzrbPw.png?access_token=snclfg-tfzakljoyl-a8710623522ca897e15a627d86c5bae438603822

Adobe Commerce

dGc17q5I2SMc3zcYkZo31l3WzcDfQsFZ3NYTTFF5gb5Xd-mtmck1jRtESnQBYF2CuCZVKh5JJ4kZLSejoeC6sUtnkZl4UWnlAUFQ.png?access_token=snclfm-fghprjhkxq-dd2608907f8c1a527520303a7d35e7ea18d632c3

Assignment Settings

Product Mapping - Assign the Adobe Commerce product fields from the GP Item and Location Masters.

5hmDQzpoDSzvef3fRrmSo5VRbObZK1IJGdGtAuSw5p34XGoXSRwkA0FvcTKrLy3HxgBOYjDTQm9C_iVzbo_X3Dh8CoXvQXDjW-g4.png?access_token=snclfm-vuyqeoxjxc-dda78d792b8c5fbc6832373200ffe934721c711b

Item Price Level Mapping - Assign the Adobe Commerce Tiered Price fields from the GP Item Price Lists that were loaded via the definition in Item Price Lists Export Filter. A GP Price List should be mapped to a single Adobe Commerce Customer Group.

hBmTwoteYZqa6E3s4hrxd0onJP4wM55WnPeyOnInmOpcxeEc1tdgzmpcZZhseoqwrXmxWBO1hZ8qscn7TlNNbS_Rxofblk4yvAsM.png?access_token=snclfk-bzfkrovviy-ba1229b662432f092d52fae8edf28f4be5b57f65

Product Assignment Custom Field Mapping - Assign values to Adobe Commerce custom attributes.

Create each Named group and specify the Adobe Commerce Attribute Code and the field assignment. This will create new attributes or update existing attributes on each item.

7GlvBqYLCC7bNBXoJqAq-VFMcXi4EsKrSWGvg-EVrHPIErJkk8kMFb0noMWqMGQbTpcH6ntXoFGzerGSDTnRtPmxR6GiuZt_vKmk.png?access_token=snclfk-rwbrlwnqqu-88f1ba608245e0f39c381e3f9492c2ac26ae918b

Item Image UDF - Set the Item Master UDFs that contain the product images to send to Adobe Commerce. NOTE: This setting applies to Product Export and Product Image Export components.

Processing

The Product Export bulk loads customer groups, product attributes and attribute sets, and products from Adobe Commerce. Then it updates any products that already exist in Adobe Commerce, and it creates new products in Adobe Commerce for the rest.

Scripts

Product Item Master Matching Script - A C# Script that can be used to match a GP item based on the Adobe Commerce Item. This runs after an evaluation has been made with setting: Product Item Master Matching.

Product Pre Export Script - A C# Script that runs before a Product is exported.

Product Image Pre Export Script - A C# script that runs before a product image is exported. NOTE: This setting only applies to the Product Image Export component.

Product Image Post Export Script - A C# script that runs after a product image is successfully exported. NOTE: This setting only applies to the Product Image Export component.

Image Export

Item images will be automatically exported by the Product Export component. To improve performance, this functionality can be disabled by setting the Export Images During Product Export setting to false.

Optimization

In order to reduce the number of SalesPad/GP items that need to be sent to Adobe Commerce each time the Product Export component runs, use a user field as a flag on the Item Master to determine if the item has changed since it was last exported to Adobe Commerce.

Step 1 - Create User Field

Create an Item Master UDF called xNeedsMagentoExport, The default value may be set to 1 so that all newly created items will be automatically exported during the next automation run.

 

pgiIABBVcgrbNkxIru3FywVgtWJtAPOF39ZPAF2PIgLofLkI8I6fOKajRNcti570z1qb62H0Vi9Q8W1OlBkRi6Tt79Aosivmq2MM.png?access_token=snclfj-jbkaysrjre-0d8a0628ddf2bf65d3f54c680685f5d232f77bac

Step 2 - Update UDF After Export

Paste this script into the Product Post Export Script to set xNeedsMagentoExport to false immediately after export. This script runs after an item is successfully exported to Adobe Commerce, and it will save the item automatically after the script runs.

item["xNeedsMagentoExport"] = false;
return String.Empty;

 

dFTMdolImh70oxigcveUyLef06ltTdTPIaf25IlXXHW7fNckgvyydMnatMmAZ2fvuwO4CDFLgvb3Pac1H_RIKAQjy3vwm7g9BBTc.png?access_token=snclfn-dpicgskpyo-5f292199c4dde26ff1f221e98b95e1d8ea200e55

Step 3 - Filter For Items That Need To Be Exported

Update the Product Export Filter setting to include a clause to only return items for which xNeedsMagentoExport = true.

y_h8v4YFeVVGFTpSX6af7WR1tzG7PCFVKamRFx7UbopyhZWfCyJr1iSCQ_s6iBYILfn6vV7NTC5ZN-mygsW-MjhjL1euNxGCblFM.png?access_token=snclfl-suhnjneziq-f2ef03f4f77545b7fbd5f7f36cda9320baa29e1d

Step 4 - Apply SQL Triggers

Apply the following triggers on one or more SalesPad/GP inventory tables.

These triggers will monitor for changes on certain fields, and they will set xNeedsMagentoExport to true when a change occurs.

IV00101 - Item Master

CREATE TRIGGER [dbo].[sptMagentoIV00101Export] ON [dbo].[IV00101]
AFTER UPDATE, INSERT
AS

-- Insert our record(s) that do not yet exist
INSERT INTO [dbo].[spxItemMaster] ([Item_Number])
SELECT ITEMNMBR FROM INSERTED
WHERE ITEMNMBR not in (SELECT Item_Number from spxItemMaster WITH (NOLOCK))

-- Update our record(s) that were updated based on our criteria for pushing the export.
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number
JOIN DELETED D on D.ITEMNMBR = I.ITEMNMBR
JOIN IV00101 as im on im.ITEMNMBR = i.ITEMNMBR
WHERE (UPDATE(ITEMDESC) and d.ITEMDESC != I.ITEMDESC) -- Item Description
OR (UPDATE(ITMSHNAM) and d.ITMSHNAM != I.ITMSHNAM) -- Item Short Name
OR (UPDATE(ITEMTYPE) and d.ITEMTYPE != I.ITEMTYPE) -- Item Type
OR (UPDATE(ITMGEDSC) and d.ITMGEDSC != I.ITMGEDSC) -- Item Generic Description
OR (UPDATE(STNDCOST) and d.STNDCOST != I.STNDCOST) -- Item Standard Code
OR (UPDATE(CURRCOST) and d.CURRCOST != I.CURRCOST) -- Item Current Cost
OR (UPDATE(ITEMSHWT) and d.ITEMSHWT != I.ITEMSHWT) -- Item Shipping Weight

-- If our records were inserted
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number

 

IV00102 - Item Quantity Master

CREATE TRIGGER [dbo].[sptMagentoIV00102Export] ON [dbo].[IV00102]
AFTER UPDATE, INSERT
AS

-- Update our record(s) that were updated based on our criteria for pushing the export.
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number
JOIN DELETED as D on D.ITEMNMBR = i.ITEMNMBR
WHERE (UPDATE(QTYONHND) AND D.QTYONHND != i.QTYONHND)

-- If our records were inserted
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number

 

IV00105 - Item Currency Master

CREATE TRIGGER [dbo].[sptMagentoIV00105Export] ON [dbo].[IV00105]
AFTER UPDATE, INSERT
AS

-- Insert our record(s) that do not yet exist
INSERT INTO [dbo].[spxItemMaster] ([Item_Number])
SELECT ITEMNMBR FROM INSERTED
WHERE ITEMNMBR not in (SELECT Item_Number from spxItemMaster WITH (NOLOCK))

-- Update our record(s) that were updated based on our criteria for pushing the export.
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number
JOIN DELETED as D on D.ITEMNMBR = i.ITEMNMBR
WHERE (UPDATE(LISTPRCE) AND i.LISTPRCE != D.LISTPRCE)

-- If our records were inserted
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number

 

IV00108 - Item Price List

CREATE TRIGGER [dbo].[sptMagentoIV00108Export] ON [dbo].[IV00108]
AFTER UPDATE, INSERT
AS

-- Insert our record(s) that do not yet exist
INSERT INTO [dbo].[spxItemMaster] ([Item_Number])
SELECT ITEMNMBR FROM INSERTED
WHERE ITEMNMBR not in (SELECT Item_Number from spxItemMaster WITH (NOLOCK))

-- Update our record(s) that were updated based on our criteria for pushing the export.
UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number
JOIN DELETED as D on D.ITEMNMBR = i.ITEMNMBR
WHERE (UPDATE(FROMQTY) and d.FROMQTY != I.FROMQTY)-- FROM Qty
OR (UPDATE(TOQTY) and d.TOQTY != I.TOQTY)-- TO Qty
OR (UPDATE(UOMPRICE) and d.UOMPRICE != I.UOMPRICE) -- Price
OR (UPDATE(PRCLEVEL) and d.PRCLEVEL != I.PRCLEVEL) -- Price Level
OR (UPDATE(UOFM) and d.UOFM != I.UOFM) -- UofM

UPDATE spx
SET xNeedsMagentoExport = 1
FROM spxItemMaster spx
JOIN INSERTED as i on i.ITEMNMBR = spx.Item_Number

 

Product Image Export

Overview

This automation component sends updated product images from SalesPad/GP to Magento. This is an alternative to configuring the Product Export to export product images via the Export Images During Product Export setting. Images can take longer to sync, so it can be helpful to separate that processing so that the Product Export can run more quickly. This component also offers script hooks that are specific to the image export process.

Settings

While the Product Export component exports the entire item, the Product Image Export component only exports item images. The following settings for the Product Export must be configured for the Product Image Export to work properly:

  • Item Image UDF

  • Product Item Master Matching

  • Product Export Filter

Note: This component can only export images for products that already exist in Adobe Commerce.

Processing

The Product Image Export loads the products that exist in Adobe Commerce, and then it updates existing images where applicable, and adds new images for products that did not already have images.

Scripts

Product Image Pre Export Script - A C# script that runs before a product image is exported. NOTE: This setting only applies to the Product Image Export component.

Product Image Post Export Script - A C# script that runs after a product image is successfully exported. NOTE: This setting only applies to the Product Image Export component.

Inventory Level Export

Overview

This automation component allows sending specific SalesPad/GP Warehouse quantities to specific Adobe Commerce sources. Each Adobe Commerce source can be matched to a SalesPad/GP Warehouse.

General Settings

Number Of Source Levels Per Export Page - Specify the number of records in each page of the Inventory Level Export. (Max: 20) Defaults to 20.

Matching Settings

Inventory Level Export Location Matching - Define the criteria for matching an Adobe Commerce Source to a GP Location in the Inventory Level Export.

By default, the street, city, and zip of the Adobe Commerce location is used to look up a SalesPad/GP Warehouse with matching Address_Line_1, City, and Zip values.

sQy-ZlpNlfemCJUjxtzcPNS0egSJFYfs1ZRJxw9JCZhIG1Vfl4gOSrHpnYK0mdP6XW4Dq5cS9y8495VSG2-bfHbKOjIt4w44GVP8.png?access_token=snclfn-zroqiltroc-4fe93101a3ea2d79e3ccc78582f8153a54d1628b

Product Item Master Matching - This setting will be used to try and match every Adobe Commerce item to a GP Item. If a match is found, the GP Item will be used to update the Adobe Commerce product. NOTE: This setting applies to Product Export, Product Image Export, and Inventory Level Export components.

lYSkaJRcW2RJUAkpu1IqZh1MG0501ieMF_Ilh1Q8Cs7HIVYTqu6zhaTXKJ43YJKaOjtDYx3qYPohHHu1qMehYme3f-va1ymD_8NM.png?access_token=snclfm-xjxlundtja-7bab3fa4fa3a1ef4569adaf6c969eaa4eb7e2397

Assignment Settings

Source Export Mapping - Assign the mappings for each Adobe Commerce Source Inventory Level.

DWfTOhuxIfVdofUhd9cAVNb746IpMzBqACMJYp3XDW0u-BrtKR7ieh8Wrs4PfvT1JF3Xsb9c0wkKUvQP-YBNRVlNUFei8W49AnGM.png?access_token=snclfr-endlxnfqcf-d0f517c37bd6945f1d1dc4fca24093d45020c9bd

Processing

The Inventory Level Export bulk loads inventory sources and products from Adobe Commerce, and then it updates the inventory levels in Adobe Commerce.

Scripts

Inventory Level Pre Export Script - A C# Script that runs before an Inventory Level is exported.

Inventory Level Post Export Script - A C# Script that runs after a batch of Inventory Levels are successfully exported.

Customer and Order Import

Overview

For each sales order in the website, the Order Import component will attempt to match a SalesPad/GP Customer to the Adobe Commerce Customer based on the Customer Ship To Matching, Customer Bill To Matching, and Customer Matching settings. If no match is found, a new customer will be created in SalesPad/GP based on the Customer Assignment Matching setting, and address codes for the new customer will be determined by the Customer Ship To Assignment Mapping and Customer Bill To Assignment Mapping settings.

Once the customer and addresses are matched or created, the sales order will be created based on the Sales Document Assignment Mapping, Item Master Matching, and Sales Line Assignment Mapping settings. Payment information can be imported for sales orders as general or PayFabric payments.

General Settings

Enable Order Import Trace - If enabled, customer and customer address matching information will be logged during order import. This setting should be enabled for troubleshooting purposes only. Defaults to False.

Flag Comment For Imported Order - Create a comment to send to an Adobe Commerce order when the document is imported. Defaults to “This order was imported into SalesPad.”

Forward Document After Import - If enabled, the imported order will be forwarded in workflow after being saved. Defaults to False.

Import Orders In Status - Select the Order Statuses that should be imported from Adobe Commerce. Can use custom status set up in Stores -> Settings -> Order Status. Defaults to “New”.

Multiple Potential Customers Scenario - Review Queue - Queue that contains orders where a definitive customer match couldn't be found due to multiple possibilities being present. By default, the order will use the customer that has the earliest created date, then the order will be moved to the Workflow Queue designated by this setting to be reviewed.

Number Of Days To Look Back - Specify the number of days to look back from today to import orders. For example, set to 30 to import orders only from the last 30 days. Set to zero to import orders from any time. Defaults to 0.

Number Of Orders Per Page - Specify the number of orders to import at one time. Defaults to 30.

Roll Back Order Import Transaction On Error - When enabled, the transaction encompassing the order import will be rolled back when an error occurs. This prevents data from a partially completed import from being saved to the database. Defaults to True.

Target Adobe Commerce Store - Name of the Adobe Commerce store from which orders will be imported. When left blank, orders will be imported from all stores.

Update Adobe Commerce Order Status After Import - After an order is imported into SalesPad, update the Order Status in Adobe Commerce. Can use a custom status code set up in Stores -> Settings -> Order Status.

Matching Settings

These settings use Expression Editors that allow creating custom matching criteria to determine how an Adobe Commerce entity should match to a SalesPad/GP entity.

Each Matching setting will build one or more SQL queries to attempt to find a match in the SalesPad/GP database. These queries are executed one at a time in order of Priority (lowest to highest). If an earlier priority query returns a result, that result will be returned to be used in the import, and the subsequent priorities will not execute.

The diagram below illustrates the sequence in which SalesPad Desktop attempts to match a SalesPad/GP Customer, Ship To Address, and Bill To Address each time an Adobe Commerce Order is imported.

wRMZrYRPmqkOuC91L_8maANL9muZ5TaNsaZurljwIbqj3JV6FIv5TYW-jAxN6EuvFV8mcOzSkFNe1Bge34wOjgGNLC41WYeKprc0.png?access_token=snclfr-sftrhfmjmm-b9e380061e6cd15dbe070ddb58be2d0067cf5a3b

Customer Matching - Define the mappings for looking up the Customer.

This setting is used as the first attempt to match a SalesPad/GP Customer to the Adobe Commerce Customer. If a customer is found in this step, that customer’s Customer Number will be added to the search criteria when looking up the Ship To and Bill To Addresses.

The default settings attempt to match a SalesPad/GP Customer based on the email of the Adobe Commerce Order. The conditions include a LIKE operator combined with an OR sibling operator. The LIKE operator indicates that the Email_To field must contain, but not exactly match, the expression. The OR sibling operator indicates that at least one of the conditions must match in order for a customer record to be considered a match. either the Order.Email field, or the Order.Email field with a ‘;’ character appended. For example, if the Adobe Commerce customer’s email is “[email protected]”, a SalesPad/GP customer with “[email protected];[email protected]” would be a match. The approximate SQL lookup executed for this condition would be:
“WHERE (customer.Email_To LIKE ‘%[email protected]%’) or customer.Email_To LIKE ‘%[email protected];%’

4_GNM6yGyfXKzHU8fEFe_bvNRU3KKccSm-Z040ZbZ2f57VQKdf6k-TjRemDNwdTfurJDPSyf7fhLRI2Qk5Ndat8IJ6twjSvQD4Ok.png?access_token=snclfp-zwmtzdymym-3be001a13c151d303ba136d3ef5bca7f196d024d

Note that this setting does not need to be populated, since the customer can also be matched indirectly via Customer Ship To Matching or Customer Bill To Matching settings. If Adobe Commerce Orders should be matched by the shipping address instead, then the Customer Matching setting can be cleared, and the Customer Ship To Matching and/or Customer Bill To Matching settings will be used to load the Ship To / Bill To and the corresponding customer.

Customer Ship To Matching - Define the mappings for looking up the Customer Ship To Address.

This setting determines how SalesPad will attempt to look up the Ship To Address for an incoming Adobe Commerce order. If a SalesPad/GP Customer was matched via the Customer Matching setting, the Ship To Address must also belong to that customer. Otherwise, the search will consider address codes across all customers.

For example, if the customer ‘AARONFIT0001’ has already been matched, only address codes having a Customer_Num of ‘AARONFIT0001’ will be considered, even if they otherwise match the criteria in the Ship To Address Matching setting. If a customer has not yet been matched when a Shipping Address is found, the order will be imported under the customer for that shipping address.

The default settings attempt to match a SalesPad/GP Shipping Address in three different steps.

Priority 1

Address: Attempt to find a match based on Address Line 1, City, State, and Zip. All four of these fields must be matched.

QugtYPJPNeVhb8AB5kduS_8LJ5pL3BjdhG5NzpA3LcblxybeVyJAGeefII6JPLmV8gH5BsIMfA4AccJQEe8ua7FRzyiFRD_H8yo.png?access_token=snclfl-nnifjzovvg-df6f564058621088151c9c7450f6daed8b3afb21

Priority 2

Contact: Attempt to find a match based on the First and Last Name of the Adobe Commerce Customer or Adobe Commerce Shipping Address.

ITres6xjz8jlGpk1vMsAeROZu-R3I87IvsBxY0aKr5SBgVkH3GRFX5DxKJeHXmDY_5ZaB9FJG_6KvVa7bG8YZdFCldH7HPTRIyaA.png?access_token=snclfq-vejouuisxj-26517d711417ae05f2bf2477ca02977563197541

Priority 3

Primary Address: Attempt to find a match based on the Primary Address for the Customer. This assumes that the Customer was matched via the Customer Matching setting.

apBEvK1g8f-_kkwoXdJBb8HCjWTX7XML2dowrtYzcUKh3uJJDckvP6F5tiieFkzZ2IS8BO9Pgm-SbkGlYm1hNpSDwRrmACyw_JMo.png?access_token=snclft-xluciaxpak-020fb73cd8f76a19cb78ae96f006216cf59924ab

Customer Bill To Matching - Define the mappings for looking up the Customer Ship To Address.

This setting determines how SalesPad Desktop will attempt to look up the Bill To Address for an incoming Adobe Commerce order. If a SalesPad/GP Customer was matched via the Customer Matching setting, the Bill To Address must also belong to that customer. Otherwise, the search will consider address codes across all customers.

For example, if the customer ‘AARONFIT0001’ has already been matched, only address codes having a Customer_Num of ‘AARONFIT0001’ will be considered, even if they otherwise match the criteria in the Bill To Address Matching setting. If a customer has not yet been matched when a Bill To Address is found, the order will be imported under the customer for that shipping address.

The default settings attempt to match a SalesPad/GP Billing Address in three different steps.

Priority 1

Address: Attempt to find a match based on Address Line 1, City, State, and Zip. All four of these fields must be matched.

R5xfS_CyjY9Bx_bZFF1K3iyEYce6x1yFFBV1NF_p309DzIfycVWSKfCx19DGvOq3s6syls9S4PvqmYB1dNq0DjcFzG4Yq8StCDZc.png?access_token=snclfn-fephhorbyv-e5635519448ab2f795957a4d13e96eb0b75783a9

Priority 2

Contact Person: Attempt to find a match based on the First and Last Name of the Adobe Commerce Customer or Adobe Commerce Shipping Address.

vnrJGkBmjEb21l_L6WF9LQ-UefPXwn94SgBiFafpZFP8zNyceQhwg2Fp0teFfnmytfjShjA614F1b6SVpd-gOPm1hYiKwMuwFa4g.png?access_token=snclfl-zrvaokpsth-c14b94cdded8b516410af24020f419bb58d012df

Priority 3

Primary Address: Attempt to find a match based on the Primary Address for the Customer. This assumes that the Customer was matched via the Customer Matching setting.

4cO3cXnQgCOtE85K4Hm-Ow_TJShLxhVMrvQlvHfQoLGOVyu0jA0jjYUPNLRe4ap73vql1DwNlSusAoATnrhz59VHVlqPxp_3tfuo.png?access_token=snclfs-fswznpqvea-0b587e176704fd537abc1a24cf1b5708366628cb

Item Master Matching - Define the mappings for matching Adobe Commerce items to a GP Item Master.

Each Adobe Commerce Line Item will use this setting to find the corresponding SalesPad/GP Item.

The default settings attempt to match an Adobe Commerce SKU directly to a SalesPad/GP Item Number.

VVmDRbp656U2IuKWhf3MBoMUbqNoyshfbAHNjA0deHbj53kfG-ii0x69NAyZYeq-zk4AwPXSe1Q5OPQdBHfgEiluLulFT5t2Nq4E.png?access_token=snclfs-rtwqelqpzb-61e8737107ee624da99acbe8d6c2772ddb5ab27b

Assignment Settings

Assignment settings use Expression Editors to define how newly created Customers, Orders and Sales Lines will be populated when created during the order import process.

The target objects will be SalesPad/GP Customers, Contacts, Sales Documents, and Sales Line Items. The source objects will be Adobe Commerce Customers, Contacts, Orders, and Line Items.

Example JSON for Adobe Commerce objects can be found at https://devdocs.magento.com/redoc/2.3/

 

Each Mapping contains a grid of all the target fields, and an expression that will be used to populate each field. Required fields are grouped under the Suggested category. If a Suggested category field is not populated, an error may occur.

Customer Assignment Mapping - Define the mappings to be used when creating a new Customer.

If an existing SalesPad/GP Customer was not found using the matching settings, then a new Customer will be created using the values in the Customer Assignment Mapping setting.

EBJLeyWdC95vKxWbSCyE8frmGSecSICYpC8cIvMivjCLKG5VbR_FqaDjLGpMEgf8MJJLVLKPTFRFvzpdXeXPs4VG1uMFkL13ebDU.png?access_token=snclfn-xpdlrtxnfd-778953e7b5cb2cf4190b883b3119e7234e6683a5

Customer Ship To Assignment Mapping - Define the mappings to be used when creating a new Customer Ship To Address.

If an existing SalesPad/GP Customer Address was not found using the Customer Ship To Matching setting, then a new Customer Address will be created using the values in Customer Ship To Assignment Mapping setting.

f8d4FoFtIzXOLYvnfxxvWSMQygcMyPlKUMqqDaLHK9GE3Yl3WE2C8LeJMGpDe4XHKgT15A4JNfO_d7RFWhHON2Fakg8vWDOH8kgg.png?access_token=snclft-rtasxzjkxp-93cda96cd513640a8e005fd52d7cdf874175275e

Customer Bill To Assignment Mapping - Define the mappings to be used when creating a new Customer Bill To Address.

If an existing SalesPad/GP Customer Address was not found using the Customer Bill To Matching setting, then a new Customer Address will be created using the values in the Customer Bill To Assignment Mapping setting.

 

7gGJ42Y5p7GBg2p3MnL2lugf42rMfx4P8CIkvqh7OxMZOj2TA5VNjSF-iK1ZjOEOVOp21dUuBkePZwdDRxz44jPJei47MEpRfWZY.png?access_token=snclfm-cyyknpcrla-204ce3d1fefafbd0cd5e2d72512dc83fa8819d2a

Sales Document Assignment Mapping - Define the mappings to be used when creating a new Sales Document.

When the Adobe Commerce Order is imported, this setting will be used to populate the header level fields on the SalesPad/GP Sales Document.

i855XULvNejbrRERulPjh8TobMbxSqqObv3SxDeE4fHTxYTQ85GvNFqJWJgCIlrH71xR-zcV2-5gLlFguNfaWCzHaDt60bjYdkp0.png?access_token=snclfq-hjfsyntrtz-73dd51c17a6f8eae8d21ceafcc3aebb60e20be4b

Sales Line Assignment Mapping - Define the mappings to be used when creating a new Sales Line Item.

When the Adobe Commerce Order is imported, each line on that order will be created as a sales line on the SalesPad/GP Sales Document. Each sales line’s fields are set based on the Sales Line Assignment Mapping setting.

This setting does not contain any default expressions. The Item Number is determined by the Item Master that is matched by the Item Master Matching setting. If a valid item was not found, then an expression like the one below can be used to import the Adobe Commerce Line Item as a Sales Line Item that is a non-inventory item. (Note that ZZ- is the Non-Inventory Prefix)

43ECdQVS0w1IyCdw_4jTZwypJXNQyRbqmzoMRpL5pcXM7H5niOG-FVSFxtLglvzI4tppDJNk2KmYePnolPMyIm7MHU_W4yDJ05xU.png?access_token=snclfp-wwhyiejusr-3fde466e1e0ac318c202c61aadea79d22894b6f3

A few other line item fields are set by the integration component’s source code, but they can be overridden by this setting: Unit_Price, Markdown_Amount, Tax_Amount, Funct_Tax_Amount.

Sales Document Payment Mapping - Define the mappings to be used when creating a Sales Document Payment.

Sales Document PayFabric Mapping - Define the mappings to be used when creating a PayFabric transaction.

Names Notes Mapping - Assign Named Notes during order import.

Processing

The Order Import retrieves all orders in Adobe Commerce that are ready to be imported, and then it creates customers and addresses as needed before creating the sales orders. It adds a comment and updates the status of the order in Adobe Commerce to indicate that importing was completed.

Scripts

Sales Document Pre Import Script - A C# Script that runs before a Sales Document is imported.

Parameters: System.ComponentModel.CancelEventArgs ce, Object sourceDoc, SalesPad.Bus.SalesDocument sd

When importing an Adobe Commerce Order, this script runs before any assignments have been executed. This script can be used to cancel the import early by setting ce.Cancel = true. Note that Sales Document fields populated by this script may be overridden by assignment settings.

New Customer Creation Script - A C# Script that runs after a new customer is created and before it is saved.

System.ComponentModel.CancelEventArgs ce, Object sourceDoc, SalesPad.Bus.SalesDocument sd, SalesPad.Bus.Customer customer

This script will run before a new customer is saved for the first time. The script runs after the assignments from the Customer Assignment Mapping, but before the assignments from the Customer Ship To Assignment Mapping and the Customer Bill To Assignment Mapping.

The script can be used to do more complex assignments, and it can cancel the import by setting ce.Cancel = true.

Customer And Address Matching Script - A C# Script that runs after the customer and addresses have been matched, and can be used to load a different customer, ship to address, or bill to address.

System.ComponentModel.CancelEventArgs ce, Object sourceDoc, SalesPad.Bus.Customer customer, SalesPad.Bus.CustomerAddr shipToAddr, SalesPad.Bus.CustomerAddr billToAddr, bool multipleCustomersFound

This script will run after the customer and addresses have been matched. It can be used to do more complex assignments or additional validation, and it can cancel the import by setting ce.Cancel = true.

Sales Document Pre Save - A C# Script that runs just before a Sales Document is saved.

System.ComponentModel.CancelEventArgs ce, Object sourceDoc, SalesPad.Bus.SalesDocument sd

After this script runs, the new sales document is saved. This script is the last opportunity to adjust values, or cancel the import by setting ce.Cancel = true.

Sales Document Payment Script - A C# Script that can be used to override the default payment mappings. (Setting: Sales Document Payment Mapping)

Parameters: System.ComponentModel.CancelEventArgs ce, Object sourceDoc, SalesPad.Bus.SalesDocument sd

This script can override the default payment mappings, and it can cancel the import by setting ce.Cancel = true.

Item Master Matching Script - A C# Script that can be used to load SalesPad.Bus.ItemMaster item.

Parameters: System.ComponentModel.CancelEventArgs ce, Object sourceDoc, Object sourceLine, SalesPad.Bus.SalesDocument sd, SalesPad.Bus.ItemMaster item

This script can override the default matched Item Master, and it can cancel the import by setting ce.Cancel = true.

Customer and Customer Address Tracing

Depending on the complexity of the matching configuration, it may be difficult to tell how each customer and customer address is getting matched during order import. Order Import Tracing functionality will log every possible matching result to the spAAIntegrationTrace table in the database, regardless if matching was successful or not. Tracing may be enabled by enabling the Enable Order Import Trace setting under Order Import. Note that enabling this setting may cause database bloat, so it is intended only for troubleshooting purposes.

DXCVkitZEmOSTzVUUxHNxth6r9rgWSeD31OoGsJ0D7EARYgxket45KDppTQaRkCofujOOmlNkVFC2WGJC0HXkFrBNxka12g2P_UI.png?access_token=snclfr-fmnkyfjdpo-7fec4ebb4a7c41b1ea7545b7f46651ad8332b821

The following quick report can be used to query the spAAIntegrationTrace table in SalesPad:



SELECT *
FROM (
SELECT Automation_Name = ai.Instance_Name
,Automation_Description = ai.Instance_Description
,Component_Name = aic.Component_Name
,Trace_Name = ait.Trace_Name
,Group_ID = ait.Group_ID
,External_Object_Key = ait.External_Object_Key
,External_Object = ait.External_Object
,Mapping_Info = ait.Mapping_Info
,Business_Object_Name = ait.Business_Object_Name
,Search_Clause = ait.Search_Clause
,Results = ait.Results
,Created_On = ait.Created_On
,Created_By = ait.Created_By
FROM spAAIntegrationTrace AS ait WITH (NOLOCK)
LEFT JOIN spAAInstance AS ai WITH (NOLOCK) ON ai.AA_Instance_ID = ait.AA_Instance_ID
LEFT JOIN spAAInstanceComponent AS aic WITH (NOLOCK) ON aic.AA_Instance_ID = ait.AA_Instance_ID
AND aic.Component_ID = ait.AA_Component_ID
) AS a






 

The embedded SQL query can be used directly from SSMS.

Order Update Export

Overview

The Order Update Export Component is used to export tracking numbers and fulfillments back to Adobe Commerce for orders that were originally created by the Order Import Component.

This component will target a designated workflow queue. Each document in that queue will use the link that was created during the order import to call the Adobe Commerce API and update the appropriate document. For Sales Documents, the External ID designates the linked Adobe Commerce Order ID. For Sales Line Items, the Sales Line Matching setting is used to find the corresponding sales Adobe Commerce line. The Sales Line Item also includes an External ID column that stores the ID of the corresponding Adobe Commerce line item. If the Sales Line Matching setting has been left blank, or did not find a match for a given line, the External ID will be used to find the Adobe Commerce line.

General Settings

Export Queue - Queue that contains orders ready to be exported to Adobe Commerce.

Orders that were imported from Adobe Commerce will need to be directed into this queue so that they can export fulfillment and tracking information back to Adobe Commerce. They will wait to be processed, and afterward they will be forwarded in workflow.

Export Failure Queue - In the event of an unsuccessful export, the document will be placed into this queue.

If there is an exception during the order export process, the document will be moved to this queue and the error will be logged to the Automation Agent Action Center.

Number Of Orders Per Export Page - Specify the number of orders in each page of the order export. Defaults to 50.

Use this setting to minimize the number of orders that SalesPad attempts to load and process at the same time.

Roll Back Order Update Export Transaction On Error - When enabled, the transaction encompassing the Order Update Export will be rolled back when an error occurs. This prevents data from a partially completed export from being saved to the database. Defaults to True.

Tracking Update Comment - Comment to be used when uploading tracking information.

Tracking Update Comment Visible On Front - Sets Visible On Front value for comment. Used only if 'Tracking Update Comment' has a value. Defaults to True.

Tracking Update Notify - Notify customer of tracking update. Defaults to True.

Update Adobe Commerce Order Status After Order Update Export - The status to update Adobe Commerce orders to during the Order Update Export. Leave blank to not update order status. Can use a custom status code set up in Stores -> Settings -> Order Status.

Update Order Status Comment For Updated Order - A comment to append to the Adobe Commerce order while updating its status during the Order Update Export. NOTE: This setting will be ignored if Update Adobe Commerce Order Status After Order Update Export is blank.

Matching Settings

Sales Line Matching - Define the optional mappings for matching a Sales Line to an Adobe Commerce line. Can be used to override the default line matching.

Cgf14eXmVpNoR8yqfo9xtg-WXO44MYB3AUl9eEuounIZqgRtKh2ZdTCJJdpjew4GqLFy6sH_gH_ey3d4PAR9FlVveH1DsMWfw_6k.png?access_token=snclfx-rbxqwgkysc-dd4a97e6e6839ac5fbe8401f6ef15844c85035a3

When an order is imported from Adobe Commerce, a link record is created per sales line within the spAASalesLineImportLink database table. This record contains the sales line’s External ID. If this setting is not defined, or it does not match to an existing SalesPad/GP Sales Line, then the External ID for the sales line will be used to find the corresponding Adobe Commerce order line.

Assignment Settings

Shipment Item Mapping - Define the mappings for exporting shipment item information.

The default calculation for this setting should account for any existing shipment quantity that is already on the Adobe Commerce order.

T5qLGx3k81D1lclbCc9LxYuwie_y-Zw15HzjUDuPqJFZTo4QEBSqf2-zyvuXEvWEQjdd6WoqV4Vqt_MJYSfD47J2LOqVyZdD4Ttw.png?access_token=snclfx-zhbjhqcssy-46679d321db072510ac19ff7ab31a734182985ff

Tracking Number Mapping - Define the mappings for exporting tracking information.

sp05ZxCKl8bFK2WbY4j6KFVD0ByrMllNTLXRY9ItkLHS37n6DihcIKWpPqoaETmpHdXITjS6vHH4Hi1RnBXwWmY8UYj7wWIdIQZA.png?access_token=snclfo-fkunpsjhin-ad333a74b886000021f0b933bb26d4cf14655189

Processing

The Order Update Export gets each order from Adobe Commerce as well as its shipments, and then it creates the new shipment, adds a comment, and updates the status to indicate that the export completed.

Scripts

Order Export Pre Submission Script - A C# Script that will execute prior to sending tracking info to Adobe Commerce.

Order Invoiced Export

Overview

This automation component processes Adobe Commerce orders that have been invoiced in SalesPad/GP and handles sending the invoice notification to Adobe Commerce.

General Settings

Capture Payment - Capture payment authorization if one exists on the Adobe Commerce order. Defaults to False.

Invoice Export Failure Queue - In the event of an unsuccessful export, the document will be placed into this workflow queue.

Invoice Export Queue - Queue that contains invoices ready to be exported to Adobe Commerce.

Invoice Notify - Notify customer of invoice update. Defaults to False.

Number Of Invoices Per Export Page - Specify the number of invoices in each page of the Order Invoiced export. Defaults to 50.

Update Adobe Commerce Order Status After Order Invoiced Export - The status to update Adobe Commerce orders to during the Order Invoiced Export. Leave blank to not update order status. Can use a custom status code set up in Stores -> Settings -> Order Status.

Update Order Status Comment For Invoiced Order - A comment to append to the Adobe Commerce order while updating its status during the Order Invoiced Export. NOTE: This setting will be ignored if Update Adobe Commerce Order Status After Order Invoiced Export is blank.

Processing

The Order Invoiced Export sends a notification to Adobe Commerce that indicates that Adobe Commerce should invoice that order.

Partial Invoicing and Payment Capture

The Order Invoiced Export component now supports partial invoicing and payment capture for partial invoices.

When an order is imported, the External_ID column on the imported document is set to the ID of the Adobe Commerce order, and the External_ID for each Sales Line Item is set to the ID of the corresponding Adobe Commerce line. When an order is transferred to an invoice - either partially or entirely - these External_ID values carry over to the invoice. The values will also carry over if the order is partially invoiced by splitting the document and then invoicing each split document.

When a partial invoice is exported back to Adobe Commerce , SalesPad Desktop uses the External_ID on the invoice to find the corresponding Adobe Commerce order, and it uses the External_ID on each sles line to determine the corresponding Adobe Commerce line item to invoice.

 

PayFabric Integration

Overview

PayFabric offers a gateway plugin for Magento 2.3 or higher that adds payment processing capabilities into Adobe Commerce without any custom coding.

There are currently two ways SalesPad Desktop can handle PayFabric transactions: during the Order Import and the Order Invoiced Export. These methods are currently incompatible with each other, so only one should be used at a time.

Order Import

PayFabric authorizations or charge transactions can be imported from Adobe Commerce during the standard Order Import. This allows users to capture authorizations or void charges during sales order processing in SalesPad.

Order Invoiced Export

PayFabric authorization transactions on Adobe Commerce orders can be captured when those Adobe Commerce orders are invoiced.

Due to Adobe Commerce API limitations, SalesPad Desktop cannot send payment data during export. This means that authorizations that have been captured or voided in SalesPad/GP will not be reflected in Adobe Commerce even if they were originally created in Adobe Commerce.

PayFabric Gateway Plugin

Configuration

The PayFabric Adobe Commerce gateway plugin can be downloaded from GitHub. Installation and configuration steps are outlined on the GitHub page.

Transaction Type

The PayFabric gateway can be configured to create authorization or charge transactions when orders are created. In Adobe Commerce, go to Stores -> Configuration -> Sales -> Payment Methods -> PayFabric Gateway and make sure the Payment Action is set to Authorization for authorizations or Sale for charges.

D1D3xFlfG5_JquEOxOWRrChoUPQfm549vZLNaXYEtuw6MXV8Urx5Csxorgu7nx9K7eRR1sKS9STTHrnUiJ7cXImZS1tNHHNC59OI.png?access_token=snclfv-pzlucmjlkb-432302bb6d85102a075de9b84b3b9118a999e4ec

If an authentication error occurs when saving these changes, it may be necessary to create a new device in the PayFabric portal.

5XrKLIyFbzTLgKaPwOj5jezCGqsrPT2e1KAoaetBvfUu4kAvdo7zBYKadWrm2UjXUVVdECsrRjAgpGknbfyYBdlqF8GTiui8_TBI.png?access_token=snclfw-gmymtxuyqs-af636da16ff2780b40c54a3740f9446b6c496aeb

In the PayFabric portal, go to Settings -> Dev Central -> Device Management and click the Generate button to create a new device. Enter the new device ID and password in the PayFabric Gateway settings in Adobe Commerce and save.

After successfully saving the changes, the Adobe Commerce cache must be flushed by going to System > Cache Management and selecting Flush Magento Cache.

Note: SalesPad Desktop will automatically create payments in SalesPad/GP for charge (sale) transactions.

Order Import

Configuration

Note: This documentation assumes that Adobe Commerce Order Import has already been configured. If that is not the case, please see the Order Import section of this documentation before proceeding.

The Adobe Commerce PayFabric order import integration in SalesPad Desktop is configured to work out of the box. To disable it or make adjustments, update the Sales Document PayFabric Mapping setting.

Yy408eXnD40LSY70Jwn6SSSb3GudnOYbboQgTmJAF5gVs8YoiFGawVTjgwpL9wrNPgPKhBLJUgGld5XDv5icNWRU1qTRl19coY1c.png?access_token=snclft-gjskbznclc-d2be462be27cf2aeb207424ccc08b51d49576dd2

Click the ellipsis (...) button to open the Mapping Configuration window.

AF6KK33Lyv7vE5vWEPWuplpHZdXcOPp3wpnqrVa9AgVVaX0hSSQ_Zp62nnPRAihoupvc90KsnBbkJ5x6T3N5cp50fUupsKPoBqsM.png?access_token=snclfv-creaevfzwi-23df0bd6caa707f6e686f3ee25d2a42c21ad034d

The default payment type is 3 (Credit Card Deposit), but this can be changed to 6 (Credit Card Payment) if needed.

PEnO31WkwpT7axCg_Pp8zlsOHRzB_CtCqmuLpr5lluWd-h9mZzsr3pI084Tt-Orp5SvNokU1ia7Tfjb9J46salQYFDMGG1m3uSK4.png?access_token=snclfz-puibkuopfe-ab13f5eb40649d36dd286e64a5e3beaa1473a05d

The default transaction ID mapping logic is as follows:

  • If the payment method is payfabric_payment, the LastTransId field in Adobe Commerce will be translated to the Transaction ID field in SalesPad.

  • If the payment method is not payfabric_payment or is blank, the transaction ID will remain blank and the payment transaction will not get imported.

 

6xp6zgy4l-8FOtOVkwnNmKeGBLG_MGRfcjBTY-yFg2UhhJlqiIFrf8dQUsiypBqIfzs746J5ouA1BdrbTbuZ7BX7ysX9psJsdTrU.png?access_token=snclfs-safrziizmd-26948fbae20b6e613ac4801255d4c4f93dc4417a

Creating Payments In Adobe Commerce

To create a new order in Adobe Commerce and take a PayFabric payment, follow these steps:

  1. Payment transactions may only be created in Adobe Commerce while logged in as a customer. To log in as a customer, navigate to the Adobe Commerce store website and click the Sign In button. Alternatively. log into the Adobe Commerce portal as an administrator: go to Customers -> All Customers, select the customer to log in as, select Edit, and then Login as Customer.

yGg25ObjwSQ3pYeD5BAFfxpH5JkK43GmBssSiMdz90hnb7ukQRUZqM9anMrx7KpXEDrh-oVK9axcfzP7CUUvNnmEwuKzDOM9LjmM.png?access_token=snclfx-wgyvxfeqbq-564a47846453e2cc86bbf64fe0002ef712d72c7c

wgq0hYuHxJGAXS-kh5xVme2CB-kDbBd7azCXhzQOBQXpr1TbqsEuP3tCJd0XUCTtpTLWeTUtHkeMmQsp5YfTkM-1kim8T87Z4pmA.png?access_token=snclfr-yujobjyyni-0f37c30b119368a9af8d33b0f36809fad41a3fa7

  1. After logging in as a customer, search for an item using the search bar and add at least one item to the shopping cart.

BfxuKZl3zP5Oj4d0l1oSZi9xeSvM_tqvITIrbxtpDG9NXehgYwY0k84TGNJhqPvsz_CrhkDv1YufHP0-Xysy_8-aIj6HQSVTAYr8.png?access_token=snclfs-jngxmywsik-ce9781557a8cc21645b9eee6a5aeeb9ff947b724

z4jbOxRWWh22RWmH0qIn_WgELhaWNySudbUrRY9Bj3gXdhdwWKl7hMSX6exeZjNkvzUAkbWOblovOpZdgMW5cfebe7pKjJocC0s0.png?access_token=snclfu-yqivprqusz-307ef1eaa861f911efa2cd411c68d7ed2bbe7c8d

  1. Open the shopping cart and click the Proceed to Checkout button.

 

dRTe60stuUdR1vQVGka3-0HqUYML9JxTKZuvw8sJhZJvNwHLGwQ98cK2bmhpjlsaGmKT1cDPHGW1igwrl9k_1N2UWNjxN233whwQ.png?access_token=snclg1-jljsudwneg-af826ecc8258456b70b6c50fd6b81e15de518a32

  1. Fill out the required shipping information and proceed to the next step. Make sure to select PayFabric as the payment method and then click Place Order to create the order.

eq5HkmSGStMuGuODpX4eYdqzfTFndDBnMjqXk8IJLrhHck8a6GsOGdqBtR2pkIx2FlbjMHoh1UEOtnfvWL_1k1uG7qcgxESxKgJ0.png?access_token=snclfs-dgyjqlzkoi-c31e85829296be7f2dfbf809256df753873775a6

The confirmation page should appear and state that the order has been created successfully.

H4X5oISIGKjxjTEw4j4CXL0AOJW7BW9KEv8K0GJgzCiHl40w6TtTTkYCFqs36tCDV4UPZDAAHdAYFB9Rp6OrycZ0hyWI5JNLW58E.png?access_token=snclft-yenzvvbadt-c565709d9b97ef9a959d9f2722630c8c42295f35

  1. Return to the Adobe Commerce portal and open the order by going to Sales -> Orders. Click View to view the order and then select the Transactions tab on the left-hand side. The PayFabric payment transaction for the order should appear in the grid. The transaction type will be Authorization for authorizations and Order for charges.

xMTkmP4xrtgUhNVr3L82HjgY-C1NykD25JCgyLK9XuvKemABjREFxsp-POKamI5a3MC0212T1Tqqgszm8pQIB0bb8FzX-zZSxHdY.png?access_token=snclfw-qdjpgwblns-625fc1db326fbff7a6f902ea54d6fa877cc5fff5

Importing Orders

After the order has been imported into SalesPad/GP from Adobe Commerce, the payment transaction should be visible on the resulting sales order.

nx3Cs5mrznvQV3POgprLJRFYwGT6H2iwaMQ5QUTpgxWY1EP9uoRGY7asu9iqMIQ4qqnnvGG5YWjMWwEr9QH3WR5Doysa-nnMr2FM.png?access_token=snclg2-leyveyfjgv-8b40e7d47958ee5b58f20852a65ddb321ed26d32

From here, transactions can be processed just as they would if they had been originally created in SalesPad/GP.

Note: Due to Adobe Commerce API limitations, SalesPad Desktop cannot send payment information back to Adobe Commerce. Capturing or voiding an authorization in SalesPad Desktop will not be reflected on the corresponding Adobe Commerce order.

Order Invoiced Export

Configuration

To capture payment authorizations during invoicing, make sure the Capture Payment setting is enabled.

yttSnjtuCd0LSxX06RpkJVrk-APGrhvwOT7xnGlI-DvRLXD4wdskBsmqkCELZVaOVCyHNnR103eZWH17VQ7nd-VKgJ2INFo7FAuY.png?access_token=snclfv-zplwvzxjzh-82b4939fe730f8c3901818e8fb4202de70374c15

Note that there are no matching or mapping settings to configure for invoice exporting.

Invoicing Orders

The Order Invoiced Export will invoice Adobe Commerce orders. In order for this to work, a SalesPad/GP invoice must be created from the SalesPad/GP sales order that was originally imported from Adobe Commerce.

Here are the steps:

  1. An Adobe Commerce order is imported by SalesPad Desktop and a new SalesPad/GP sales order is created. A link for the two orders is created in the spAAIntegratedEntityLink table in the database.

    1. In addition to the link in the spAAIntegratedEntityLink table, the External_ID column on the imported document is set to the ID of the Adobe Commerce order, and the External_ID for each Sales Line Item is set to the ID of the corresponding Adobe Commerce line.

  2. The SalesPad/GP sales order is invoiced in SalesPad Desktop or Dynamics GP.

  3. The SalesPad/GP invoice is exported to Adobe Commerce. This will invoice the Adobe Commerce order and capture any pending payment authorizations.

After an Adobe Commerce order has been successfully invoiced, the payment capture transaction should be visible on the Transactions tab.

4LM-vEjFQJHxS_o9WGkAAAjajFCDp4eeOqW3ioioak514Gsq0mg1DoZpYOV9buiNJI8NOLbixFX9Osveb9MCYyAbi-sist_PzNVQ.png?access_token=snclfx-gixqfdqwzq-c2fec51b763e2a9e433cbe22c34274ebbf42ca91

Payment Capture during Partial Invoicing

When a partial invoice is exported to Adobe Commerce, the payment for each line on the partial invoice will also be captured. Note that SalesPad Desktop itself does not capture the payment or determine the precise amount captured. The API call from SalesPad Desktop instructs Adobe Commerce to capture payment for certain lines, and Adobe Commerce is responsible for calculating the amounts and actually communicating with the payment gateway.

Processing

Enabling PayFabric payment handling does not result in extra API calls to Adobe Commerce. Certain fields are captured or sent in the existing processing for the Order Import and Order Invoiced Export. The Order Import will load the transaction from PayFabric if it is configured to import PayFabric transactions. If the Order Invoiced Export is configured to handle PayFabric transactions, then it will request that the PayFabric authorization is captured.

Multiple Stores

Overview

Adobe Commerce allows creating multiple different stores/websites within the same internal portal, which provides separate external portals that can be used for different customer types (e.g. B2B vs B2C). These individual stores share a single internal portal for configuration, and they share product and inventory availability information, but sales documents created within one store are specific to that store.

The Adobe Commerce integration within SalesPad supports this multiple store structure. When there are no significant configuration differences between how orders must be imported for the stores, then the Target Adobe Commerce Store setting can be left blank, and no other extra configuration is needed. This will ensure that the integration automatically imports orders from all stores and can later push updates for all of those orders back to their appropriate stores.

However, if each store requires different order processing that affects how the order syncing settings must be set (e.g. different Doc IDs, customer matching rules, document assignment rules, or invoicing/payment processes), then this requires extra configuration per store. This structure is documented below.

Configuration

When configuring the Adobe Commerce integration for a setup that involves different rules for orders from different stores, it is recommended to create one AA job for the shared data syncing, and then create one AA job for each store to handle syncing that store’s orders. Each job will be configured to trigger some components and not others.

For the shared job:

  • Leave its Target Adobe Commerce Store setting blank.

  • Configure the Product Export, Product Image Export, and Inventory Level Export as needed.

  • Do not configure the Order Import component.

  • Configure the Order Update/Invoiced/Voided Export components as needed.

    • The Order Voided Export should only be configured in the shared job, not the store-specific jobs.

    • The Order Update and/or Order Invoiced Export components can be configured in the shared job as long as some or all stores share the same target queue for processing, and the other settings for the component can all be configured the same way for those stores. Otherwise, these components can be configured in the store-specific jobs.

For each individual store job:

  • Set its Target Adobe Commerce Store setting to the store name configured in Adobe Commerce.

  • Do not configure any of the Product or Inventory components.

  • Configure the Order Import component.

  • Configure the Order Update/Invoiced Export components as needed.

    • The Order Update and/or Order Invoiced Export components can be configured in the individual store jobs as long as they have different target queues for processing. This is only necessary if they must have different target queues for processing, or if settings for the given component must be configured differently for the stores.

    • If the settings for the component must be configured differently for the stores, then the orders must also have different target queues for processing. This is because the target queues determine which job’s settings are followed.

    • It is allowed to have these components configured both in the store-specific jobs and the shared job as long as each component in each of those jobs has a different target queue for processing.

With this setup, the shared job will control the syncing of product and inventory availability information. All stores on the Adobe Commerce side will use this information. The shared job can also handle exporting order update information, because it can determine which store the order was imported from without relying on the Target Adobe Commerce Store setting.

Each store-specific job will control importing the orders for that store. Orders created on the website for that store will be imported by its specific job following the configuration in that job’s settings. If that order is later voided, the Order Voided Export in the shared job will handle updating that order on the website. Any other future updates or invoicing can be sent back to the website by the shared job or the store-specific jobs, depending on how this is configured and which target queue the order is directed to via workflow.

Helpful Unhelpful