Strategy migration utility tool
A utility is provided to migrate the strategies created using the old user interface to the new models so that they can be viewed and edited on the new user interface.
In addition, this strategy migration tool can be used to revert the migration of the strategies of the 12.0 Unica Interact interactive channel's to the older model.
Usage
By running the strategy migration utility, an older strategy can be planned to migrate to a smart strategy in Interact version 12.0. Users are able to migrate selective strategies or all strategies based on their requirements.
By running the same utility, a migrated smart strategy can be reverted back to the old model. Similarly, reversion can be done on selective strategies or all strategies based on their requirements.
Properties setups for the strategy migration utility
Before running this utility, users must navigate to the path <Installation_Directory>\Interact\interactDT\tools\upgrade\conf and open ‘StrategyMigration.properties file for configuring properties required for the desired migration or reversion.
Users must change the following properties based on the usage.
- DeleteOldRulesAndRuleGroups: This property decides whether the
migrated rule group (UACI_RuleGroup) and rule (UACI_Rule) data after
migration must be deleted. This property is only applicable for
migration.
- If this property is set to
YES
, then the migrated strategy cannot be reverted to the old model. Therefore, it is recommended to keep the value of this property toNO
, so that there is a possibility of comparison to decide whether reversion is required after migration. In case this property is set toYES
, you must keep the back up of data for UACI_RuleGroup and UACI_Rule tables. - If this property is set to
No
, the old strategy is still available for viewing through the associated campaign object. However, it cannot be edited or deployed.
Note: In version 12.0.0.0 or 12.0.0.1, if this property is set toNo
, the old rules still exist in Campaign database UACI_Rule table. While deploying migrated strategies to Interact runtime, the old rules are also deployed and may still take effect in getOffers calls, despite changes in migrated strategies. To avoid this behavior, customers are required to manually run scripts to delete old rules from UACI_Rule table after checking migrated data is fine. The following is a sample script.DELETE FROM UACI_Rule WHERE RuleGroupID IN (SELECT RuleGroupID FROM UACI_RuleGroup WHERE StrategyID IN (SELECT distinct(strategyid) FROM UACI_SmartRule));
DELETE FROM UACI_RuleGroup WHERE StrategyID IN (SELECT distinct(strategyid) FROM UACI_SmartRule);
This will delete old rules for all migrated strategies from the database. Then customers are required to re-deploy the migrated strategies so that old rules are also removed from Interact Runtime.
- If this property is set to
- ICNameList: This property specifies the interactive channels
whose strategies will be migrated or reverted. It must be a comma (,)
separated list of interactive channel names. For example:
ICNameList=WebIC1, WebIC2. If the strategies in all interactive
channels are required to be migrated or reverted, use an asterisk (*) as
the value:
ICNameList=*
. - StrategyNameList: This property specifies the strategies that are
migrated or reverted. It must be a comma (,) separated list of strategy
names. For example: StrategyNameList= WebStrategy1, WebStrategy2). If
all strategies need to be migrated/reverted, use an asterisk (*) as the
value: StrategyNameList=*.Note: ICNameList and StrategyNameList work together to determine which strategies will be affected. In other words, a strategy specified in StrategyNameList must exist in an interactive channel specified in ICNameList in order for it to be migrated or reverted.
Procedure for running the utility for migration or reverting migration
- Running the strategy migration utility for strategy
migrationThe strategy migration can be performed by executing the standalone batch file aciSmartStrategyUpgradeTool.bat or the shell script file
aciSmartStrategyUpgradeTool.sh
from path <Installation_Directory>\Interact\interactDT\tools\upgrade.Note:- If a strategy is marked for deployment or un-deployment state, it is skipped while this tool continues the migration for the rest of the strategies.
- If a strategy is already migrated and users are running the strategy migration tool for the same strategy, the tool gives the error message "The Strategy ID <strategyId> is already present in database and it is already migrated. Please use this migration tool to clean the new data and try again."
- Running the strategy migration utility for reverting strategy
migrationUsers can revert the migration of the strategy from version 12.0 to the previous version by running strategy migration utility. Users must run the command "
aciSmartStrategyUpgradeTool.bat REVERT
" or "aciSmartStrategyUpgradeTool.sh REVERT
" from path <Installation_Directory>\Interact\interactDT\tools\upgrade to revert the migration of strategy from Interact version 12.0 to the previous version.Note:- If a strategy is marked for deployment or undeployment, it is skipped and this tool continues to revert the rest of the strategies.
- After being reverted, a strategy is displayed on the interactive channel Summary page, but not available on the new strategy UI. It will also be editable and can be marked for deployment or undeployment.
- If the users have migrated the strategy from old to smart strategy and added or modify the migrated smart strategy from new UI, the new or updated rules will not be available after being reverted.
Strategy Data for migration
The strategy data migration process from the previous version to the current version 12.0 copies the data from the older UACI_Rule/UACI_RuleGroup/UACI_Predicate tables into UACI_SmartRule/ UACI_SmartRuleGroup/UACI_SmartRuleToRuleGroup tables.
The strategy data migration from the previous versions to the current version 12.0 includes the data upgrade to the UACI_SmartRule, UACI_SmartRuleGroup, and UACI_SmartRuleToRuleGroup tables.
- Data migration into UACI_SmartRule table: The data of UACI_Rule,
UACI_ RuleGroup, and UACI_Predicate tables is migrated into UACI_SmartRule
table. The column wise details of data migration from UACI_Rule, UACI_
RuleGroup and UACI_Predicate tables into UACI_SmartRule table are as
follows.
- The data of UACI_Rule table is migrated to UACI_SmartRule table. The
column wise details of data migration from UACI_Rule table to
UACI_SmartRule table is as follows.
Existing column name of UACI_Rule table Migrated column name of UACI_SmartRule table RuleId RuleId MarketWeight MarketWeight Disabled Disabled OfferID OfferID ZoneID ZoneID CreateDate CreateDate CreateBy CreateBy UpdateDate UpdateDate UpdateBy UpdateBy MaxScore MaxScore SuppressCount SuppressCount - The data of UACI_RuleGroup table is migrated to UACI_SmartRule
table. The column wise details of data migration from UACI_RuleGroup
table to UACI_SmartRule table is as follows.
Existing column name of UACI_RuleGroup table Migrated column name of UACI_SmartRule table CellId CellId StrategyId StrategyId SegmentId SegmentId LearningMode LearningMode LearningModeId LearningModeId - The data of UACI_Predicate table will be migrated to UACI_SmartRule
table. The column wise details of data migration from UACI_Predicate
table to UACI_SmartRule table is as follows.
Existing column name of UACI_Predicate table Migrated column name of UACI_SmartRule table PredicateId EligibilityPredicateId, ScorePredicateId EnableStateID EligibilityPredicateEnabled, ScorePredicateEnabled The value of EligibilityPredicateId, ScorePredicateId, EligibilityPredicateEnabled and ScorePredicateEnabled of UACI_SmartRule table will be migrated based on the following condition:Value of column UACI_Predicate.EnableStateID Migrated column value of UACI_SmartRule table 2 UACI_SmartRule.EligibilityPredicateId = UACI_Predicate.PredicateId, EligibilityPredicateEnabled = 1, ScorePredicateEnabled = 0 3 UACI_SmartRule.ScorePredicateId = UACI_Predicate. PredicateId, EligibilityPredicateEnabled = 0, ScorePredicateEnabled = 1 1 EligibilityPredicateEnabled = 0, ScorePredicateEnabled = 0 - If UACI_Predicate.EnableStateID = 2, then value of UACI_Predicate.PredicateId is migrated to the value of UACI_SmartRule.EligibilityPredicateId, and value of EligibilityPredicateEnabled and ScorePredicateEnabled will be set as 1 and 0, respectively.
- If UACI_Predicate.EnableStateID = 3, then value of UACI_Predicate.PredicateId is migrated to the value of UACI_SmartRule.ScorePredicateId, and value of EligibilityPredicateEnabled and ScorePredicateEnabled will be set as 0 and 1, respectively.
- If UACI_Predicate.EnableStateID = 1, then value of both the columns EligibilityPredicateEnabled and ScorePredicateEnabled is set as 0. We will keep default value as 0 for both EligibilityPredicateEnabled and ScorePredicateEnabled column.
Note: The value of UACI_SmartRule.RuleName is migrated asMigratedRule-< UACI_Rule .RuleId>
. The values of other columns of UACI_SmartRule table are migrated as their default values.
- The data of UACI_Rule table is migrated to UACI_SmartRule table. The
column wise details of data migration from UACI_Rule table to
UACI_SmartRule table is as follows.
- Data migration into UACI_SmartRuleGroup table: The data of
UACI_RuleGroup table will be migrated into UACI_SmartRuleGroup table. The
column wise details of data migration from UACI_RuleGroup table to
UACI_SmartRuleGroup table is as follows.
Existing column name of UACI_RuleGroup table Migrated column name of UACI_RuleGroup table RuleGroupID RuleGroupID StrategyId StrategyId CreateDate CreateDate CreateBy CreateBy UpdateDate UpdateDate UpdateBy UpdateBy Note: The value of UACI_SmartRuleGroup.RuleGroupName is migrated asMigratedRuleGroup-< UACI_RuleGroup .RuleGroupID>
. The value of UACI_SmartRuleGroup.RuleGroupType is migrated as value 1, which indicates the ‘Normal’ value for ‘ABTesting’. The value of all other column of UACI_SmartRuleGroup table is migrated as per their default values. - Data migration into UACI_SmartRuleToRuleGroup table: The data of
UACI_Rule table will be migrated into UACI_SmartRuleToRuleGroup table. The
column wise details of data migration from UACI_Rule table to UACI_
SmartRuleToRuleGroup table is as follows:
Existing column name of UACI_Rule table Migrated column name of UACI_SmartRuleToRuleGroup table RuleID RuleID RuleGroupID RuleGroupID
Strategy data for reverting migration
If users run the strategy migration utility for reverting the migration from Interact version 12.0 to a previous version, then all the rules or rule-groups data of the migrated smart strategy from UACI_SmartRule or UACI_SmartRuleGroup /UACI_SmartRuleToRuleGroup tables will be deleted.