Magento Upsert Configuration

Version 21.0.7996


Magento Upsert Configuration

Version 21.0.7996


The Upsert action inserts or updates Magento data. By default, if a record already exists in Magento, an update is performed on the existing data in Magento using the values provided from the input.

Tables and Columns

If you choose Upsert for the Magento connector, you must select a target table (or tables) from Magento. Click the + Add button above the Tables pane.

Add Table Button

A modal appears and lists all available tables. Select the desired table and click + Add.

Table List Modal

The chosen table appears under the Tables pane, and the columns in the table appear under the Columns pane. The connector automatically detects values that have special relevance (e.g. the primary key, foreign keys, etc) and labels them accordingly.

Table Column List

By default, all of the columns are selected for inclusion in the action for the Magento connector. You can exclude individual columns by un-checking them.

Note: You can select more tables by clicking + Add and repeating this process. See Child Tables for more information.

Example ArcESB Flow

After you choose the tables and columns for the Upsert-configured Magento connector, place the connector at the end of an ArcESB flow. The screenshot below depicts an example flow with a CSV connector, an XML Map connector, and a Magento Upsert connector at the end:

Data in this example flow passes through these steps:

  1. The CSV1 connector supplies a CSV file that contains data.

  2. This data passes to the XML_Map connector as the Source File, which maps to the Source tree.

  3. Data from the Magento_Upsert connector passes to the XML_Map connector as the Destination File, which maps to the Destination tree.

  4. The XML_Map connector attempts to automatically map Source elements to Destination elements with the same name. You can manually change these and fill in blank mappings by dragging elements from Source to Destination.

    XML Element Mapping

  5. The Magento_Upsert connector performs the Upsert according to the mapping and passes the resulting data to Magento.

XML Aggregate Columns

Most Magento database columns function as single elements for mapping. The examples above under Example ArcESB Flow demonstrate single-element columns.

Some columns appear in the Magento connector with the XML aggregate icon </> next to their names. In contrast to a standard single-element column, an aggregate column contains a collection of entities. The following screenshot shows an aggregate column called OrderItems in an Upsert-configured Magento connector:

Aggregate Row Icon

In an XML Map connector, the full structure of the aggregate column expands to display all of its contents. The following screenshot shows the OrderItems column expanded:

Expanded Aggregate Map

Each element of an aggregate column can be mapped the same way as single-element columns.