Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Configure Mapping Rules and Conditions

Learning Objectives

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

  • Configure mapping rules in a decomposition relationship.
  • Create conditions in a decomposition relationship.
  • Verify a decomposition relationship.

Create Mapping Rules for the Decomposition Relationship

Remember the decomposition relationship that Greg created in the previous unit? Conditions and mapping rules provide the necessary direction to that relationship so it triggers and progresses the order fulfillment journey.

Mapping rules define the information from the source product that is passed to the destination product, and then to the downstream systems. The source product data can be a field or an attribute, but the destination product data must be stored as an attribute.

While defining mapping rules, you must provide inputs for these four fields. Click each field to learn more.

Greg’s now going to create a static mapping rule to provide the modem standard code for Home Hub 2000 CFS. This rule specifies that any time this decomposition relationship triggers, the decomposition process sets the Modem Standard attribute to G.992.3;G.992.5.

The product model depicting a static mapping rule in a decomposition relationship.

  1. Open the Home Hub Modem > Home Hub 2000 CFS decomposition relationship you created.
  2. In the Mapping Rules section, click New Rule.The Mapping Rules section with the New Rule button highlighted.
  3. In the New Rule window, add these details.
    • Mapping Type: Static
    • Static: G.992.3;G.992.5
    • Click Next.
      The Mapping Type and Static properties.
  4. Select Technical Attributes and save your changes.The Attribute Category and Attribute properties.

Now that Greg has defined the mapping rules for the decomposition relationship, he proceeds to add conditions for it too.

Create Conditions for the Decomposition Relationship

Conditions control a decomposition relationship. Industries OM initiates the decomposition of an order item only if the specified condition evaluates to true. Otherwise, Industries OM skips the decomposition relationship.

A condition is a lot like an SQL Where clause. However, rather than restricting the data set returned from a query, you use a condition as control logic for the decomposition process. For example, decompose an order only if data speed equals 40 Mbps.

Remember the Infiwave customer ordering the Back to School Student offer bundle? The bundle includes the Home Internet Solution broadband connection package. The package includes a Home Hub Modem with these two models.

  • Home Hub 2000 CFS: Available in two grades, Good and Better.
  • Home Hub 3000 CFS: Available only in the Best grade.

Study this product model to learn about the conditions that determine the models based on the grade.

The product model depicting the conditions in a decomposition relationship.

As shown in the image, if the customer places an order with either Good or Better as the grade, they get Home Hub 2000 CFS. They get Home Hub 3000 CFS if they opt for the Best grade.

Follow along as Greg creates the conditions for the decomposition relationship.

  1. Open the Home Hub Modem > Home Hub 2000 CFS decomposition relationship.
  2. Locate the Conditions section.
  3. For Condition Type, select OR.
    The Conditions section.The left and right side of an OR expression is started for you. The user interface (UI) helps you fill out the rest of the Boolean expression.
  4. For Condition Type, select Single Condition, and for Product Type, select Source Product Attribute.
  5. For Object Field, select Internet Services.
  6. Save your changes.The Select Criteria window.
  7. Set the Operator to Equals, then enter Good in the Conditional Value field.
  8. Follow steps 3–7 for the second condition, but enter Better in the Conditional Value field.
  9. Save your changes.
    The Conditions section with values for two conditions.
  10. Refresh the page and verify that the Condition and the Mapping Data are populated in JSON format under the Advanced section.
    The Condition Data and the Mapping Data in JSON format.

If you’ve been following Greg, you’ve created a decomposition relationship between Home Hub Modem and Home Hub 2000 CFS. During decomposition, this relationship functions as a one-to-one relationship, and when the customer orders the Home Hub Modem with a Good or Better internet grade, they receive the Home Hub 2000 CFS modem.

Finally, test it to ensure it’s working as planned.

Test the Decomposition Relationship

  1. From the App Launcher, find and select Order Management (OM).
  2. On the Orders page, click New.
  3. On the New Order window, provide these details.
    • Order Name: Home Hub 1:1 Order
    • Account Name: White, Noah
    • Order Start Date: Today
    • Price List: B2C Price List
  4. Save your changes.
  5. In the Power Launcher, find and select Configure Order. This step launches the cart.The Configure Order option in the Power Launcher.
  6. In the Products pane, search for Home Hub Modem, and click Add to Cart.The Products pane showing search results.
  7. On the notification message about missing attribute, click The take me there icon to invoke the configuration window.
    The Cart tab showing notification to configure the product.
  8. Set the Grade attribute to Good or Better, which corresponds to Home Hub Modem 2000 CFS. Remember, Best is set for the Home Hub 3000 CFS model.The Line Items Details window for Home Hub Modem product.
  9. Click Close.
  10. In the cart header, click Decompose Order.
    This action invokes the decomposition process and brings you to the Order Decomposition page, which shows the decomposition process results. You can see the source orders on one side and the decomposed fulfillment requests on the other.
  11. Next to Home Hub Modem, click The link icon . The highlight shows the link between the source order and the decomposed fulfillment request. The result of a decomposed order.

Are you wondering if there’s an easier way to handle all the manual tasks in the order decomposition process? Of course, there is! All the tasks you performed in a training playground till now help you understand how the process works, in and out. We have configured a Decompose Order button for you to see how the process works when it’s automated.

In a production environment, the decomposition process is invoked automatically when an order is submitted in the Industries CPQ Cart, and that automatically triggers the orchestration process.

You can also use the View Decomposition option from the Power Launcher to see the orders previously decomposed.

The SKIP resources are happy with their learning progress so far. Greg comes across as a good teacher as well.

Summary

In this module, you explored the Industries OM user interface and learned how to create technical products using Vlocity Product Designer. You also learned how to create a decomposition relationship, and set up conditions and mapping rules for it. Now, you are ready to implement a seamless order management for your business.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback