Setting field values of a product in a quote
Learn how to set an Effective Price field in a Quote to the value of the List Price.
- Perform the following steps to set up lookup table data.
- Create a new custom object Price Table Entry with the following fields:
- Ownership (Text)
- Lead Source (Text)
- List Price (Number)
- Create one record of Price Table Entry and set the field values as follows:
- Ownership: Public
- Lead Source: Web
- List Price: 99
- Optionally, create other records with different values.
- Create a new custom object Price Table Entry with the following fields:
- Perform the following steps to create the rule.
-
In the Rules tab, click New and add the following rule.
- Rule Name: Set Quantity Based on Attributes
- Active: Select the field.
-
Define a Condition that checks if the Quote has Products.
- In the CONDITION section, click Add Criteria.....
- In the first Attribute Type field, click and select Rollup Value.
- In the Object field, click and select Rate Plan.
- In the Rollup Type field, click and select Count.
- Change the is equal to to is greater than in the pick list.
- In the second Attribute Type field, click and select Static Value.
- In the Value field, type 0.
Define the Action that sets the Effective Price based on the Price Table Entry records.
- In the ACTIONS section, click Add Action.....
- In the Action Type field, click and select Update Product.
- In the Object field, click and select Charge.
- In the Field field, click and select Quantity.
- In the New Value Type field, click and select Lookup Value.
- In the Lookup Object field, select Price Table Entry.
- In the Value Name field, select List Price.
- For Attribute 1, select Ownership.
- For Attribute Value Type, select Object Field Value.
- Click on Object Field, and select Quote > Account > Ownership.
Click the + button next to Attribute 1 to add a second attribute.
For Attribute 2, select Lead Source.
- For Attribute Value Type, select Object Field Value.
- Click on Object Field, and select Quote > Opportunity > Lead Source.
In n the Message field, type Charge Price updated.
Click Save.
-
- Perform the following steps to verify the rule.
- Create or update an Account and set the Ownership value to Public.
- Under that Account, create or update an Opportunity. Set the Opportunity's Lead Source value to Web.
- Under this Opportunity, create a New Subscription Quote.
- In the Guided Selling flow, add a Per Unit product to the quote.
- On the Edit Products page, verify that the Quantity of the product is updated to 99.
- The Rules Engine Logs section shows the message Quantity updated that you have specified in the rule.
- Optionally, update the Account's Ownership or the Opportunity's Lead Source values to other values that match a Quantity Table Entry. Refresh the product selection to validate the new quantity matches this Quantity Table Entry's Quantity field.
- Ensure that any valid combination of attribute inputs matches at least one record of the Lookup Object when you use the multi-attribute pricing rule. Otherwise, the calculation will not be possible.
Lookup Object records can also contain a wildcard character "*" in an attribute field to match against any input value.