Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Energy & Utilities Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add Product Attributes to a Reference Product Model for Customer Acquisition Management

          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.

          1. In the App Launcher, go to All Items and click Vlocity Product Designer.
          2. 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.

          1. In the App Launcher, go to All Items and click Vlocity Product Designer.
          2. Select Vlocity Objects and Object Types from the drop-down.
          3. Select Product2 Object.
          4. Expand the Product2 and open Commodity Commercial Object Type.
          5. Select Layout Management and click Attribute tab.
          6. Add the Payment Method attribute in the Commodity Attributes section.
            Payment Method shown added to the Commodity Attributes section
            Note
            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.

          7. 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.
          8. 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.

          1. In the App Launcher, go to All Items and click Vlocity Product Designer.
          2. Select Products from the drop-down.
          3. Select Day/Night Tariff product. In the General Properties, delete the value of field Object Type and reassign Commodity Commercial Object Type.
          4. 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.

          1. In the App Launcher, go to All Items and click Vlocity Calculation Matrices.
          2. Select VEEDCSalesPricingMatrix.
          3. 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 is a0h4x000006xQbLAAU.
          4. Click View Profile, and select Switch to Salesforce Classic.
          5. 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.

          6. Scroll down to the Vlocity Calculation Matrix Versions section, and click the latest version of VEEDCSalesPricingMatrixV<latest-version>.
          7. Click Create New Version.
          8. 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 Go and Monthly 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.

              Note
              Note

              Alternatively, 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.

          9. Click Save Data.
          10. Click Edit under Vlocity Calculation Matrix Version Detail section.
          11. Update the Priority with the same value as the Version.
          12. Select Enabled.
          13. Click Save.
          14. 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.

          1. In the App Launcher, select Omnistudio Integration Procedures.
          2. In Find In page, search VEE and expand VEE/DigitalGetBasket.
          3. Click the latest version of the VEEDigitalGetBasket(Version <latest>).
          4. In the Procedure Configuration, click Create Version.
          5. Select DRTransformSetDistRegionOnOffers.
          6. Under ADDITIONAL INPUT/OUTPUT/FAILURE RESPONSE, click Add Key/Value Pair and add an entry for payment method:

            Key

            Value

            paymentMethod

            %paymentMethod%

          7. Click the Link icon next to Data Mapper Interface to open the VEEDigitalSetDistributionRegionOnOffers Data Mapper.
          8. Select Formulas.
          9. 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
          10. Close the Data Mapper page and return to the VEEDigitalGetBasket page.
          11. In the Procedure Configuration, click Save.
          12. Click Activate.

          GetDigitalBasket VIP is updated to fetch products for a combination of distribution region and payment method attributes.

          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.

          1. Go to Setup
          2. In the Quick Find, search custom and select Custom Metadata Types.
          3. Click New Custom Metadata Type and create a new metadata type.

            Field

            Description

            Singular Label

            VEEDigitalPricingAttributes

            Plural Label

            VEEDigitalPricingAttributes

            Object Name

            VEEDigitalPricingAttributes

          4. Click Save.
          5. 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)

          6. Go back to Custom Metadata Types.
          7. Click Manage Records next to VEEDigitalPricingAttributes.
          8. 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

          9. Click Save.
          10. 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

          11. In the App Launcher, select Omnistudio Integration Procedures.
          12. In Find In page, search VEE and expand VEE/DigitalCachingVIP.
          13. Click the latest version of the VEEDigitalCachingVIP(Version <latest>).
          14. In the Procedure Configuration, click Create Version.
          15. Select DRDistributionRegion.
          16. Under ADDITIONAL INPUT/OUTPUT/FAILURE RESPONSE, delete the entry for distRegion.
          17. 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%

          18. Click the Link icon next to Data Mapper Interface to open the VEETransformDistributionRegion Data Mapper.
          19. Select Formulas.
          20. 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
          21. Close the Data Mapper page and return to the VEEDigitalCachingVIP page.
          22. In the Procedure Configuration, click Save.
          23. Click Activate.

          The Caching VIP is now updated to generate cache based on various combinations of payment method and distribution region attributes.

          Update the VEEDigitalSalesVIPCaching Scheduled Job

          Update the scheduled job to fetch products based on the payment method and distribution region.

          1. In the App Launcher, select Vlocity Scheduled Jobs.
          2. Select VEEDigitalSalesVIPCaching.
          3. Click Edit icon next to Data Source Spec field.
          4. 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.

          1. In the App Launcher, select OmniScripts.
          2. On Find In page, search VEE and expand VEEDigitalOrder.
          3. Click the latest version of the VEEDigitalCachingVIP(Version <latest>).
          4. Click New Version.
          5. Expand stepGetContextDetails.
          6. Scroll down, and add the Payment Preference as a radio button with two options:
            • Monthly Direct Debit

            • Pay As You Go

            Payment Method with Monthly Direct Debit and Pay As You Go selected.
          7. Close stepGetContextDetails.
          8. Select getOfferDetails.
          9. In the Properties, expand Remote Properties.
          10. 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%

          11. Close getOfferDetails.
          12. Expand Enroll.
          13. Locate element TALocality. This element displays the distribution region selected by the user in the get details step.
          14. Add another text element below TALocality with the following details:

            Field

            Value

            Name

            VEEPaymentMethod

            Text

            %paymentMethod%

          15. Click Activate Version.

          The UI is now configured to pass Payment Method as user input to the Integration Procedure, and display the user choice of payment method on the enroll page.

           
          Loading
          Salesforce Help | Article