Map Data Feed Fields

Set Field Mappings in Point of Sale to transform data from external sources into the format that Point of Sale uses. Field mappings use transformations and regular expressions. When you import data feeds, the field mappings ensure that your data is accurate and consistent. This consistency helps to streamline your retail operations.

Add Fields

You can add fields manually by typing the field names individually, or you can add many fields at once from a file. For CSV, TSV, and PSV files the field names should be in the first row of the file. In an XML file, you can select a parent tag and add all of the child tags that are found beneath the first instance of the specified parent tag.

  1. In CMS, go to Feeds | Field Mappings.
  2. Click the blue + icon
Note
Note The Parent Tag is the tag used for a store entry but without the angle brackets. This can be found in the codebase. For example, in this code snippet, <store> is the parent tag used for store entries therefore, what should be entered into CMS is store.
<store>
  <name>
  <address>
  <city>
  <phone>
  <store-hours>
</store>

A screenshot shows store entered as the parent tag.

Map Fields

To map a Source Field to a Target Field:

  1. In CMS, go to Feeds | Field Mappings.
  2. Click a Source Field on the left to select it.
  3. Click a Target Field on the right to create the mapping.

Once a mapping has been created, a line points from the Source Field on the left to the Target Field on the right.A screenshot shows the mapping between the source product ID field and target ID field.

Important
Important In the initial file upload, the required Target Fields (denoted by an asterisk) must be mapped so they can be available as columns. However, they don’t need to have values and just need to line up with the schema.
Tip
Tip The GTIN (Global Trade Item Number) field is required for full POS functionality, particularly for Cycle Count manual search. If your source catalog does not natively populate GTIN, you can map an alternative identifier (such as productId or SKU) to the GTIN target field to ensure products can be added to cycle counts via manual search. For more information, see Learn about Cycle Counts in Point of Sale.

Use Custom Target Fields

When a Source Field does not fit any of the default Target Fields, use a custom Target Field:

  • CustomString
  • CustomInt
  • CustomDecimal
  • CustomDateTime

A custom field can be referenced from different contexts like the search config and PDP.

Map Many to One

It is common for a Target Field to be composed of multiple Source Fields. For example, a product description might be composed of various Source Fields that are transformed and ordered in a particular way. This functionality is easier to manage now. Click on a Target Field to select it and view all Source Fields that are mapped to it.

Tip
Tip Click a Target Field to select it. To unselect a Target Field, click it again or click the BACK button in the top bar.

A screenshot shows many field mapping to additional image link.

Set Source Field Sort Order

First, select a Target Field to see the Source Fields that are mapped to it. To change the order in which the Source Fields are concatenated (i.e., the sort order), just drag and drop them into the desired order. A screenshot shows fields in sort order.

Edit Separating Characters

When many Source Fields are mapped to one Target Field, the source fields are concatenated and a separating character or characters is placed between the fields.

To edit the separating characters:

  1. Select a target field to see the source fields that are mapped to it.
  2. Then click the gear icon. A screenshot shows the gear icon.
Example
Example

Replace Semicolons with Pipes

Let's say that your feed contains a column called AlternateImages that contains a list of image URLs separated by semicolons. Instead of generating a new feed, you can use a field transformation to replace the semicolons with pipes so that it conforms with the Google spec.

  1. Map AlternateImages to additional_image_link.
  2. Click the mapping line to launch the Transform Function popup.
  3. Select Replace All from the dropdown.
  4. Type ; in Find and | in Replace.
  5. Click OK then save.

Find Source and Target Fields

To filter the Source Fields and Target Fields, type into the search bars above the fields. This feature helps you locate fields and create mappings quickly.

A screenshot shows filtered lists of source and destination fields.

Filter Source Fields for Inventory Events

While creating field mappings for Inventory Event Exports you can filter the source column further by using the Event Picker Pulldown Menu.

A screenshot shows the event picker pull down menu.

Create Field Transformations

A screenshot shows the transform function dialog.

Field transformations are used to manipulate the data inside of a column.

To create a field transformation:

  1. Click on the mapping line.
  2. Select the type of transformation.
  3. Complete any required fields.
  4. Click OK then save.

Field transformations are indicated by a circular icon on top of the field mapping arrow. The letter inside the icon corresponds with the type of transformation.

Note
Note For examples of field transformations, refer to the Transformations & Regular Expressions article.

Test a Field Transformation

To test a field transformation function:

  1. Click on the mapping line to view the transformation function.
  2. Click Test Transformation.
  3. Enter an input value and click Test.A screenshot shows test values in the transform function dialog.

Map the ERP Config Field

Point of Sale includes a data mapping from the feed server, which will allow merchants to upload the store ERP configuration through the feed.

  1. Click the blue + in the upper left next to Source Fields. Tip: Clicking the store_erp_configuration field will change the UI to something similar to this: A screenshot highlights the plus icon.
  2. Select Add Field Manually.
  3. You will need to add new fields that the store ERP requires. E.g., storeDepartmentId, storeLocationId, storeCustomerId. The key names are referenced in the CSV. A screenshot shows the specification of a field name.
  4. Map all the keys to the store_erp_configuration under Target Fields. A screenshot shows an example field mapping.
  5. Click on the Composite icon (C) to modify the transform using these rules:
    1. First field transformation rule example:
    2. Transformation 1 Replace Value: {"fieldName":"A screenshot shows transformation 1.
    3. Transformation 2 Replace Value: " A screenshot shows transformation 2.
    4. Middle field transformation rule example (Note: The store ERP could contain multiple middle fields):
    5. Transformation 1 Replace Value: ,"fieldName":"A screenshot shows transformation 1.
    6. Transformation 2 Replace Value: " A screenshot shows transformation 2.
    7. End field transformation rule example:
    8. Transformation 1 Replace Value: ,"fieldName":" A screenshot shows transformation 1.
    9. Transformation 2 Replace Value: "} A screenshot shows a transformation 2.
  6. If null is passed to the fields, then the ERP configuration will remain as the old ERP configuration in the Point of Sale database.

You can modify the order of the Source Fields by clicking and dragging the double vertical ellipsis. But make sure:

A screenshot shows the handles used for ordering source fields.

Additional Tips

  • Use labs environment - When testing a new feed or changes to field mappings do these tests in the labs environment.
  • Debug with small files - When debugging, don't use large feed files. Modify the file so that it is as small as possible but still allows for debugging.
  • Use regex tools - Use tools, i.e., regex101 and Java Regular Expression Tester when working with regular expressions.