Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Set Up Product Qualification Rules

Learning Objectives

After completing this unit, you’ll be able to:

  • Define a custom field for product qualification.
  • Update the context definition to map the custom field.
  • Create a product qualification rule.
  • Create a qualification rule procedure.

Define Qualification Rule

So far, Manoj knows how to set up products in the InfinitraBytes catalog. Now, he plans to meet a key business requirement: make certain products visible only to customers in specific states. To do this, he uses product qualification rules to control visibility based on customer location.

Follow along as he defines a product qualification rule.

Define Custom Field

First, Manoj defines a custom field in the Product Qualification object. Follow along in your Developer Edition org.

  1. From Setup, in the Quick Find box, find and select Object Manager. It displays the list of available objects.
  2. Select Product Qualification.
  3. Click Fields & Relationships.
  4. Click New.
  5. In the New Custom Field page, select Text as the Data Type and click Next.
  6. Enter these details.
    • Field Label: Billing State
    • Length: 5
  7. Click Next
  8. For the Field-Level Security for Profile, select Visible and click Next. This makes the field visible to all security profiles.
    The New Custom Field visibility setting.
  9. Click Save.

The custom field to capture the customer’s state is now ready. The Account object has a corresponding field that stores the billing state information. The next step is to map these two fields in the context definition.

Extend the Context Definition

The ProductDiscoveryContext context definition defines the list of products to be displayed when customers browse the product catalog. Manoj extends it and adds a custom field in the appropriate node. Follow along.

  1. From Setup, in the Quick Find box, find and select Context Definitions.
  2. For ProductDiscoveryContext, click Dropdown and select Extend.
  3. In the Extend Context Definition window, enter the name as ProductQualificationContext.
  4. Click Save.
  5. In the Context Definitions page, go to the Custom Definitions tab, and then select ProductQualificationContext.
  6. Click Edit.
  7. Click Next and then Next again.
  8. In the Edit Attributes window, select the Account node.
  9. Click Add Attributes. A blank row is added to the list. Enter these details.
    • Name: BillingState
    • Type: INPUT
    • Data Type: STRING
      Add custom field in context definition.
  10. Click Next.
  11. Select the Account Node, scroll down to locate the BillingStatec attribute, and click + Add Tags next to it.Adding context tags.
  12. In the Add Tag Name field, enter BillingState.
  13. Click Done and then, click Save.

You have successfully created a custom context definition by extending the ProductDiscoveryContext context definition and added a custom field.

Map Custom Field in the Context Definition

Next, Manoj edits this custom context definition and creates a mapping of the custom field to the corresponding field in the sObject Account. Follow along in your Developer Edition org.

  1. In the ProductQualificationContext page, go to the Map Data tab.
  2. For ProductDiscoveryMapping, click Dropdown, and select Edit SObject Mapping.Editing sObject mapping.
  3. In the Edit Mapping window, select Mark as Default and then, click Map. If you are prompted to switch to the new UI for context mapping, click Proceed. The Context Mapping page opens.
  4. In the Node side panel, select Account.
    Source object selected in context mapping.
  5. For BillingState__c field, select BillingState and click Save. This step maps the fields in the context definition and the sObject.
    Corresponding fields mapped in the context definition.
  6. Save your changes.
  7. Switch to the ProductQualificationContext page and click Activate to activate the context definition.

You have now mapped the custom field in the context definition. Next, create the necessary decision tables.

Create Qualification Rule

Decision tables or qualification rules store and evaluate the conditions that qualify or disqualify a product. Follow along as Manoj creates a qualification rule to specify the condition for product qualification.

  1. From the App Launcher, find and select Product Catalog Management.
  2. On the home page, click the Qualification Rules tile. It displays the list of qualification decision tables.
  3. Click New and enter these details.
    • Name: Billing State Qualification
    • Description: Decision table for product qualification based on billing state
    • Application Usage: Product Qualification
    • Decision Table Type: Standard
  4. Click Save & Next.
  5. In the Conditions & Results step, enter these details.
    • Source Object: Product Qualification
    • Source Object Field: ProductId
      Selecting object fields.
  6. Click + Add Condition and for Source Object Field, find and select Billing_State__c.
  7. In the Results section, for Source Object Field, find and select IsQualified.The decision table for qualification rule.
  8. Click Save & Next.
  9. In the Behaviours step, enable Consider Null Values for Lookup and then, click Save & Next.
  10. Click Finish.
  11. In the Billing State Qualification page, on the Table tab, click View Object Record Page.
  12. Click New and enter these details.
    • ProductId: Laptop
    • Billing_State__c: CA
  13. Save your changes.
  14. Activate the newly created decision table. In the Billing State Qualification page, click Activate.Activate billing state qualification decision table.

You’ve successfully created the decision table that contains the rule for validating the product qualification. Next, create a qualification rule procedure.

Create Qualification Rule Procedure

Qualification rule procedures consist of a series of elements or steps that evaluate a product or a product category for qualification or disqualification. These steps are based on the conditions you define in the qualification rule decision tables.

  1. From the App Launcher, find and select Product Catalog Management.
  2. On the home page, click the Qualification Rules Procedures tile.
  3. Click New and enter these details
    • Name: Product Qualification Procedure
    • Usage Type: Product Qualification
    • Context Definition: ProductQualificationContext
  4. Save your changes.
  5. In the Qualification Procedures Versions section, select Product Qualification Procedure V1. The qualification procedure opens on a new browser tab.
    The Qualification procedure Versions section with versions.
  6. Click The Add element button, and then, click Evaluate Qualification.
  7. In the Lookup Table Details field, find and select Billing State Qualification.
  8. Add these details.
    • ProductId: ProductId
    • Billing_State: BillingState__c
    • IsQualified: IsQualified
    • Reason: Reason
      The Evaluate Qualification element with input fields defined.
  9. Save your changes
  10. Click The Expression Set Properties button and enter Rank as 1.
  11. Click The Element Details button and select Include in Output.
  12. Click Save and then, Activate.

The product qualification procedure that is evaluated when customers or sales reps browse for products during quoting is now ready.

Next Up

Nice work! In this unit, you defined the custom field, updated the context definition, defined the qualification rule and the qualification rule procedure. In the next unit, you test the qualification rule using a quote.

For now, click Check Challenge to Earn Points.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈