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
          Penalty Rules for Contracts

          Penalty Rules for Contracts

          To apply a penalty charge when an asset that is covered by an active contract is deleted or disconnected using Industries Cart, define a penalty rule. The contractual asset must be a root asset and not a child asset.

          Note
          Note

          Industries Cart doesn’t fully implement penalty rules. Custom configuration is required to provide a penalty notification message to the user at run time.

          To use penalty rules for assets associated with contracts, you must perform setup steps in addition to creating a penalty rule and setting up the context rules framework.

          1. Set up the ContractTerminationService interface:
            1. From the App Launcher, search for and open Interface Implementations.
            2. Click New.
            3. On the New Interface Implementation Detail page, enter the details for the ContractTerminationService interface.
              • Interface Name is ContractTerminationService.

              • Active Implementation Class must remain empty. When you specify an active implementation for this interface, the system automatically enters this information.

              • Description is a brief description of what the interface does.

            4. Save your work.
          2. Set up the ContractTerminationService Interface implementation:
            1. Go to the Interface Implementations tab.
            2. From the View picklist, select All.
            3. Click Go.
            4. Click the ContractTerminationService interface. Click the interface name link, not the Edit link next to the interface name link.
            5. Click New Interface Implementation Detail.
            6. On the New Interface Implementation Detail page, create the ContractTerminationService interface.
              • Available Implementation is ContractTerminationService.

              • Select Active to set the new implementation as the active implementation for this interface.

              • Select Default to set the new implementation as the default implementation for this interface.

          3. Version the MACD/FDO OmniScript:
            1. From the App Launcher, search for and open Omniscripts.
            2. Search for MACD.
            3. Click MACD/FDO.
            4. Click the latest version.
            5. Click Create Version.
          4. Add a remote action to the Omniscript to run the ContractTerminationService.changeToOrder implementation:
            1. Drag and drop Remote Action from Available Components to the structure of the Omniscript after the CreateFDO step.
            2. Enter the following details for the remote action:
              • Remote Class is ContractTerminationService.

              • Remote Method is changeToOrder.

            3. Under Extra Payload, click Add New Key/Value Pair.
            4. Add the following keys:

              Key

              Description

              assetQueryString

              Enter a value to query the assets. Before the query is run, the string isn't validated by the ContractTerminationService Apex class. We recommend ensuring that the string is correct.

              cancelDate

              The date on which you want the promotion to be canceled. If you don't specify this value, the current date is automatically specified using Date.today().

              cancellationReason

              The reason for the cancellation that is added to all canceled promotions.

              accountId

              Specifies the account ID used to create the future dated order (FDO). This key isn't used to query the assets. It’s instead used when creating the FDO.

          5. Add a remote action to run the ContractTerminationService.submitOrder implementation:
            1. Drag and drop Remote Action from Available Components to the structure of the Omniscript after the remote action that you added in the previous step.
            2. Enter the following details for the remote action:
              • Remote Class is ContractTerminationService.

              • Remote Method is submitOrder.

            3. Under Extra Payload, click Add New Key/Value Pair.
            4. In the Key field, enter orderIds.
            5. In the Value field, enter the list of created FDO IDs.
          6. Delete actions in the Omniscript that aren’t required including: CreateFDO, Done Action 1, and Done Action 2
          7. Save the changes to the Omniscript:
            1. Under Structure, click Script Configuration.
            2. Click Save.
            3. Click Activate Version.
          8. Create object level rules for contracts. For more information about object level rules, see Creating Object Level Rules.
          9. To use penalty rules for contracts, select a root-level asset and begin the asset-based ordering process in Industries Cart. In the order, delete the asset and submit the order. After the order is submitted, the contract cancellation penalty appears in Order Pricing.
            Note
            Note

            Custom configuration is required to provide the user with a cancellation penalty notification message in Industries Cart.

            You create penalty rules in Vlocity Product Console using reusable context rule components. See Creating a Penalty Rule

           
          Loading
          Salesforce Help | Article