Loading
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
          Reprice an Asset to Reflect a Context Rule Condition for an Account

          Reprice an Asset to Reflect a Context Rule Condition for an Account

          You can reprice an asset to reflect a context rule condition for an account.

          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, enter a product name, for example, Blast!, and click the search icon.
          4. Select the Blast! Pro Internet product and click the Pricing facet.
          5. Notice the pricing for both price list entries. For example, there may be a $20 RM price list with a context rule attached to the price list entry giving Platinum account customers a reduced price on the product.
          6. Navigate to the Accounts tab.
          7. Change the List Views to All Accounts.
          8. Select an account, for example, Acme.
          9. Click the DETAILS tab and notice how the SLA is set, for example, to Platinum.
          10. From the Lightning App Launcher, select Assets to open in a new tab.
          11. Change the List Views to All Assets.
          12. Select your product, for example, Blast! Pro Internet for Acme.
          13. On the DETAILS tab, notice the Recurring Charge for the asset is, for example, $20 according to the context rule for platinum accounts.
          14. Navigate back to the open browser tab for Acme.
          15. Click the Edit icon to change the SLA to, for example, Gold.
          16. Click Save.
          17. From the URL, copy the Account ID from after the Account/ and before /view and paste it to a text editor. You need this ID for the Apex code for repricing accounts.

            For example:

            Secure | https://na57.lightning.force.com/lightning/r/Account/0010b00002BZo10AAD/view

          18. Navigate to the Setup icon and select Developer Console.
          19. From the Developer Console, click Debug > Open Execute Anonymous Window.
          20. Copy the following Apex code and paste it in the Enter Apex Code box from the Developer Console.
            List a = [SELECT Id FROM Account WHERE Id = '0011I00000DBYUK'];
            Map repricingInput = new Map {'objectList' > a};
            Map repricingOutput = new Map();
            Map repricingOptions = new Map();
            vlocity_cmt.VOIInvoker voi = vlocity_cmt.VOIInvoker.getInstance();
            voi.invoke('Repricing', 'repriceLineItems', repricingInput, repricingOutput, repricingOptions);
          21. In line 1, replace the Account ID currently in the code with the Account ID copied from the customer's account.
          22. Select the code and click Execute Highlighted.
          23. Verify the status is successful in the logs.
          24. Navigate back to the open Asset browser tab.
          25. Refresh the browser page.
          26. Notice the recurring charge for the asset has changed, for example, to $25 according to the price list entry for all customers other than Platinum.
           
          Loading
          Salesforce Help | Article