Loading
Salesforce now sends email only from verified domains. Read More
Get Started with Communications, Media, and Energy & Utilities (CME)...
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
          Repricing Example

          Repricing Example

          Assuming changes in market conditions, you can lower the price of a product starting on a certain date and make this new price available to any orders that are still pending and have not been submitted for fulfillment.

          Repricing Example

          To accomplish this, create a new price list entry and set the end date of the existing price list entry. Once the price list entries are created and updated, run the repricing service to reflect the new pricing on existing orders to ensure customers can take advantage of this new pricing:

          1. Navigate to the Vlocity Product Console.
          2. Next to Product in the Product Management area, click the search icon.
          3. In the Search Product… dialog box, press the return or enter key to display the list of products.
          4. Click a product, such as 4G LTE Data Plan.
          5. Click the Pricing facet.
          6. Click New to create a new price list entry.
          7. Enter the following data for the Price List Entry fields:
            • Price List: B2C Price List

            • Display Text: $24.9

            • Base Price: Activate

            • Charge Type: Recurring

            • Frequency: Monthly

            • Sub-Type: Standard

            • Type: Price

          8. Click Search and select Recurring Monthly Std Price.
          9. Select $24.99 RM for the Pricing Element.
          10. For Effective From, select today’s date, and click the Active checkbox.
          11. Click Save. A warning may indicate that you currently have two price list entries that overlap.
          12. Navigate to the Orders tab.
          13. Change the List Views to All Orders.
          14. Select the Adv Pricing Data Plan Order.
          15. In Actions, click Configure to invoke the Industries CPQ Cart.
          16. Notice the Recurring Charge is $34.99.
          17. Navigate to the Setup icon and select Developer Console.
            Setup icon
          18. From the Developer Console, click Debug > Open Execute Anonymous Window.
          19. The following Apex code will be used to reprice orders. Copy this code and paste it in the Enter Apex Code box from the Developer Console.
            List<Order> a = [SELECT Id FROM Order WHERE Status = 'Draft' AND EffectiveDate > 2018 - 01 - 19];
            Map<String, Object> repricingInput = new Map<String, Object>{'objectList' => a};
            Map<String, Object>; repricingOutput = new Map&<String, Object>();
            Map<String, Object> repricingOptions = new Map<String, Object>();
            vlocity_cmt.VOIInvoker voi = vlocity_cmt.VOIInvoker.getInstance();
            voi.invoke('Repricing', 'repriceLineItems', repricingInput, repricingOutput, repricingOptions);

            Once invoked, the Apex code reprices all orders with an order status of Draft, and with the effective date you selected. For sample Apex code, refer to RepricingInterfaceRepricingInterface.

          20. Select the code and click Execute Highlighted.
            Select the code and click Execute Highlighted
          21. Navigate back to the tab where the 4G LTE Data Plan is in the cart for the Adv Pricing Data Plan Order.
          22. Refresh the browser page.
          23. Notice the Recurring Charge is now $24.99 from the new price list entry.
           
          Loading
          Salesforce Help | Article