Newer Version Available

This content describes an older version of this product. View Latest

Customize the Retail Order Proposal List Creation Process

To customize the order proposal list creation process, create a callable Apex class as a customization hook.
  1. Log in to your Salesforce org, and go to Developer Console.
  2. Create a global Apex class that implements the System.Callable interface.
  3. Override the global call method that has these parameters.
    • action: String. The behavior for the method to exhibit.
    • params: Map<String,Object>. Arguments to be used by the specified action.

    Here’s the Apex class structure.

  4. Modify the list of products displayed on the order proposal list UI based on your custom logic.
    Here’s a sample Apex code that adds additional product IDs from a custom object, Proposed_Products__c, and the IDs that belong to the beverages product category to the list of proposed products.
  5. From Setup, in the Quick Find box, enter Custom Metadata Types, and then expand Custom Metadata Types.
  6. Click Manage Records on the CGCloud Process Customization row.
  7. Click New, fill in these details, and then save your work.
    • Label: RE_Order_Proposal_List
    • DeveloperName: RE_Order_Proposal_List
    • Class: <Your Callable APEX Class>
    • Method: proposalList
    • Enabled: Select the checkbox

    Before invoking the customization hook, ensure that the Consider Listing setting in Order Template is set to Yes.

    Note

Your Apex customization hook is enabled. When an order proposal list is created, the call method modifies the proposed product list based on your custom logic.