Migration of triggered action

The TriggeredActionDBUpgradeTask migrates the data from old triggered action to new triggered action. This task runs along with existing upgrade utility tool.

The new triggered action contents are saved into UACI_EventAction , UACI_TriggeredAction, UACI_TABranch, and UACI_TAOffer tables.

During migration, old triggered actions data are retrieved from the Details column in UACI_EventAction table and saved in UACI_TriggeredAction, UACI_TABranch, and UACI_TAOffer tables.
Note:

1. Only Old triggered action with one value (Enable) of UACI_EventAction.ActionValue column is migrated

2. The migration of already migrated triggered action is skipped.

3. Migrated triggered action name is “MigratedTA_<EventActionID>” for column UACI_TriggeredAction.name

4. ‘Week’ channel delay type should be converted into ‘day’ delay type as ‘week’ delay type in new triggered action is not supported.

5. If there are multiple channels for a branch (eligibility/offer page data) in old triggered action, then multiple branches for each channel are created, i.e., creating multiple branches with same eligibility/offer data by differing only channel details.

6. In case of multiple offers, an offerlist is created on fly which have all these offers and this offerlist is created under InteractTA folder.

7. The following attributes were not used in old triggered action, so it loads in UI with default values: scorePredicateEnabled, scorePredicate, eligibilityPredicateEnabled, eligibilityPredicate, effectiveDate, expirationDate, learningMode, lmName, learningModelId, offerAttrExpressions

8. Since, the table name is not recieved along with the attribute name, so it is checked that particular attribute in all audience level, whereever it matches that option is selected.

In case, if that attributes belongs to multiple audience, then the first matched attribute is set in any audience level. Once, we initiate saving of migrated TA in new UI, it i saved with table name.