You are here:
Add Product Attributes to a Reference Product Model for Customer Acquisition Management
Each Energy & Utilities company has its own set of attributes associated with offered products. These attributes are used to determine different pricing values for the customers based on their inputs. The reference product model uses the Distribution Region attribute to determine the associated pricing. The customer specifies the location where they reside, and the application retrieves and displays the products with pricing applicable for that location
You can add additional attributes to the reference product model to create more complex scenarios for determining the price for the customers. For example, along with the Distribution Region, you can also add Payment Method as a new product attribute. This allows the customer to specify his location along with payment preference. Based on the customer input for Distribution Region and Payment Method, the application calculates the relevant pricing and displays it on the UI.
When you're done adding product attributes, remember to Run Maintenance Jobs for Customer Acquisition Manager.
Here's the high-level workflow for adding a new product attribute Payment Method to the reference product model:
Define New Product Attributes
In the Energy & Utilities market, attributes are instrumental in designing a product pricing matrix. Permutations and combinations of attributes such as meter type, annual consumption, distributed region, payment method, and customer category are used to come up with a pricing plan for each offered product.
To learn more about attributes, see Picklists and Atrributes in EPC.
Add a new product attribute definition for the Payment Method.
- In the App Launcher, go to All Items and click Vlocity Product Designer.
-
Follow the instructions in Define Attributes in Product Designer to create the Payment Method attribute.
Field Name
Value
Name
Payment Method
Code
ATT_PAYMENT_METHOD
Active
Checked
Attribute Category
Commodity Cost Component
Description
Supported payment methods
Value Type
Text
Default Value
Leave blank
Display Sequence
40
Filterable
Checked
Applicable Objects
Product
Add Payment Method Attribute to Object Type Layout
Object types are like Salesforce record types, but with enhanced capabilities. You can use object types to group products with similar characteristics and ensure consistent behavior and application of rules.
The newly defined Payment Method attribute must be added to the pre-existing object type layouts so that the new attribute can be displayed and configured for each offered product.
- In the App Launcher, go to All Items and click Vlocity Product Designer.
- Select Vlocity Objects and Object Types from the drop-down.
- Select Product2 Object.
- Expand the Product2 and open Commodity Commercial Object Type.
- Select Layout Management and click Attribute tab.
-
Add the Payment Method attribute in the Commodity Attributes section.
Note
If you are not able to see Payment Method in the Attributes tab of the Object type, follow the steps in Assign Attributes and Fields for an Object Type to assign an attribute using the Product Console.
- After the attribute is added, select the Payment Method attribute to edit it. In the Edit Attribute select the Run-time Configurable checkbox. Click Done.
-
Perform steps 6 and 7 for object types:
-
Standing Charges Object Type
-
Unit Rate Object Type
-
Reassign Object Types to Product Specifications
To reflect the newly added product attribute in the product specification, reassign the object type to all the product specifications in your catalog.
- In the App Launcher, go to All Items and click Vlocity Product Designer.
- Select Products from the drop-down.
- Select Day/Night Tariff product. In the General Properties, delete the value of field Object Type and reassign Commodity Commercial Object Type.
- Repeat this step for all your offered products. You can find all the configured commodity products in the reference product model in Configured Commodity Products.
Update the Calculation Matrix
Add the Payment Method to the existing calculation matrix to calculate the product pricing based on this newly added attribute.
- In the App Launcher, go to All Items and click Vlocity Calculation Matrices.
- Select VEEDCSalesPricingMatrix.
-
From the address bar, copy the record id for the VEEDCSalesPricingMatrix calculation matrix. For example, if the address bar has a URL
https://baseurl/lightning/r/vlocity_cmt__CalculationMatrix__c/a0h4x000006xQbLAAU/view, the record id isa0h4x000006xQbLAAU. - Click View Profile, and select Switch to Salesforce Classic.
-
In the address bar, copy the record id to create a URL in the following format -
https://<baseurl>/<record-id>.The VEESCSalesPricingMatrix record is displayed.
- Scroll down to the Vlocity Calculation Matrix Versions section, and click the latest version of VEEDCSalesPricingMatrixV<latest-version>.
- Click Create New Version.
-
In the Table section, under Input Data:
-
Append ;Payment Method to the Characteristic Name column value for each row. The final value for each row looks like
Distribution Region;Payment Method. -
Payment Method has two Characteristic Values:
Pay As You GoandMonthly Direct Debit. For each product, add these values as two separate rows for a given distribution region. For example, for product Green Energy Unit Rate with distribution region Armagh, add two separate rows with the following values:Source Product Name
Source Product Code
Characterstic Name
Characterstic Value
MRC
NRC
UP
CM
Unit Rate
BG_GREEN_FUTURE_UR_2021
Distribution Region;Payment Method
Armagh;Pay As You Go
0
0
0.2
kWh
Unit Rate
BG_GREEN_FUTURE_UR_2021
Distribution Region;Payment Method
Armagh;Monthly Direct Debit
0
0
0.198
kWh
-
Perform the above two steps for all the combinations of products, distribution region, and payment methods.
NoteAlternatively, you can download the existing matrix as a CSV file using the Download CSV. Perform the changes using a text editor, and then upload them back using Upload CSV. Don’t forget to delete the existing data before uploading the updated CSV file. For more information, see Setting Up Attribute Pricing Matrix.
-
- Click Save Data.
- Click Edit under Vlocity Calculation Matrix Version Detail section.
- Update the Priority with the same value as the Version.
- Select Enabled.
- Click Save.
- Click Switch to Lightning Experience.
Update the GetDigitalBasket Integration Procedure
Update the Integration Procedures VEEDigitalGetBasket and VEEDigitalCachingVIP to enable the application to fetch the products based on the combination of distribution region and payment method.
- In the App Launcher, select Omnistudio Integration Procedures.
- In Find In page, search VEE and expand VEE/DigitalGetBasket.
- Click the latest version of the VEEDigitalGetBasket(Version <latest>).
- In the Procedure Configuration, click Create Version.
- Select DRTransformSetDistRegionOnOffers.
-
Under ADDITIONAL INPUT/OUTPUT/FAILURE RESPONSE,
click Add Key/Value Pair and add an entry for
payment method:
Key
Value
paymentMethod
%paymentMethod%
- Click the Link icon next to Data Mapper Interface to open the VEEDigitalSetDistributionRegionOnOffers Data Mapper.
- Select Formulas.
-
Click Add Formulas to add the following two
formulas for payment method:
-
Formula 1
-
Formula
IF(offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
Formula 2
-
Formula
IF(offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
- Close the Data Mapper page and return to the VEEDigitalGetBasket page.
- In the Procedure Configuration, click Save.
- Click Activate.
Update the Digital Caching Integration Procedure
Update the VEEDigitalCachingVIP Integration Procedure to enable the application to generate cache based on the combination of distribution region and payment method attributes.
- Go to Setup
- In the Quick Find, search custom and select Custom Metadata Types.
-
Click New Custom Metadata Type and create a new
metadata type.
Field
Description
Singular Label
VEEDigitalPricingAttributes
Plural Label
VEEDigitalPricingAttributes
Object Name
VEEDigitalPricingAttributes
- Click Save.
-
In Custom Fields, click
New and add paymentMethod and distRegion custom
fields with the following values:
Field
Value
Data Type
Text
Length
80
Field Label
distRegion
Field Name
distRegion
Field Manageability
Only the package developer (via package upgrade)
Field
Value
Data Type
Text
Length
80
Field Label
paymentMethod
Field Name
paymentMethod
Field Manageability
Only the package developer (via package upgrade)
- Go back to Custom Metadata Types.
- Click Manage Records next to VEEDigitalPricingAttributes.
-
Click New. Add a new pricing record with the
following values:
Field
Value
Label
PricingAttribute1
VEEDigitalPricingAttributes Name
PricingAttribute1
distRegion
Armagh
paymentMethod
Pay As You Go
- Click Save.
-
Similarly, create new records for all the combinations of distRegion
and paymentMethod.
Label
VEEDigitalPricingAttributes Name
distRegion
paymentMethod
PricingAttribute2
PricingAttribute2
Armagh
Monthly Direct Debit
PricingAttribute3
PricingAttribute3
Derby
Pay As You Go
PricingAttribute4
PricingAttribute4
Derby
Monthly Direct Debit
PricingAttribute5
PricingAttribute5
Chichester
Pay As You Go
PricingAttribute6
PricingAttribute6
Chichester
Monthly Direct Debit
PricingAttribute7
PricingAttribute7
Salisbury
Pay As You Go
PricingAttribute8
PricingAttribute8
Salisbury
Monthly Direct Debit
- In the App Launcher, select Omnistudio Integration Procedures.
- In Find In page, search VEE and expand VEE/DigitalCachingVIP.
- Click the latest version of the VEEDigitalCachingVIP(Version <latest>).
- In the Procedure Configuration, click Create Version.
- Select DRDistributionRegion.
- Under ADDITIONAL INPUT/OUTPUT/FAILURE RESPONSE, delete the entry for distRegion.
-
Click Add Key/Value Pair and add key/value
pairs for the new fields created in the metadata:
Key
Value
paymentMethod
%paymentMethod__c%
distRegion
%distRegion__c%
- Click the Link icon next to Data Mapper Interface to open the VEETransformDistributionRegion Data Mapper.
- Select Formulas.
-
Click Add Formulas to add the following four
formulas for payment method:
-
Formula 1
-
Formula
IF(offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
Formula 2
-
Formula
IF(offerDetails:FollowOnGetOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:FollowOnGetOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
Formula 3
-
Formula
IF(offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
Formula 4
-
Formula
IF(offerDetails:FollowOnGetOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:code == "ATT_PAYMENT_METHOD",paymentMethod,offerDetails:FollowOnGetOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues) -
Formula Result Path
offerDetails:getOfferDetails:result:offerDetails:offer:childProducts:childProducts:AttributeCategory:records:productAttributes:records:userValues
-
-
- Close the Data Mapper page and return to the VEEDigitalCachingVIP page.
- In the Procedure Configuration, click Save.
- Click Activate.
Update the VEEDigitalSalesVIPCaching Scheduled Job
Update the scheduled job to fetch products based on the payment method and distribution region.
- In the App Launcher, select Vlocity Scheduled Jobs.
- Select VEEDigitalSalesVIPCaching.
- Click Edit icon next to Data Source Spec field.
-
Replace the query with the following:
SELECT distRegion__c,paymentmethod__c FROM MetaDataApiName
Update the Reference UI for Payment Method
Update the reference UI to add the payment method field.
- In the App Launcher, select OmniScripts.
- On Find In page, search VEE and expand VEEDigitalOrder.
- Click the latest version of the VEEDigitalCachingVIP(Version <latest>).
- Click New Version.
- Expand stepGetContextDetails.
- Scroll down, and add the Payment Preference as a radio button with two options:
- Close stepGetContextDetails.
- Select getOfferDetails.
- In the Properties, expand Remote Properties.
-
Under the Extra Payload, click Add
New Key/Value Pair. Add payment method which is passed as
input to the integration procedure:
Key
Value
paymentMethod
%paymentMethod%
- Close getOfferDetails.
- Expand Enroll.
- Locate element TALocality. This element displays the distribution region selected by the user in the get details step.
-
Add another text element below TALocality with
the following details:
Field
Value
Name
VEEPaymentMethod
Text
%paymentMethod%
- Click Activate Version.

