This guide will detail how to edit the product mapping dictating how the information Sello receives from your external product source is saved, and whether to do it once or every time an update is received.
What is product mapping?
Product mapping is a set of filters that dictate how and where data is saved in Sello.
Product mapping lets you tweak how the data is received, but also where it will be saved. It can be used freely to map field A in your system to field B in the Sellos system and so on.
In addition to linking fields together, using product mapping, you can modify the information before it is changed such as extracting only a certain string out of a description, raising or lowering prices, and more.
Use cases
Product mapping is used to add or remove information for Sello to save, to alter the information that is saved, and to modify in which scenarios Sello saves it.
For example, you can utilize mapping when:
- You've added a new sales channel and new attribute requirements need data that you have in your source system
- You wish to modify the data Sello receives, such as adding a stock buffer, eliminating certain parts of your descriptions, and more
- You want Sello to stop reading certain information entirely
- You wish for Sello to save data just once so that you can make changes in Sello directly without it being overwritten
How does product mapping in Sello work?
The product map rules are written using SIFT, a language of our own design developed specifically for this purpose. It was created with ease of use in mind, but if programming/scripting is not your strong suit, we also have a visual mode that can be used.
For more information on what you can do with SIFT as well as some handy examples, you can consult the SIFT documentation.
Each product source in Sello will have its own mapping template, and you can edit all of them.
The SIFT editor is mainly meant to be used to quickly adhere to unique requirements on specific channels, therefore, all mapping is made based on the source data belonging to a specific product, fields belonging to a specific channel, and a specific category.
The source data (the data received from your external source) shown in both views will be based on the product you choose, and the fields you can map your data to will be based on the channel and category you choose in their respective lists.
Each time a product is received, the complete data is stored in Sello, which means that even information not yet mapped is readily available.
Each time you make a change to your mapping, Sello will automatically process all products again, using the latest version of data that was saved, which means that you can add information to your source system freely, and map it at a later time.
How do I modify my mapping?
To modify the rules in place for your integration, you'll need to find the SIFT editor.
Here's how:
- Log into Sello
- Go to: Settings -> Connectors
- Click: Settings
- Select a connection (if applicable)
- Click: Edit mapping
At this point, you can choose to use the visual mapping mode or the code view - Both have their uses and you'll find more info on both below.
How do I use the visual mapping mode?
Clicking Edit mapping will take you to the visual mapping view, this tool lets you link to map fields in your source system to a field in Sello.
To edit the mapping, you'll need to select a test product, which channel you are mapping fields for, and for what category.
Here's how:
- Select a test product in the first list
- Select a channel in the second list
- Select a category in the third list
Once the initial selections have been made, the interface will be visible.
The fields to the right contain what Sello found when fetching the product from your source the last time an update was made there, and the left contains the fields in Sello that can be used based on your selection.
To map data, you'll need to connect your source fields to Sello fields.
Here's how:
- Find your desired field
- Click your desired source field
- Click your desired Sello field
- Select mode
- Click: Save
When you are done editing the mapping, click: Save at the top
Modes
There are three modes available:
- Always - Sello will always use this mapping
- On update - Sello will only apply this mapping when updating products
- On create - Sello will only apply this mapping when creating products (i.e. only once)
If you wish to change or completely remove the mapping, simply click the line connecting the fields.
Legend:
- Dashed line: This mapping will be applied on either create or update, click the line to see which
- Solid line: This mapping will always be applied
- Code: This field is mapped using code in the code view
- Text: This field is mapped to a static value
How do I use the code view mapping mode?
If you wish to modify, alter, or otherwise transform your product data before it is saved in Sello, you need to make changes to the code directly.
For information on how SIFT works, what functions are available, examples, and more, please consult the SIFT documentation.
To get to the code editor, you first need to select a test product, which channel you are mapping fields for, and for what category.
Here's how:
- Select a test product in the first list
- Select a channel in the second list
- Select a category in the third list
When you've made selections here, you need to click: Show code view
At this point, you'll be presented with the SIFT code editor where you'll be able to make edits directly to the code. The contents shown here are everything you've mapped, regardless of the test product, channel, or category.
Modes
There are three modes available: always, update, and create.
Always means Sello will always use this mapping, update will only apply when products are updated, and create will only apply when products are created.
When mapping is applied is dictated by the ON statement. In the example below, Sello is instructed to always save prices and stock levels, internal names on updates and images, and barcode numbers on create:
//These rules will ALWAYS apply
sello "price" = price;
sello "industry price" = src("variant: rrp");
sello "quantity" = variant: inventory quantity;
//These rules will only apply when products are UPDATED
on "update" {
sello "private name" = src("title");
}
//These rules will only apply when products are CREATED
on "create" {
sello "images" = src("images");
sello "property GTIN" = src("variant: barcode");
}
Saving and reverting changes
When you are ready to save your changes, click Save at the top.
When you save, you'll be asked to write a comment detailing the changes you made, and when you click Save again, your changes will be saved along with your comment.
Should you need to revert the changes, you can click Show version history and select an earlier version by clicking Change to this version.
How do I know which fields I can map?
Visual mode
The fields under Fields in Source contain all data Sello was able to find attached to the currently selected test product
Under Fields in Sello, you'll find fields tied to the test channel and category to which you can map your fields.
Code view
At the top, you'll find lists containing all discovered fields in your system as well as the fields you can map your data to.
In the Fields in this category -tab, every field tied to your chosen channel and category will be visible.
In the Fields in your system -tab, you'll find all the fields Sello was able to discover attached to the test product you've chosen.
Will Sello fetch products again after I've modified my mapping?
Yes and no - Each time you make a change to your mapping, Sello will automatically process all products again, using the latest version of data that was saved, which means that you can add information to your source system freely, and map it at a later time.
How long it takes for your newly mapped changes to be visible largely depends on how many products you have.
Can I revert my changes if something goes wrong?
Yes, you can! Each change is saved as a version, and you can easily roll back should you need to. In the list of changes, you'll see the date the change was made as well as your comment.
Here's how:
- Log into Sello
- Go to: Settings -> Connectors
- Click: Settings
- Select a connection (if applicable)
- Click: Edit mapping
- Select product, channel, and category
- Click: Show version history
- Find your desired version
- Click: Change to this version