Create a Product Rule Based on a Prior Purchase

by Community Manager on ‎07-21-2015 06:09 PM - edited on ‎09-08-2015 12:46 PM by Community Manager

USE CASE: CREATE A PRODUCT RULE BASED ON A PRIOR PURCHASE

In this particular Use Case, we are disabling a Training product included in a Product Bundle currently being purchased because the customer purchased the Training product previously (product code: TRAINING).

 

Step 1: Create a Product Rule

    1. Navigate to the Product Rules tab.
    2. Click New and add the following Product Rule:

CreateRulePriorPurchase_Step1.PRule.png

Field Value
Product Rule Name Disable Training if Already Purchased
Conditions Met All
Scope Product
Evaluation Event Load
Type Selection
Active checkbox Selected
  1. Click Save.

Step 2: Create a Configuration Rule

    1. Navigate to the Configuration Rules section of your "Disable Training if Already Purchased" Product Rule.
    2. Click New Configuration Rule and add the following: 

SumVar_ConfigRule_DisableTraining.png

Field Value
Product Appliance Bundle
Product Rule Disable Training if Already Purchased
Active checkbox Selected
  1. Click Save.

Step 3: Create a Product Action

    1. Navigate to the Actions section of your "Disable Training if Already Purchased" Product Rule.
    2. Click New Product Action and add the following: 

SumVar_PAction_DisableTraining.png

Field Value
Rule Disable Training if Already Purchased
Type Disable
Product Training
  1. Click Save.

Step 4: Create a Picklist Value for the Summary Variable Filter Field

    1. Navigate to: Setup | Create | Objects | Summary Variable | Filter Field.
    2. Click New within the Picklist Values section.
    3. Add the following Picklist Value:

SumVar_FilterField_PickList_AssetPCode.png

 

Step 5: Create a Summary Variable

    1. Navigate to the Summary Variables tab.
    2. Click New and add the following Summary Variable:

SumVar_SumVar_CountTrainingAsset.png

Field Value
Variable Name Count of Training Asset
Target Object Asset
Aggregate Function Count
Aggregate Field Quantity
Filter Field Asset_Product_Code__c
Filter Value TRAINING
Operator equals
  1. Click Save.

Step 6: Create an Error Condition

    1. Navigate to the Error Conditions (Tested Variable) section of your "Count of Training Asset" Summary Variable.
    2. Click New Error Condition and add the following:

SumVar_ErrorCond_DisableTraining.png

Field Value
Rule Disable Training if Already Purchased
Tested Variable Count of Training Asset
Filter Type Value
Operator greater than
Filter Value 0
  1. Click Save.