Video Summary
This video shows you how to map data from your Comestri PIM to an external platform using Channel Field Mapping.
Video Transcript
In this video, you’ll be taken through a selection of Comestri Channel fields and how they are mapped, using the Comestri Shopify Channel as an example.
You’ll see that there are common aspects to Field Mapping across Comestri Channels. You’ll also see that Channels have their own unique aspects.
This video starts on the Channels page with the ‘Sample Apparel – Shopify v2 – Practice1’ Channel selected by the Filter.
Field Mapping enables you to map data from your Comestri PIM into a format that is accepted by an external platform.
Start the Field Mapping process for a Channel by clicking the Configure cog.
The Channel Configuration page opens. Minimise the Comestri main menu by clicking the minimise arrow.
On the left, in the Channel’s Configuration menu, you then click Export > Fields.
You’ll see there are 3 types of Fields in the Shopify Channel – Product Fields, Variant Fields and Product Collection Fields.
- Product Fields represent the base Product Class level sent to Shopify (e.g. Colourway), reflecting Product listings on your Shopify site.
- Variant Fields represent the SKU Product Class level sent to Shopify (e.g. Size), reflecting sellable units on your Shopify site.
- Product Collection Fields can be used to turn Comestri Grouped Products into Shopify Collections, which are similar to categories.
Next, returning to Product Fields, you’ll be introduced to Primary Classes.
The Primary Classes section is used to specify the Product Class that represents the base level of the Products being sent to Shopify.
If you have multiple Product Class Structures for listing different types of Products on Shopify you can add a Primary Class for each Product Class Structure.
Here, there are 2 Primary Classes. One for Products listed at Style level and another for Products listed at Colourway3 level.
Primary Classes must be added before Product Filters and any other Fields.
To add a new Primary Class, click the New Primary Key button.
You can select from 2 Entry Types: Basic (most common) and Advanced.
- Basic – select the Primary Class from the list.
- Advanced – enter a Rule to select the Primary Class.
For Basic Entry Type, you also need to select the Source Product Class, which will become the Primary Class.
Adding a Primary Class will create default Field Mappings for the Product Fields.
You’ll also need to add Primary Classes for the Variant Fields and the Product Collection Fields.
Next, you need to set a Product Filter for the Product Fields. This Filter controls which Products are accepted into the Channel.
Product Filters consist of a series of IF THEN ELSE statements, followed by an ‘Accepted’ or ‘Rejected’ Result.
(N.B. To accept all Products into the Channel, you must still define a Filter. You do this by just adding a Result of ‘Accepted’.)
You’ll also need to set a Product Filter for the Variant Fields and the Product Collection Fields.
Next, you may need to edit some of the default Field Mappings.
To see the mapping for a Field, click the Field name. Here, you’ll click ‘description_html’.
Alongside the mapping you want to edit, click the ‘edit’ action.
The ‘Edit Mapping’ dialog box opens.
You can select from 4 Element Types: Basic, Static, Rule and Evaluation.
- Basic – map a Comestri PIM Field to this Field.
- Static – send a static value for this Field.
- Rule – create a Rule and/or enter Liquid template to map this Field.
- Evaluation – enter a JSON Logic rule to map this Field.
If you select Basic, for Context you can select a relative context (e.g. ancestor1) or a specific Product Class (e.g. Style3).
For Field, select the Comestri PIM Field (includes Attributes, Media, Inventory, Prices) to map to this Field.
If you select Static as the Element Type, the ‘Value Type’ Field and ‘Value’ Field appear.
- Value Type – select a Value Type from the list.
- Value – enter the static value to be sent.
Here you can see mappings have already been created for the ‘linked_simples’ Field.
If you select Rule as the Element Type, the ‘Value Type’ Field and ‘Rules’ Field appear.
- Value Type – select a Value Type from the list.
- Rules – construct a series of IF THEN ELSE statements and/or enter Liquid template in a Result field.
If you select Evaluation as the Element Type, the ‘Evaluation Contexts’ Field and ‘Rule’ Field appear.
- Evaluation Contexts – select one or more contexts.
- Rule – enter a JSON Logic rule.
Now, you’ll map the ‘linked_simples’ Field in Product Fields and the ‘linked_masters’ Field in Variant Fields.
The ‘linked_simples’ Field in Product Fields and the ‘linked_masters’ Field in Variant Fields are used to link the 2 sets of Fields together.
The ‘linked_simples’ Field links a Primary Class for the Product Fields to the corresponding Primary Class for the Variant Fields, so that different levels of a Product Class Structure are linked when sending Product data to Shopify.
Here you can see mappings have already been created for the ‘linked_simples’ Field.
However, when you first add a Primary Class, there is no default mapping created for the ‘linked_simples’ Field.
Here’s an example of how the mapping for this ‘linked_simples’ Field was created.
Click on ‘linked_simples’, then click the ‘+New Mapping’ link. The New Mapping dialog box will open.
For Primary Product Class, select the Primary Class in Product Fields you want to map from.
For Context, select the corresponding Primary Class of the Variant Fields you want to map to. Then click Save.
By selecting these Fields, you’re linking a Primary Class of the Product Fields down to a Primary Class of the Variant Fields.
Next, you’ll map the ‘linked_masters’ Field under Variant Fields.
As shown previously with ‘linked_simples’ for Product Fields, you can see here that mappings have already been created for the ‘linked_masters’ Field.
However, like Product Fields, after adding a Primary Class to the Variant Fields there is no default mapping created for the ‘linked_masters’ Field.
A ‘New Mapping’ for the ‘linked_masters’ Field is created in the same way as the ‘linked_simples’ Field example shown earlier.
However, the Primary Product Class will be the Variant Fields’ Primary Class, and the Context will be the Product Fields’ Primary Class.
This mapping will link a Primary Class of the Variant Fields up to a Primary Class of the Product Fields.
(N.B. Most Comestri Channels perform Product Class level linking in this way, but some use alternative methods.)
Now, turning to the Variant Fields, these also have Primary Classes, Product Filter and other Fields, including the ‘linked_masters’ Field.
All these Variant Fields elements need to be mapped in a similar way to those in Product Fields.
Lastly, Product Collection Fields are unique to the Shopify Channel and these map Comestri Grouped Products to Shopify Collections.
Product Collection Fields also have Primary Classes, Product Filter and other Fields, including the ‘linked_simples’ Field.
All these Product Collection Fields elements need to be mapped in a similar way to those in Product Fields.
However, the ‘linked_simples’ Field is used to link the Product Collection Fields to the Product Fields.
In this video, you’ve seen how the Fields in the Comestri Shopify Channel are mapped.
Fields in other Comestri Channels are mapped in a similar way.