Staging
In most implementations, each item (product) exists only once in Perfion.
But in some cases, it can be beneficial to have the same item in several “stages”, representing for example an active and a draft version of the same product. This can be done via Perfion Staging, which adds an additional dimension to the items.
Use cases for the staging functionality include:
Imported data can be placed in a “draft” version for approval
Maintaining different status codes for the same item
A new version of an entire product series, to be prepared in parallel to the active one
Using staging, involves two main steps:
Configuring stages
Working with stages
Setting up stages
The stage feature is used to control the various stages an item is in. The stage feature is a normal string selectable with the feature name “stage”.
The various selectable items (the items available for selection) is the various stages.
Follow these steps to create a stage feature:
Step | Description | Image |
1 | Create a new feature: In Features, right-click on Strings and select “Add-new”. This will bring up the Feature Definition window |
|
2 | Enter details In the Feature definition window fill out these:
|
|
3 | Add to configuration When the stage feature has been created, add the feature to the product configuration | - |
4 | Link created stage feature to the relevant basefeature by
|
|
5 | RESULT: Stage feature has been created. |
|
Individual stages are setup just as items available in a selection feature. This is done in “Feature data”. Follow these steps to add stages to the stage feature:
Step | Description | Image |
1 | Select feature In Feature Data, click on the newly created stage feature. |
|
2 | In the right side, right-click on a white area and select “Add new” | - |
3 | Type in Stage name | - |
4 | Repeat pt. 2-3 for as many stages as needed |
|
5 | Result Stages has been created. TIP: Stages can be added, edited and removed later this way. Only notice, that there might favorite searches depending on the individual stages. | - |
Working with stages
Stage quick filter
When stages have been setup, each categorizer will have a quick filter to quickly apply a filter of items in a specific stage.
Setting up compare favorite searches
Please refer to documentation regarding favorite searches for general information of setting up favorite searches.
Overview
The compare favorite searches give the opportunity to compare the same item in multiple stages.
The compare favorite search can compare two items with e.g. same Item number, but different stages. Only two different stages can be compared.
This can be used, when importing changes to already existing items, to compare the imported items with the already existing items.
API searches
The compare search is setup in the favorite search, where the API search is used. The compare search is therefore also available in standard API searches.
EXAMPLE: Following is an example of the API query using the Compare clause method.
<Query>
<Select languages='EN'>
<Feature id='ItemNumber' />
</Select>
<From id ='Products'/>
<Where>
<Clause id='Stage' operator='=' value='New items' />
<ClauseMethod id='Compare' operator='!='>
<Parameter id='StageFeature' value='Stage' />
<Parameter id='KeyFeature' value='ItemNumber' />
<Parameter id='Stage1ID' value='6160' />
<Parameter id='Stage2ID' value='6161' />
<Parameter id='IncludeOtherID' value='1' />
<Parameter id='CompareFeatures' >
<Value>Manufacturer</Value>
<Value>IntroductionDate</Value>
</Parameter>
</ClauseMethod>
</Where>
</Query
This example searches for item numbers, for items with same item number in two stages (stages with id 346 or 347), where manufacturer or introduction date is different (for the item of the two stages).
Compare Clause Method
The compare clause method has following parameters and attributes:
Attribute Operator | The operator in the clause method can be:
|
StageFeature | The stage feature determines the feature, which contains the stage value of the item. This has to be “Stage” by default. |
KeyFeature | The key feature determines the feature, which identify the item within the stage. This is typically ItemNumber. This means, that the function will compare items with same key feature, but different stages. TIP: If the base feature is used to identify the item (Product), the key feature should be “String” (if the Product feature contains the item number). |
Stage1ID | This is the ID of the first stage to compare with |
Stage2ID | This is the ID of the second stage to compare with The ID is found in the stages feature for the individual stage item:
The order of the two Stage id’s is not important with = and != (either they are the same, or they are not the same). The order is, however, very important for IN and NOT IN. The order should be understood so that
|
IncludeOtherFeatureId | N/A |
CompareFeatures | This defines the features, which should be compared against. If CompareFeatures is empty, all features will be compared, excluding the stage feature. The XML tag for empty CompareFeature is: <Parameter id=’CompareFeatures’ /> |
Examples
In the following samples, the following stages are used:
Stage: Development ID: 6160 |
|
Stage: Production ID: 6161 |
|
Example 1: Changed Items
Following search will search for items, which are different in the two stages:
<Query>
<Select languages='EN'>
<Feature id='ItemNumber' />
</Select>
<From id ='Products'/>
<Where>
<Clause id='Stage' operator='=' value='Development' />
<ClauseMethod id='Compare' operator='!='>
<Parameter id='StageFeature' value='Stage' />
<Parameter id='KeyFeature' value='ItemNumber' />
<Parameter id='Stage1ID' value='6160' />
<Parameter id='Stage2ID' value='6161' />
<Parameter id='IncludeOtherID' value='1' />
<Parameter id='CompareFeatures' />
</ClauseMethod>
</Where>
</Query>
Example 2: New Items
Following search will search for items, which are present in stage “Development” (346), but not present in “Production” stage (347):