Method: Perfion.CreateConfiguration ( … )

  • Updated

 

Analyzes all the items and data of a special base feature directly in the Perfion database, and automatically creates a configuration of features based on what data is found on the items.
This method can save many hours of manual configuration work.

Syntax

Perfion.CreateConfiguration( string baseFeature, string itemDependencyFeature,
string excludeFeatures="", int allViews = 0, int depViews = 0, int createAllThreshold = 50 )

Method Parameters

string baseFeature Name or ID of the base feature on which to create a configuration (e.g. Product)
Is required
string itemDependencyFeature Name or ID of the feature on which to create item-dependencies (e.g. Category).
Used to organize features so they do not all appear for all items (e.g. certain feature are only relevant for certain categories).
Is required
string excludeFeatures A comma separated list of features to ignore (e.g. for some reason you do not want them in the configuration) (Default=blank)
int allViews An int with bit-flags to determine which Views to check on features that are included in the root of the configuration. (Default=0, means nothing checked)
NB: This will probably chance to become easier
int depViews Same as allView, but specifies which view to check on features that are dependent on certain items (e.g. only include in certain categories) (Default=0)
int createAllThreshold A threshold value between [0-100] that specifies what percentage of all the items need to have a value for a specific feature, in order to for the feature to be configured in the root. (Default = 50%)

Example

Below example shows how to automatically create a configuration in the current Perfion database, on the feature 'Product' and organized by the feature 'Category', and excluding the features 'Section' and 'Campaign', with a threshold of 50%, and setting some checks on some views in the configuration.

Perfion.CreateConfiguration(
"Product",
"Category",
createAllThreshold: 50,
allViews: 512,
depViews: 1024,
excludeFeatures: "Section,Campaign",
);

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.