You are on page 1of 76

Vlocity Order Decomposition

Exercise Guide

Doc Version: XOM04 Vlocity Order Decomposition EG v8.0.1.docx


CONFIDENTIAL

Vlocity Order Decomposition - Page 2


CONFIDENTIAL

Table of Contents
Table of Contents ............................................................................................................................ 3
Legal Notice ..................................................................................................................................... 4
Document Conventions.................................................................................................................. 5
Preface ............................................................................................................................................. 6
Vlocity Product Overview............................................................................................................... 8
Quick Setup for Vlocity Communications .................................................................................. 10
Exercise DCP-1: Create Decomposition Relationships (25 mins) ........................................... 12
Exercise DCP-2: Create Multi-level Decomposition Relationships (30 mins) ........................ 29
Exercise DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) ................ 46
Exercise DCP-4: Using Product Class for Decomposition Relationships (45 mins) ............. 61
Exercise DCP-5: Creating Multi-level Decomposition Relationships ...................................... 72

Last Revision: 1/2/20

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 3
CONFIDENTIAL

Legal Notice
USE OF OUR EDUCATIONAL SERVICES, COURSES, AND TRAINING MATERIALS (COLLECTIVELY REFERED
TO AS “EDUCATIONAL SERVICES”) IS CONDITIONED UPON THE ACCEPTANCE OF THESE TERMS BY YOU
(ALSO REFERRED TO AS “PARTICIPANT”). BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR
USING THE EDUCATIONAL SERVICES, YOU AGREE THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO
BE BOUND BY THESE TERMS OF SERVICE. IF YOU DO NOT WISH TO BE BOUND BY THESE TERMS OF
SERVICE, PLEASE DISCONTINUE USE OF THE EDUCATIONAL SERVICES IMMEDIATELY.

For your review, the terms of service are available at the following URL:

https://vlocity.com/cms/resources/vlocity-university-terms-of-service-2016.pdf

Restrictions on Your Use

You are granted a nonexclusive, nontransferable, revocable, limited license to access and use our Educational Services
in accordance with the Terms of Service (https://vlocity.com/cms/resources/vlocity-university-terms-of-service-
2016.pdf). Only the authorized registrant may participate as a licensee and user of our Educational Services. As a
condition of your use of our Educational Services, you warrant to us that you will not use our Educational Services for
any purpose that is prohibited by the Terms of Service.

Our Proprietary Information

The material, content, and Educational Services provided by us or accessible from this Site and any other website
owned, operated, licensed, or otherwise controlled by us (the “Content”) is our proprietary information or the proprietary
information of the party that provided or licensed the Content to us, whereby we or such providing party retain(s) all
right, title, and interest in the Content.

Accordingly, the Content may not be copied, decompiled, reverse engineered, disassembled, transferred, distributed,
republished, resold, sublicensed, uploaded, posted, used to create derivative works, or transmitted in any way without
our prior written consent or the prior written consent of the Content owner, except that you may print out a copy of the
Content solely for your personal use, including as part of the applicable training or educational program.

Representations; Warranties; Disclaimer

YOUR USE OF OUR EDUCATIONAL SERVICES IS AT YOUR OWN RISK. THE EDUCATIONAL SERVICES ARE
PROVIDED “AS IS” AND WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED. WE
DISCLAIM ALL WARRANTIES, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT. WE DO NOT WARRANT THAT THE FUNCTIONS
OR CONTENT ASSOCIATED WITH OUR EDUCATIONAL SERVICES WILL BE UNINTERRUPTED OR ERROR-
FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT OUR SITE AND EDUCATIONAL SERVICES ARE FREE
OF VIRUSES OR OTHER HARMFUL COMPONENTS. WE DO NOT WARRANT OR MAKE ANY REPRESENTATION
REGARDING USE, OR THE RESULT OF USE, OF THE EDUCATIONAL SERVICES IN TERMS OF ACCURACY,
RELIABILITY, OR OTHERWISE. THE EDUCATIONAL SERVICES MAY INCLUDE TECHNICAL INACCURACIES OR
TYPOGRAPHICAL ERRORS, AND WE MAY MAKE CHANGES OR IMPROVEMENTS AT ANY TIME.

© 2020 Vlocity, Inc.

Vlocity Order Decomposition - Page 4 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

Document Conventions
This training material uses the following conventions.

Convention Meaning Example


Boldface text This formatting highlights the name Click Save.
of a button, menu, link, field,
checkbox, radio button, list, list
option, or panel.

[Boldface text in This formatting highlights a variable /services/apexrest/vlocity_[NS]/v2/DataRapto


brackets] name. Replace this value with the r/AccountExtract/
value for your training environment.

Monospace text This formatting highlights text that IF(CONTAINS(%input_string%, %valu


you must type exactly as it appears, e%), %thenValue%, %elseValue%)
or it is a code example.

VLOCITY SUPPORT

For questions or assistance with your Vlocity implementation, please contact Vlocity Support
or your account manager.

ADDITIONAL RESOURCES

Indicates additional supporting materials or online resources.

TIPS AND TRICKS | BEST PRACTICES

Indicates nice-to-know information, best practices, or useful tips and tricks.

Remove the titles that do not apply. For example, if the callout is a best practice, just have
“BEST PRACTICES” as the callout title.

IMPORTANT

Indicates cautionary or important information.

NOTE

This is an informational note. It provides more detail and draws the reader’s attention.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 5
CONFIDENTIAL

Preface
These training exercises are based on the Fall’19 release of Vlocity Communications. For additional
information about the topics covered in this module, see the documentation available in Vlocity Success
Community at https://success.vlocity.com.

Overview
This module covers fundamental features and functionality of the Vlocity Order Management application
as it pertains to order decomposition. Several different types of decomposition relationships will be
learned, used, and tested. (For example, one to many, many to one, and multi-level decomposition
relationships.)

This is a hands-on module with practical lab exercises. The lab exercises are designed to be used with
the provided Trialforce organization.

What You Will Learn


When you complete this training, you will be able to:

• Map commercial products to technical products through decomposition relationships


• Setup multi-level decomposition relationships
• Use condition rules and mapping rules in decomposition relationships
• Configure a product class and use it to reduce the number of decomposition relationships for
similar products

Prerequisites
The prerequisites for this module include a solid understanding of basic Salesforce concepts and
functionality. You should also have a good understanding of the principles of order management and a
working knowledge of the telecommunications industry business objectives.

About the Exercises


With Vlocity applications, it’s important to learn by doing. In this exercise guide, you’ll be presented with
many hands-on exercises. There are two types of hands-on exercises: lab exercises and challenge
exercises. It's recommended that you complete the exercises in order.

Lab exercises include:

• A brief scenario that explains the use case or business need that drives the
application feature or functionality.
• A list of tasks
• Step-by-step instructions on how to complete the tasks.

Vlocity Order Decomposition - Page 6 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

Challenge exercises include:

• A brief scenario that explains the use case or business need that must be met.
• A list of requirements or tasks to complete.

There are three levels of challenge.

A Level 1 Challenge:

• Reinforces the skills you learned in the lab exercises

A Level 2 Challenge:

• Is similar to a Level 1 Challenge


• Requires additional practice of the current skill or skills from previous lessons

A Level 3 Challenge:

• Is more advanced
• Requires you to integrate several skills from different lessons together

Challenge exercises solidify what you learned in the lab exercises, build your skills, and allow you to
make mistakes—which is how you will master this application.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 7
CONFIDENTIAL

Vlocity Product Overview


Vlocity Order Decomposition
Vlocity Order Management offers comprehensive functionality across two primary areas:

1. Order Decomposition (the focus of exercises in this module)

2. Order Orchestration and Management

What is Order Decomposition?


After the capture of a customer order, the first step in fulfilment processing is to decompose the order into
sub-orders, called fulfilment requests, tailored for specific downstream systems. The decomposition
process enriches information from the original order by executing rules that derive the technical attributes
required to fulfil the order. Vlocity Order Management uses Decomposition Relationships to define these
rules.

A decomposition relationship creates a one-to-one (1:1) relationship between a source product and a
destination product. To create a one-to-many (1:M) relationship, you can create multiple decomposition
relationships for any given source product. Finally, you can also create many-to-one (M:1) relationships
by using multiple decomposition relationships and the Scope function, which we will touch on later in this
training.

Vlocity Order Decomposition - Page 8 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

NOTE

Vlocity recommends designing your decomposition relationships in a diagramming tool or a


spreadsheet rather than designing them in the system. Like a good carpenter, you want to
measure twice and cut once! By doing so, you can review the decomposition design to
ensure that your decompositions are logical, efficient, and result in the fewest fulfilment
requests and callouts to external systems as possible.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 9
CONFIDENTIAL

Quick Setup for Vlocity Communications


Before starting your exercises, ensure that you have completed the setup tasks. This only needs to be
completed once for each Communications, Media & Energy org. For detailed information on these tasks,
please see Vlocity EPC training.

1. Set up My Domain.

a. Log into your training org.


b. Go to Setup.
c. In the Quick Find box, type my domain. Click My Domain.
d. In My Domain Step 1, enter a unique domain name. You can try the unique part of your training
org login plus the industry for this. For example, if your login is name@company.com.vusrvo-
999999, try vusrvo-999999-cme. Or if your login is student9999@cme.edu, try
student9999-cme.
e. Click Check Availability.
f. Click Register Domain. This process typically takes less than 30 minutes.

2. Calibrate product attributes.

a. Using the Lightning App Launcher in the upper-left, click the Vlocity CME Admin app.
b. In the Lightning navigation bar, click Vlocity Attributes.
c. Click Recently Viewed and change the list view to All.
d. In the upper-right, click Process Attributes.
e. Click Start processing.

3. Set up the platform cache

a. Open Setup in a new browser tab.


b. In the Quick Find box, type Platform Cache. Click Platform Cache.
c. Click Edit to edit the CPQPartition.
d. Under Org Cache Allocation, enter 5.
e. Click Save.
f. Click Back to Platform Cache Partitions.
g. Click Request Trial Capacity and click OK.
h. Close the Setup browser tab.

4. Initialize the platform cache.

a. Return to the browser tab that has the Vlocity CME Admin app open.
b. In the Lightning navigation bar, click Vlocity CMT Administration.
c. Under Admin Console, click Maintenance Jobs.
d. On the Maintenance Jobs page, find the PRODUCT HIERARCHY MAINTENANCE job, and
click Start.
e. In the Product Hierarchy Maintenance dialog box, click OK.
f. Messages should display indicating that the job completed successfully.
g. At the bottom of the list of jobs, find REFRESH PLATFORM CACHE, and click Start.
Vlocity Order Decomposition - Page 10 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

h. In the REFRESH PLATFORM CACHE dialog box, click OK.


i. A message will display on the page indicating that the job completed successfully.

5. Deploy Your Domain.

a. Go to Setup.
b. In the Quick Find box, type my domain. Click My Domain.
c. If your domain is ready to be deployed, you will see My Domain Step 3. If you do not see this,
wait until your domain is ready. You should receive an email notification.
d. Under your domain name in the middle of the page, click the Log in button to relaunch your
browser in your domain.
e. Click Deploy to Users and click OK.
f. Click Switch to Lightning Experience to return to Lightning.
g. Close any extra browser tabs open in the old domain.

That’s it! Your Communications, Media & Energy training org is ready for you to begin the lab exercises.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 11
CONFIDENTIAL

Exercise DCP-1: Create Decomposition Relationships (25


mins)
Scenario

Now Felix needs to define the relationship between the commercial product, the Home
Hub Modem, and the two technical products he just created. He does this by creating a
Decomposition Relationship. This decomposition relationship will be used by Vlocity
Order Management to translate commercial products into technical products, which
provide more detailed product information—information not needed by the customer but
required by downstream fulfilment systems.

What You Will Learn


• Decompose commercial orders into fulfilment requests
• Define decomposition relationships between commercial and technical products
• Translate commercial product attributes into decomposition attributes using mapping rules
• Trigger decomposition using a condition rule

Task Overview
Task 1: Create decomposition relationships between the Home Hub Modem and Home Hub 2000
CFS and Home Hub 3000 CFS technical products
Task 2: Create a condition rule for the Home Hub Modem Home Hub 3000 CFS decomposition
relationship
Task 3: Creating a static mapping rule for the Home Hub Modem Home Hub 3000 CFS
decomposition relationship
Task 4: Create mapping rule and condition rule for the Home Hub Modem Home Hub 2000 CFS
decomposition relationship
Task 5: Test the decomposition relationships

Vlocity Order Decomposition - Page 12 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

Task 1: Create decomposition relationships between the Home Hub Modem and
Home Hub 2000 CFS and Home Hub 3000 CFS technical products

NOTE

Decomposition Relationships are defined using the Products screen, not the Product
Console.

In this exercise, you will build a one-to-many relationship between the Home Hub Modem and the two
technical products you created previously, the Home Hub 2000 CFS and the Home Hub 3000 CFS.

1.1 In the Lightning search dialog, enter home hub modem.

1.2 In the search results list, click Home Hub Modem.

1.3 Click the Related tab.

1.4 In the Decomposition Relationships (Source Product) related list, click New.

1.5 In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name Home Hub Modem-->Home Hub


2000 CFS
Destination (Product) Home Hub 2000 CFS

NOTE

Condition and Mappings Data (which will be discussed below) can be entered in JSON
format directly when creating a new decomposition relationship, but be warned—every
comma, colon and curly brace counts! In the next exercise, we will use tools to generate this
data, and thus will not have to worry about pesky syntax errors.

NOTE

The Source and Destination cardinality settings (Min/Max/Default Quantity) are reserved for
future functionality.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 13
CONFIDENTIAL

1.6 Click Save & New.

1.7 In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name Home Hub Modem-->Home Hub


3000 CFS
Destination (Product) Home Hub 3000 CFS

Vlocity Order Decomposition - Page 14 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

1.8 Click Save.

1.9 Under Decomposition Relationships (Source Product), click Home Hub Modem→Home Hub
3000 CFS.

IMPORTANT

If your screen displays a warning message in the Mapping Rules section like the one pictured
below, the product attributes on your destination product were not saved correctly. Go back to
the Attribute Properties facet in the Product Console for that product and save them again.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 15
CONFIDENTIAL

At this point, we’ve created decomposition relationships between the Home Hub Modem and our two
technical products, the Home Hub 3000 CFS and the Home Hub 2000 CFS. During decomposition, these
relationships as they are currently defined will function as a one-to-many relationship, and when the
customer orders the Home Hub Modem, they will get the Home Hub 2000 CFS and the Home Hub 3000
CFS.

But, obviously, they don’t need two modems, right? We must create the logic for the decomposition
process to decide which modem they need. We will do this with condition rules.

What are Condition Rules?

Just like you might expect, a condition rule places a condition on the decomposition relationship so that it
will only be initiated if the decomposition condition is true. Essentially, condition rules are like a WHERE
clause in SoQL or other query languages. Condition rules can evaluate attributes or fields on the order
item, as well as other fields that are related to the order item as long as the entire order is included in the
fulfilment request.

In our scenario, we will evaluate the Home Hub Modem’s Grade attribute. The values of this attribute are
Good, Better and Best. If the customer selects Best, they should be provisioned the Home Hub 3000 CFS
product. If they select Good or Better, they will be provisioned the Home Hub 2000 CFS.

NOTE

When condition rules are evaluated against values from an attribute picklist, the matching
algorithm evaluates the VALUE property of the picklist.

Vlocity Order Decomposition - Page 16 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 17
CONFIDENTIAL

Task 2: Create a condition rule for the Home Hub Modem→Home Hub 3000 CFS
decomposition relationship

2.1 Scroll down to the Home Hub Modem→Home Hub 3000 CFS decomposition relationship page.

2.2 In the Conditions related list, click + Add New Condition. (Note: On a small display you may
need to scroll down or collapse other sections to see the Conditions section.)

2.3 For Condition 1, enter the following information. For the Attribute/Field, use the search dialog to
select the Grade attribute.

Field / Property Value

Source Type attribute


Attribute/Field Internet Services-Grade
Operator =
Value Best

2.4 Click Save.

Now that we’ve defined the decomposition relationships and the conditions to control when they fire, we
can create mapping rules to provide data to the fulfilment requests that will result as a part of the
decomposition process.

Vlocity Order Decomposition - Page 18 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

What are Mapping Rules?

Mapping rules are used to define the information from the source product that will be passed to the
destination product, and thereby to downstream systems. The source product data can be a field or an
attribute, but the destination product data MUST be stored as an attribute.

There are three types of mapping rules:

• ad-verbatim: the source value is copied as is to the destination attribute


• list: list mappings are configured as pairs of source and destination values, and if the source
value is matched, the corresponding destination value is copied to the destination attribute
• static: allows you to specify a static text string as the destination attribute value

Now we’ll create a static mapping rule to provide the modem standard code for Home Hub 3000 modem
product. This rule will specify that any time this decomposition relationship fires, the decomposition
process will set the Modem Standard attribute to “G.993.2.”

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 19
CONFIDENTIAL

Task 3: Creating a static mapping rule for the Home Hub Modem→Home Hub
3000 CFS decomposition relationship

3.1 Scroll up and find the Mapping Rules section.

3.2 Click + Add New Rule.

3.3 In the Mapping Rule, set the Mapping Type to static.

3.4 Then, enter the following information. For the Destination Attribute, use the search dialog to
select the Modem Standard attribute.

Field / Property Value

Mapping Type static

Attribute/Field/Value G.993.2

Destination Attribute Technical Attributes-Modem Standard

3.5 Click Save. (Note: The Source Type will switch from Attribute to blank once saved.)

3.6 Refresh the page and expand the Advanced section.

Notice the Condition and Mappings data fields are now filled in with JSON data. We can copy this data to
the Home Hub Modem→Home Hub 2000 CFS Decomposition Relationship, and then edit this data for the
details as they pertain to the Home Hub 2000 CFS.

Vlocity Order Decomposition - Page 20 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 21
CONFIDENTIAL

Task 4: Create mapping rule and condition rule for the Home Hub Modem→
Home Hub 2000 CFS decomposition relationship

4.1 Expand the Advanced section and click the edit icon next to Condition Data. Copy the
Condition Data and the Mappings Data to a text editor like Notepad. (Be sure to copy the JSON
for both.)

4.2 Click Cancel to exit edit mode.

4.3 In Details under Source Product, click Home Hub Modem.

4.4 Click the Related tab.

4.5 In Decomposition Relationships (Source Product), click Home Hub Modem→Home Hub
2000 CFS.

4.6 In the Details tab, expand the Advanced section, and click the edit icon next to Condition Data.

Vlocity Order Decomposition - Page 22 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

4.7 Copy and paste the condition and mappings data that you copied in the first step to the
Condition Data and Mappings Data fields respectively.

4.8 Click Save.


Notice that mapping and condition rules now appear for this decomposition relationship. Now,
let’s change them to reflect the particulars of the Home Hub 2000 CFS.

4.9 In Mapping Rules, click the edit icon.

4.10 Change the Static Value to G.992.3;G.992.5. (Note: The trailing “.” is punctuation, not part of
the Static Value.)

4.11 Click Save.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 23
CONFIDENTIAL

4.12 Scroll down to Conditions and click Edit.

4.13 Change the Value to Good.

4.14 Click + Add New Condition.

4.15 Change the Condition Type to OR.

4.16 For the new condition, enter the following information.

Field / Property Value

Name Condition 2

Attribute/Field Internet Services-Grade

Operator =

Value Better

4.17 Click Save.

Now we can create an order and decompose it, which is how we can test these two new decomposition
relationships.

Vlocity Order Decomposition - Page 24 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

Task 5: Test the decomposition relationships

5.1 In the Lightning tab navigation bar, click Orders.

5.2 Click New.

5.3 In the New Order page, enter the following information.

Field / Property Value

Order Name Home Hub Order

Account Name White, Noah

Order Start Date [today]

Price List B2C Price List

5.4 Click Save.

TIPS AND TRICKS

Notice the VIEW DECOMPOSITION button in the actions drop-down menu. This button has
been configured for you in your training org. It allows you to see the decomposition of an
order that was previously decomposed.

5.5 Click CONFIGURE ORDER from the list of actions. This will launch Vlocity Cart.

5.6 In the PRODUCTS panel, find Home Hub Modem, and click Add to Cart.

5.7 On the red notification message, click the Take Me There icon to invoke the configuration
window.

5.8 Set the Grade attribute to Best.

5.9 Click Close.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 25
CONFIDENTIAL

5.10 In the cart header, click Decompose Order.

NOTE

The Decompose Order action and button are provided for testing and debugging purposes. In
a production environment, the decomposition process will happen automatically and would
then immediately kick off the orchestration process. Depending on your browser
configuration, you may need to allow pop-ups to decompose the order.

This action will invoke the decomposition process and bring you to the Order Decomposition page. This
page allows you to visualize the decomposition relationships that we just created and view the results of
the decomposition process. On the left side, you can see the Source Orders and on the right side, you
can see the fulfilment request that was created.
Vlocity Order Decomposition - Page 26 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

5.11 On the Source Orders side, click the link icon next to the Home Hub Modem. See the
highlight that shows the link between the source order and the decomposed fulfilment request. In
a simple order like this, it maybe not as impressive; but in a larger order, it will be!

5.12 Notice that the Home Hub Modem with the Grade attribute set to Best was successfully
decomposed to the Home Hub 3000 CFS, and the static mapping rule set the Modem Standard
(G.993.2) attribute value correctly.

Just to be thorough, test the other decomposition relationship by placing another order, but this time
configure the Grade attribute to “Good” or “Better.” After decomposing the order, you should see the
Home Hub 2000 CFS product beneath the Decomposed Fulfilment Requests. The Modem Standard
attribute should be set to “G.992.3;G.992.5” as well.

NOTE

You can only decompose an order once.

TIPS AND TRICKS

To easily test other attribute configurations, clone the first order, and then invoke Vlocity Cart
to add the modem.

DCP-1: Create Decomposition Relationships (25 mins) Vlocity Order Decomposition – Page 27
CONFIDENTIAL

Review
Confirm your understanding by answering these questions.

• What is a decomposition relationship?


• What are the three types of decomposition relationships?
• What does a condition rule do?
• What does a mapping rule do?
• What are the three types of mapping rules?
• What types of information from the source product can be mapped using a mapping rule?
• Where must the mapping values be stored in a destination product?

Vlocity Order Decomposition - Page 28 DCP-1: Create Decomposition Relationships (25 mins)
CONFIDENTIAL

Exercise DCP-2: Create Multi-level Decomposition


Relationships (30 mins)
Scenario

Now that Felix has the hang of decomposition relationships, he decides to take it to the next
level: Multi-level Decomposition! RoadRunner’s DSL Service product spec is bundled in the
Back to School Student Offer as part of the Home Internet Solution product spec, and it
needs to be decomposed first into CFS products and then into resource products. This will
require multi-level decomposition relationships.

What You Will Learn


• Create multiple levels of decomposition relationships
• Use decomposition matrices to speed decomposition relationships creation
• Translate attribute values using list mapping rules
• Decompose attribute values using ad-verbatim mapping rules

Task Overview
Task 1: Review multi-level decomposition design
Task 2: Use a decomposition matrix to create decomposition relationships for the DSL service
product spec
Task 3: Add mapping rules to the new decomposition relationships
Task 4: Use destination decomposition relationships to create decomposition relationships for the
resource products
Task 5: Test the new multi-level decomposition relationships

What are multi-level decomposition relationships?

There are many factors that should be considered when designing your product model; we discussed
some of them in the earlier exercises on technical products. In addition to those considerations, Vlocity
Order Management also recommends that there be separate product entities (usually a resource) per
downstream system callout. Often, you will need to design one or two levels in between the commercial
product entity and the resource entity in order to ensure that the correct information is available to the
downstream systems.

With this kind of product model, you will need multi-level decomposition relationships to fully translate the
commercial product entity through the CFS or RFS product entity and on to the resource product entity
that will make the callout.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 29
CONFIDENTIAL

IMPORTANT

Vlocity recommends that you design no more than 4 levels in your decomposition
relationships in order to prevent exceeding Salesforce Governor Limits.

Task 1: Review multi-level decomposition design

1.1 Review the above diagram.

a. Notice the commercial product, DSL Service, will be decomposed into one of three CFS
product entities, based upon the Download Speed attribute set in the customer order.
b. The 2nd level product entities are then decomposed into resources in the 3rd level.

Vlocity Order Decomposition - Page 30 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

Task 2: Use a decomposition matrix to create decomposition relationships for


the DSL service product spec

What is decomposition matrix?

Instead of creating decomposition relationships one by one, you can use a decomposition matrix to map a
source product to multiple destination products based on a set of attributes. The resulting decomposition
relationships are the same as ones created manually with conditions; the tool just makes it easier.

NOTE

When creating a condition that evaluates an attribute with a picklist, the decomposition
process will evaluate the source value entered in the mapping rule against the picklist VALUE
of the attribute. The matching algorithm is case-insensitive.

2.1 In the Lightning search dialog, enter dsl service.

2.2 In the search results list, click DSL Service.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 31
CONFIDENTIAL

2.3 Find the Decomposition Rules section of the Product layout.

The first step is to specify the attributes that will be used in this matrix to determine the destination
products. All attributes assigned to the source product can be used in the matrix, if desired.

2.4 Click Edit Header Information.

2.5 Click Remove for Connection Type and Upload Speed attributes, leaving only the Download
Speed.

2.6 Click Save Data.

2.7 Click OK in the confirmation pop-up, and the page will reload.

2.8 Click Add New Row.

2.9 In the Download Speed box, enter 7Mbps.

2.10 In the Destination box, use the lookup and select ADSL CFS.

Vlocity Order Decomposition - Page 32 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

2.11 Click Add New Row.

2.12 In the Download Speed box, enter 12Mbps.

2.13 In the Destination box, use the lookup and select ADSL2+ CFS.

2.14 Click + Add Condition.

2.15 In the Download Speed box, enter 20Mbps.

NOTE

This creates a single condition with two possible attribute values that map to a single
destination attribute.

2.16 Click Add New Row.

2.17 In the Download Speed box, enter 40Mbps.

2.18 In the Destination box, select VDSL2 CFS.

2.19 Scroll to the top of the matrix, and click Save Matrix Data. Click OK in the confirmation pop-up.

2.20 Click the Related tab.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 33
CONFIDENTIAL

2.21 Notice the new relationships now listed in the Decomposition Relationships (Source Product)
related list.

A decomposition matrix is a handy tool, but notice that it allows you to create relationships from
source to destination only and you don’t have the ability to create mapping rules using this
interface. Sometimes it’s easier to create relationships from the destination to the source, and we will do
that later in this exercise.

As you saw, we specified two attribute values that map to the ADSL2+ CFS product: 12Mbps and
20Mbps. However, it’s important to note that when you specify these conditions in a
decomposition matrix that they are AND conditions. In our case, we need to change this to an OR
condition, so that it will decompose the DSL Service product if the customer selects 12Mbps OR 20Mbps.
We can do that by modifying the DSL Service-ADSL2+ CFS decomposition relationship conditions, which
we will do when we add the mapping rules in the next task to our new decomposition relationships.

This time we will create ad-verbatim and list mapping rules. When we create the list mapping, we will also
add a “transform clause” to our mapping rule, which will transform the download speed list to traffic codes.

Vlocity Order Decomposition - Page 34 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

Task 3: Add mapping rules to the new decomposition relationships

3.1 In the Decomposition Relationships (Source Product) list, click DSL Service-ADSL CFS.

3.2 Under Mapping Rules, click + Add New Rule.

3.3 In the Mapping Rule, enter the following information and click Save. For the Source and
Destination Attributes, use the search dialog to select the Connection Type attribute.

Field / Property Value

Source Type Attribute


Attribute/Field/Value Internet Services-Connection Type

Mapping Type ad-verbatim

Destination Attribute Internet Services-Connection Type

3.4 Under Mapping Rules, click + Add New Rule and scroll down the window to see the new rule
entry fields.

3.5 In the Mapping Rule, enter the following information.

Field / Property Value

Source Type Attribute

Attribute/Field/Value Internet Services-Download Speed

Mapping Type list

Destination Attribute Technical Attributes-Traffic Code

3.6 On the right side of the mapping rule, click Toggle expand.

3.7 Click the + sign next to Add New Transform/Mapping.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 35
CONFIDENTIAL

NOTE

When creating a mapping or transform rule that evaluates an attribute with a picklist, the
decomposition process will evaluate the source value entered in the mapping rule against the
picklist VALUE of the attribute. The matching algorithm is case-insensitive.

3.8 Enter the following transform information.

Field / Property Value

Source Value 7Mbps

Destination Value 7Mbps_TC1,50Mbps_TC4

NOTE

When evaluating values, every character matters. For example, the inclusion (or exclusion) of
white space is factored in. (“7 Mbps” is not equal to “7Mbps”.)

3.9 Click Save.

3.10 Refresh the page.

3.11 In the Advanced section, click the edit icon next to Mappings Data, and copy the Mappings
Data to a text editor like Notepad.

3.12 Click Cancel to exit edit mode.

3.13 Under Source Product, click DSL Service.

Vlocity Order Decomposition - Page 36 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

3.14 Click the Related tab.

3.15 In the Decomposition Relationships (Source Product) list, click DSL Service-ADSL2+ CFS.

3.16 Click the edit icon next to Mappings Data.

3.17 Copy and paste the mappings data from your text editor into the Mappings Data field.

3.18 Click Save, then refresh the page.

3.19 In Mapping Rules to the right of the Download Speed attribute, click Edit rule.

3.20 On the right side of the mapping rule, click Toggle expand.

3.21 Change the following transform values.

Field / Property Value

Source Value 12Mbps

Destination Value 12Mbps_TC1,75Mbps_TC4

3.22 Click the + sign next to Add New Transform/Mapping.

3.23 Enter the following additional transform information.

Field / Property Value

Source Value 20Mbps

Destination Value 20Mbps_TC1,200Mbps_TC4

3.24 Click Save.

3.25 Scroll down to the Conditions section, and click Edit.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 37
CONFIDENTIAL

3.26 Change the Condition Type to OR. (If you like, you can change the second condition name to
Condition 2 as well.).

3.27 Click Save.

NOTE

Changing the condition type to OR allows you to create multiple source attribute/field values
that map to a single destination attribute as we did earlier in this task.

3.28 Scroll to the top of the page, and under Source Product, click DSL Service.

3.29 Click the Related tab.

3.30 In the Decomposition Relationships (Source Product) list, click DSL Service-VDSL2 CFS.

3.31 Click the edit icon next to Mappings Data.

3.32 Copy and paste the mappings data from your text editor into the Mappings Data field.

3.33 Click Save, then refresh the page.

3.34 Scroll down to the Mapping Rules section.

3.35 In Mapping Rules to the right of the Download Speed attribute, click Edit Rule.

3.36 On the right side of the mapping rule, click Toggle expand.

3.37 Change to the following transform values.

Field / Property Value

Source Value 40Mbps

Destination Value 40Mbps_TC1,500Mbps_TC4

Vlocity Order Decomposition - Page 38 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

3.38 Click Save.

With these rules in place, the Connection Type attribute on the DSL Service product will be copied
directly to the Connection Type attribute on the CFS products. Additionally, Download Speeds will be
transformed into Traffic Codes for ADSL, ADSL2+, and VDSL2 CFS technical products.

Now we can move on to creating Destination Decomposition Relationships.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 39
CONFIDENTIAL

Task 4: Use destination decomposition relationships to create decomposition


relationships for the resource products

What are Destination Decomposition Relationships?

Destination Decomposition Relationships simply lists all of the decomposition relationships for which the
current product is the destination product entity, as opposed to the source product.

In our example, we can see that we have multiple decomposition relationships that must be created from
2nd level products to 3rd level products. Note, however, that this is not a one-to-many (1:M) relationship
because at run-time, only one product will be selected at the 2nd level of decomposition, and that single
product will be decomposed using the appropriate decomposition relationship.

4.1 In the Lightning search dialog, enter copper pair.

4.2 In the search results list, click Copper Pair Resource.

Vlocity Order Decomposition - Page 40 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

4.3 Click the Related tab.

4.4 Find the Decomposition Relationships (Destination Product) related list, and click New.

4.5 Notice Copper Pair Resource product has been automatically filled in for you as the Destination
(Product).

4.6 In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name ADSL CFS-->Copper Pair Resource

Source Product ADSL CFS

4.7 Click Save.

4.8 Click the link to the new decomposition relationship that you just created.

4.9 In Mapping Rules, click + Add New Rule.

4.10 In the mapping rule dialog, enter the following information. For the Source and Destination
Attributes, use the search dialog to select the Traffic Code attribute.

Field / Property Value

Source Type Attribute

Attribute/Field/Value Technical Attributes-Traffic Code

Mapping Type ad-verbatim

Destination Attribute Technical Attributes-Traffic Code

4.11 Click Save.

4.12 Refresh the page.


DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 41
CONFIDENTIAL

4.13 In the Advanced section of the Details page, click the edit icon next to Mappings Data, and
copy the Mappings Data to your buffer or a text editor like Notepad.

4.14 Click Cancel to exit edit mode.

4.15 Under Destination (Product), click Copper Pair Resource.

4.16 Click the Related tab.

4.17 Scroll down to the Decomposition Relationships (Destination Product) related list.

4.18 Click New.

4.19 In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name ADSL2+ CFS-->Copper Pair


Resource
Source Product ADSL2+ CFS

Mappings Data [paste in the mappings data from


your text editor]

4.20 Click Save.

4.21 In the Lightning search dialog, enter bonded.

4.22 In the search results list, click Bonded Copper Pair Resource.

4.23 Click the Related tab.

4.24 In the Decomposition Relationships (Destination Product) related list, click New.

Vlocity Order Decomposition - Page 42 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

4.25 In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name VDSL2 CFS-->Bonded Copper Pair Resource

Source Product VDSL2 CFS

Mappings Data [paste in the mappings data from your text editor]

4.26 Click Save.

These decomposition relationships will decompose the DSL service CFS product entities in the 2nd level
to the local loop resources in the 3rd level.

The next step is to create the relationships from the DSL service CFS products in the 2nd level to the
DSLAM Port resource in the 3rd level. No attributes need to be mapped from the CFS to the DSLAM Port
Resource; we will assume the DSLAM port number attribute will receive data from the downstream
network inventory system.

Try it! Create the decomposition relationships between the CFS products in the 2nd level to the DSLAM
Port Resource product in the 3rd level of the diagram.

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 43
CONFIDENTIAL

Task 5: Test the new multi-level decomposition relationships

5.1 In the Lightning tab navigation bar, click Orders.

5.2 Click New.

5.3 In the New Order page, enter the following information.

Field / Property Value

Order Name Multi-Level Order

Account Name White, Noah

Order Start Date [today]

Price List B2C Price List

5.4 Click Save.

5.5 Click CONFIGURE ORDER. This will launch Vlocity Cart.

5.6 In the PRODUCTS panel, find the DSL Service product, and click Add to Cart.

5.7 In the red notification message, click the Take Me There icon to invoke the configuration window.

5.8 Set the Download Speed attribute to 40 Mbps.

5.9 Click Close.

5.10 In the cart header, click Decompose Order.

5.11 In the Order Decomposition page, click the link icon next to DSL Service to highlight the linked
fulfilment request.

Because you selected “40 Mbps” for the Download Speed attribute, the DSL Service is decomposed to
the VDSL2 CFS product, and the Download Speed should have been translated to a Traffic Code, as in
the screenshot below. Then, the VDSL2 CFS should have been decomposed to the Bonded Copper
Pair Resource and the DSLAM Port Resource (if you created the additional decomposition
relationships).

Vlocity Order Decomposition - Page 44 DCP-2: Create Multi-level Decomposition Relationships (30 mins)
CONFIDENTIAL

5.12 Now go back and test DSL Service with other download speeds, to ensure that the other
decomposition conditions are working.

The next set of decomposition relationships to create requires many-to-one (M:1) decomposition, which is
covered in the next exercise.

Review
Confirm your understanding by answering these questions.

• What is multi-level decomposition?


• How many levels of decomposition are recommended in order to prevent exceeding Governor
limits?
• What is a decomposition matrix?
• What are the limitations of a decomposition matrix?

DCP-2: Create Multi-level Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 45
CONFIDENTIAL

Exercise DCP-3: Creating Many-to-One Decomposition


Relationships (30 mins)
Scenario

For Felix’s next trick, he will combine two order line items into one fulfilment request using a
many-to-one decomposition relationship. He impresses himself with his efficiency and
advanced decomposing!

What You Will Learn


• Streamline fulfilment requests using many-to-one (M:1) decomposition
• Trigger M:1 decomposition using scopes

Task Overview
Task 1: Review the M:1 decomposition design
Task 2: Create the M:1 decomposition relationships
Task 3: Test the new M:1 decomposition relationships

What is many-to-one (M:1) decomposition?

To allow for more efficient and streamlined process execution, Vlocity Order Management allows for the
results of a particular decomposition to be re-used rather than re-instantiated. Multiple products that are
on the same order can be decomposed to a single fulfilment request that is used to fulfil these products.
This is many-to-one (M:1) decomposition.
This type of decomposition is triggered by setting the Scope field on the product entity to “Account,” which
we will step through below.

NOTE

M:1 decomposition is supported only for new and simple MACD orders.

Vlocity Order Decomposition - Page 46 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

Task 1: Review the M:1 decomposition design

Review the M:1 decomposition design.

In this decomposition design, we will decompose the Installation product spec and the Home
Hub Modem product spec to the Installation System Resource product entity, which will make
a callout to the external installation system.
Notice that the attributes from the Installation product and the modem product can be
aggregated into the single Installation System product entity, which will be added to the
fulfilment request created by the decomposition process. We will also capture data coming
from the source product fields (rather than an attribute) and pass those along to the
destination product’s attributes.

IMPORTANT

If you have attributes that have the same name when using a M:1 decomposition relationship,
only the value from the most recently modified attribute will be decomposed in the fulfilment
request. Thus, when designing your product model, it is important to ensure that any
attributes intended for use in a M:1 decomposition relationship have unique names.

When designing a M:1 decomposition, note that you cannot create a multi-level M:1
decomposition. Referring to the diagram in Task 1 of this exercise, you cannot specify a
commercial product from the 1st level and a technical product from the 2nd level and
aggregate those in a technical product in the 3rd level. Instead, you can aggregate
commercial products from the 1st level into technical products, either on the 2 nd or 3rd levels
like the above example.

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 47
CONFIDENTIAL

Task 2: Create the M:1 decomposition relationships

In the Lightning search dialog, enter install.

In the search results list, click Installation System Resource.

Click the Related tab.

In the Decomposition Relationships (Destination Product) related list, click New.

In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Name Installation-->Installation System


Resource
Source Product Installation

Click Save.

Click the new decomposition relationship that you just created.

In Mapping Rules, click + Add New Rule.

Vlocity Order Decomposition - Page 48 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

In the mapping rule dialog, enter the following information.

Field / Property Value

Source Type Attribute

Attribute/Field/Value Services-Installation Type

Mapping Type ad-verbatim

Destination Attribute Services-Installation Type

Click + Add New Rule, and scroll down to the second mapping rule entry fields.

In the mapping rule dialog, set the Source Type to Field.

To set the Source Field, click the search icon, and then click the following in the FIELD
SELECTION dialog:

a. Order ID<OrderId>
b. Account ID<AccountId>
c. Account Name<Name>

Click Save.

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 49
CONFIDENTIAL

Complete the rest of the rule by entering the following information.

Field / Property Value

Mapping Type ad-verbatim

Destination Attribute Technical Attributes-Install Account


Name

Scroll to the top of the Mapping Rules section, and click + Add New Rule.

Scroll down to the third mapping rule entry fields.

In the mapping rule dialog, set the Source Type to Field.

To set the Source Field, click the search icon, and then click the following in the FIELD
SELECTION dialog:

a. Order ID<OrderId>
b. Account ID<AccountId>
c. Shipping Street<ShippingStreet>

Click Save.

Complete the rest of the rule by entering the following information.

Field / Property Value

Mapping Type ad-verbatim

Destination Attribute Technical Attributes-Install Street

Vlocity Order Decomposition - Page 50 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

Scroll to the top of the Mapping Rules section, and click + Add New Rule.

Scroll down to the fourth mapping rule entry fields.

In the mapping rule dialog, set the Source Type to Field.

To set the Source Field, click the search icon, and then click the following in the FIELD
SELECTION dialog:

a. Order ID<OrderId>
b. Account ID<AccountId>
c. Shipping Zip/Postal Code<ShippingPostalCode>

Click Save.

Complete the rest of the rule by entering the following information.

Field / Property Value

Mapping Type ad-verbatim

Destination Attribute Technical Attributes-Install Zip Code

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 51
CONFIDENTIAL

At the bottom of the Mapping Rules, click Save.

Scroll up to the top of the page, and under Destination (Product), click the link to the
Installation System Resource product.

Click the Related tab.

In the Decomposition Relationships (Destination Product) related list, click New.

In the New Decomposition Relationship dialog, enter the following information.

Field / Property Value

Decomposition Relation Home Hub Modem-->Installation System


Name Resource

Source Product Home Hub Modem

Click Save.

Click the link to the new decomposition relationship that you just created.

In Mapping Rules, click + Add New Rule.

Vlocity Order Decomposition - Page 52 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

In the mapping rule dialog, enter the following information.

Field / Property Value

Source Type Attribute

Attribute/Field/Value Internet Services-Grade

Mapping Type list

Destination Attribute Technical Attributes-Modem


Standard

Click Toggle Expand.

Click + Add New Transform/Mapping three times.

In the Transform/Mapping, enter the following values.

Source Value Destination Value

Best VDSL2+

Better ADSL2+

Good ADSL

Click Save.

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 53
CONFIDENTIAL

Scroll to the top of the Mapping Rules window, and click + Add New Rule.

Scroll down to second mapping rule entry fields, and set the Source Type to Field.

To set the Source Field, click the search icon, and then click the following in the FIELD
SELECTION dialog:

a. Price Book Entry ID<PricebookEntryId>


b. Product Code<ProductCode>

Click Save.

Vlocity Order Decomposition - Page 54 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

Complete the rest of the rule by entering the following information.

Field / Property Value

Mapping Type ad-verbatim

Destination Attribute Technical Attributes-Product


Code

At the bottom of the Mapping Rules window, Click Save.

Let’s take a look at the new M:1 decomposition relationships in action!

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 55
CONFIDENTIAL

Task 3: Test the new M:1 decomposition relationships

To test the many-to-one decomposition relationships you just set up, you’ll need to set the scope field on
the destination and product and create two orders. Product scope controls how many fulfilment requests
are created for the destination product. In order to highlight how the scope affects the decomposition,
you’ll set the scope before creating the orders. First, you’ll set it to Order Item. For the second order you’ll
set it to Account. The number of resulting fulfilment requests after decomposition will reflect the scope
change of the product.

In the Lightning search dialog, enter install.

In the search results list, click Installation System Resource.

Using the dropdown action menu, click Edit.

Set the Scope to Order Item.

Click Save.

In the Lightning tab navigation bar, click Orders.

Click New.

Vlocity Order Decomposition - Page 56 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

In the New Order page, enter the following information.

Field / Property Value

Order Name M:1 Order

Account Name White, Noah

Order Start Date [today]

Price List B2C Price List

Click Save.

Click CONFIGURE ORDER. This will launch Vlocity Cart.

In the PRODUCTS panel, find the Installation product, and click Add to Cart.

In the PRODUCTS panel, find the Home Hub Modem product, and click Add to Cart.

In the red notification message, click the Take Me There icon to invoke the configuration window.

Set the Grade attribute to Best.

Click Close.

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 57
CONFIDENTIAL

In the cart header, click Decompose Order.

In the Order Decomposition page, click the link icons to review the linked fulfilment requests.

Notice that the Installation product has been decomposed to the Installation System
Resource, and the Home Hub Modem has been decomposed to the Installation System
Resource as well, albeit with different attributes. (The Home Hub 3000 CFS fulfilment request
also appears as a result of the decomposition relationship we created in a prior exercise.)

For efficiency in our callout processing, we should combine the Installation System Resource into one
fulfilment request, and we can do that by setting the Scope field on the destination product, which is the
Installation System Resource.

In the Lightning search dialog, enter install.

In the search results list, click Installation System Resource.

Vlocity Order Decomposition - Page 58 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

Using the dropdown action menu, click Edit.

Set the Scope to Account.

Click Save.

Now create a new order so you can review the effects of the Scope field on the decomposition.

In the Lightning tab navigation bar, click Orders.

Click on your M:1 Order that you created earlier.

Using the dropdown action menu, click Clone.

Change the Order Name to M:1 Order #2.

Click Save.

Click CONFIGURE ORDER.

Find the Installation and Home Hub Modem products in the PRODUCTS panel and add them to
the cart. (Remember to click on the Take me there icon, set the Grade to Best, and then close
out the window. You can’t decompose the order until all required attributes are filled out.)

In the cart header, click the Decompose Order button.

Review the Order Decomposition page.

Notice that there is now only one fulfilment request for Installation System Resource and the
attributes have been combined.

DCP-3: Creating Many-to-One Decomposition Relationships (30 mins) Vlocity Order Decomposition – Page 59
CONFIDENTIAL

Review
Confirm your understanding by answering these questions.

• What is a many-to-one decomposition?


• What is the field setting that controls many-to-one decomposition?
• What are the limitations of a many-to-one decomposition?

Vlocity Order Decomposition - Page 60 DCP-3: Creating Many-to-One Decomposition Relationships (30 mins)
CONFIDENTIAL

Exercise DCP-4: Using Product Class for Decomposition


Relationships (45 mins)
Scenario

Felix is feeling better about order decomposition. However, he knows several products in his
product catalog decompose similarly. Currently, each product requires its own
decomposition relationship. He decides to create a new Class, associate the similar
products to the Class, and create just one decomposition relationship so all the similar
products decompose to the same technical product.

What You Will Learn


• Create a new product in the catalog with a record type of Class (e.g. Product Class)
• Associate similar commercial products with a Product Class
• Create a decomposition relationship that leverages attributes and inheritance of Object Types to
decompose based on a Product Class
• Verify the decomposition works correctly

Task Overview
Task 1: Review the product class decomposition model
Task 2: Create a product class
Task 3: Link cloud storage products to the product class
Task 4: Create a decomposition relationship between a product class and the technical product
Task 5: Test the product class decomposition relationship

Task 1: Review the product class decomposition model

Vlocity recommends that you diagram your decomposition relationships using the tool of your choice. But
it’s your lucky day—we’ve created this one for you. To that end, the components in blue and gold will be
further explained in this task.

DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 61
CONFIDENTIAL

NOTE

The focus of this exercise is on new concepts, indicated by the shaded gold box in the
diagram above.

Review the above diagram.

a. Notice the Smart Cloud Storage bundle. Each child product represents a different commercial
product, describing a set storage limit.
b. Notice that the Cloud Storage products inherit the Storage Limit attribute, along with its
associated picklist, from the Cloud Storage Product Spec object type.
c. Notice the Cloud Storage Class product class. This product class is the key to set up a single
decomposition relationship for similar products. The Cloud Storage Class product class is the
source product in the decomposition relationship.
d. Technical Cloud Storage is the destination product in the decomposition relationship.
Regardless of the child product in the bundle selected for an order (based on the storage
limit), this one decomposition relationship is all that is needed to decompose the order to
fulfillment requests.

Vlocity Order Decomposition - Page 62 DCP-4: Using Product Class for Decomposition Relationships (45 mins)
CONFIDENTIAL

Task 2: Create a product class

From a purely Salesforce perspective, a product class is any product that has the record type set to
“Class”. Hence, “product class” is an abbreviated reference to such products. In reality, a product class is
not a commercial product, it’s not part of the commercial catalog. It’s not a technical product or
specification either. A product class can be used to differentiate between an abstract product and real
products. In this exercise, a product class is used to identify similar types of products (cloud storage
products) that have the same behavior in order decomposition. (Product class is not native to Salesforce.
It’s a Vlocity enhancement to Salesforce, used for the purposes of Order Management.)

Creating a new product class is the key to this exercise. Without it, you would have to create a
decomposition relationship for each similar individual commercial product that needs to be decomposed
to the same technical product. In this task, you will create a new Cloud Storage Class and set its record
type to Class (not the default Product). Later, it will be used as the source part of the decomposition
relationship.

NOTE

Products with record types of Class do not display in the product list of Vlocity Cart.

In the Lightning navigation bar, click Vlocity Product Console.

Under the Product Management section, click + to create a new Product.

In the New Product dialog, fill out the following Object Type and General Properties
information.

Field Value

Object Type Cloud Storage Product Spec

Name Cloud Storage Class

Product Code C-CSP-001

Specification Type Product

Click Save.

From the General Properties facet, fill out the following additional General Properties
information.

Field Value

Product Description Product class used to map


one decomposition
relationship to multiple
commercial products
Status Active

DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 63
CONFIDENTIAL

Fill out the following Effectivity information.

Field Value

Active ✓

Selling Start Date [today’s date]

Fulfillment Start Date [today’s date]

Note that when selecting a date, the time is automatically populated. You can leave the default time.

Click Save. Once saved, you are placed in the General Properties facet of the new product.

Click the Attribute Properties facet. Notice the Storage Limit attribute has been inherited from
the Cloud Storage Product Spec object type. Isn’t object inheritance a beautiful thing? Set it up
once, reuse it as needed.

Vlocity Order Decomposition - Page 64 DCP-4: Using Product Class for Decomposition Relationships (45 mins)
CONFIDENTIAL

Click the Details link adjacent to the Storage Limit attribute. Notice the Attribute Metadata
includes a Storage Unit picklist, with several storage limit values (100GB, 1TB, etc.). These
values will be passed from the child products through the product class to the technical product.

Referring back to the diagram, your new Cloud Storage Class has the Storage Limit attribute now.
However, by default, new products are created with a record type of “Product”, and it needs to be “Class”.
You’ll tackle that next.

In the Lightning navigation bar, click Products.

Locate and click Cloud Storage Class.

Notice the Product Record Type is set to the default value (Product).

Click the Change Record Type icon for the Product Record Type field.

DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 65
CONFIDENTIAL

Make sure the Change Product Record Type is set to Class and click Next.

Click Save in the Edit Cloud Storage Class dialog.

Now your product class is created and configured properly. It’s time to associate the child products in the
bundle with the product class.

Vlocity Order Decomposition - Page 66 DCP-4: Using Product Class for Decomposition Relationships (45 mins)
CONFIDENTIAL

Task 3: Link cloud storage products to the product class

Now that you have built the product class, you can link it to each of the tiered storage products as shown
in the original diagram by the gold arrow.

NOTE

The product bundle is not important with respect to configuration in getting product class
decomposition relationships to work. The tiered storage products don’t have to be part of a
bundle. They could be individual products, and this exercise would still work fine.

In the tab navigation bar, click Products, and then All Products in the List Views drop-down.

Click on the Cloud Storage – 100GB commercial product.

Click Edit in the drop-down in the upper right.

Notice the Parent Class field is currently null. That is about to change.

In the Parent Class field, select Cloud Storage Class.

Click Save.

Repeat the same process, setting the Parent Class to Cloud Storage Class for Cloud Storage
– 1TB (and 10TB) products. Remember to save changes for both products.

Of course, all setup and configuration processes are important, but establishing the relationship between
the commercial products and the parent class like this is critical. So is the actual decomposition
relationship, which is the last task before testing everything from end to end.

DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 67
CONFIDENTIAL

Task 4: Create a decomposition relationship between a product class and the


technical product

With everything that needs to be created or configured behind you, the last task at hand is to create the
decomposition relationship itself. Referring back to the diagram, you’ll recall that the relationship is
between Cloud Storage Class (the product class) and Technical Cloud Storage (the technical product).

Navigate to Products > All Products view, and select Cloud Storage Class.

Switch from the Details to the Related tab.

In the Decomposition Relationships (Source Product) related list, click New.

Enter the following New Decomposition Relationship information:

Field Value

Decomposition Relationship Name CloudStorageClass-->TechnicalCloudStorage

Destination (Product) Technical Cloud Storage

Click Save.

Vlocity Order Decomposition - Page 68 DCP-4: Using Product Class for Decomposition Relationships (45 mins)
CONFIDENTIAL

Click the decomposition relationship just created.

Expand Mapping Rules, and click Add New Rule.

In the Add New Rule dialog, enter the following information.

Field Value

Source Type Attribute

Attribute/Field/Value Internet Services-Storage Limit

Mapping Type ad-verbatim

Destination Attribute Internet Services-Storage Limit

Click Save.

This decomposition relationship will map the Storage Limit attribute of Cloud Storage Class (which is the
source) to the Storage Class attribute of Technical Cloud Storage (which is the destination), and the ad-
verbatim mapping rule essentially says don’t change the data at all. The mapping value will pass through
unchanged. Now you are ready to test everything.

DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 69
CONFIDENTIAL

Task 5: Test the product class decomposition relationship

With everything fully configured, it’s time to test and see if the decomposition relationship works. You
should be able to place an order for the cloud storage bundle, select any one of the storage tiers (based
on the attribute for their storage limits), and decompose the order to the same technical product. Recall
that you created a single decomposition relationship, and by virtue of the product class, all products
linked to the product class will share this decomposition relationship. Otherwise, every commercial
product would need its own decomposition relationship. In a large shared catalog, with thousands of
products, this would take significantly more time to create, configure, and maintain.

In the Lightning navigation bar, click Orders.

Click New.

In the New Order dialog, enter the following information.

Field Value

Order Name Test Decomp 100Gb

Account White, Carole

Order Start Date [today’s date]

Price List B2B Price List

Click Save.

In Actions, click CONFIGURE ORDER.

Add Smart Cloud Storage to the cart.

Notice the design time attribute for the storage limit can be added to the order with a single click.

Vlocity Order Decomposition - Page 70 DCP-4: Using Product Class for Decomposition Relationships (45 mins)
CONFIDENTIAL

NOTE

Long product names are sometimes displayed with an ellipsis. If you can’t see the entire
name, such as the 100GB, 1TB or 10TB above, simply hover over to see the entire product
name.

Add any one of the child products to the order. (The example shown is based on the 100GB tier,
but which one you select is not important.)

In the cart header, click Decompose Order.

NOTE

Occasionally a browser refresh may be required to see the decomposed order.

Create another new order. This time add either one of the other child products from the cloud
storage bundle to the cart.

Decompose the order. The same decomposition relationship is used to decompose to the same
fulfilment request as the previous order, despite different commercial products being added to the
order. Notice the storage limit attribute should differ on the fulfillment request, depending on
which child product selected. This was passed through from the commercial product, via the
product class, with the decomposition relationship configured earlier.

Our training environment has a simple product catalog. But even in our simple environment, it’s easy to
see the benefit that is gained by using product class decomposition relationships!

Review
Confirm your understanding by answering these questions.

• What is a product class?


• How can you associate similar commercial products to use the same decomposition relationship?
What field must be set?
• What must the product class share with the products that will be decomposed using its
relationship?
DCP-4: Using Product Class for Decomposition Relationships (45 mins) Vlocity Order Decomposition – Page 71
CONFIDENTIAL

Exercise DCP-5: Creating Multi-level Decomposition


Relationships
Scenario

Chad is a summer intern who has helped Felix with various IT and Vlocity platform
related tasks all summer. Felix trained Chad on setting up decomposition relationships.
However, he did not get to train him on decomposition matrices. Felix needs help
setting up additional multi-level decomposition relationships. As Chad's time at
RoadRunner Industries draws to a close, Felix doesn't have time to train Chad further.
He asks Chad to setup more decomposition relationships using his freshly honed skills.
Decomposition matrices will have to wait until next summer!

Task Overview
Task 1: Review multi-level decomposition relationships
Task 2: Use the decomposition relationship exercise as a guideline for building multi-level
decomposition relationships
Task 3: Test the decomposition relationships

Vlocity Order Decomposition - Page 72 DCP-5: Creating Multi-level Decomposition Relationships


CONFIDENTIAL

Task 1: Review multi-level decomposition relationships

Decomposition Matrix

A decomposition matrix can be used as a shortcut to map a source product to multiple destination
products based on a set of attributes. Although this can be a handy tool, there are some disadvantages
too. Such as:

• Relationships can be built from source to destination only


• You cannot create mapping rules from within the interface (further navigation and editing is
required)
• Multiple conditions use logical AND (not OR). You must edit the relationship after if logical OR is
required. (Although not difficult, if forgotten debugging will be needed.)

Sometimes it’s just better to create the relationships individually.

Review the decomposition diagram above in order to get an idea of the decomposition
relationships required for this challenge.

Hints:
• Level 1 to Level 2 decomposition relationship are 1:Many, source to destination relationships.
• Level 2 to Level 3 is a 1:1 (although it looks like a 1:Many).

DCP-5: Creating Multi-level Decomposition Relationships Vlocity Order Decomposition – Page 73


CONFIDENTIAL

Task 2: Use the decomposition relationship exercise as a guideline for building


multi-level decomposition relationships

Configure the decomposition relationships. To avoid confusion with exercise DCP-2, append
“(Challenge)” to your decomposition relationship names.

DCP-2 has all the information needed to build out the needed decomposition relationships. There are two
ways to approach the details of this challenge:

• Minimal help – Primarily use the diagram above and the decomposition skills learned earlier to
build out all the needed decomposition relationships. Turn to the details in DCP-2 only as needed.
• Maximal help – Read through the details included in DCP-2 and build out the required
decomposition relationships as you go along.

Minimal or maximal help? Either approach is perfectly fine and up to you. Rumor has it (and backed up by
his last status report) that Chad first used maximal help. Then he circled back and completed the
challenge again with minimal help. Well done Chad.

Vlocity Order Decomposition - Page 74 DCP-5: Creating Multi-level Decomposition Relationships


CONFIDENTIAL

Task 3: Test the decomposition relationships

Testing is always the moment of truth. If your decomposition relationships are configured correctly, the
results should be identical to those if a decomposition matrix had been used.

Create an order and add DSL Service to the Vlocity Cart. Set the download speed to 40Mbps.

Decompose the order.

Confirm the decomposition looks similar to the following.

(Time and interest permitting) Enter additional orders, with other download speeds, and test their
decomposition as well.

DCP-5: Creating Multi-level Decomposition Relationships Vlocity Order Decomposition – Page 75


CONFIDENTIAL

Vlocity Order Decomposition - Page 76

You might also like