APEX Configuration

In order to customize the Promotion Save process in APEX layer, you must introduce a callable APEX class as a customization hook.

In order to setup the hook, go to Setup → Custom Metadata Types → CGCloud Process Customization , and add the following records:

  • Label: TPM_Promotion_Save
  • DeveloperName: TPM_Promotion_Save
  • Class: <Your Callable APEX Class>
  • Enabled: checked
  • Method: save

APEX class structure

The call method is called during the Promotion Save Process. At this method, you can add your customizations to the process:

  • Create additional records
  • Modify TPM records

The TPM_Promotion instance contains an object with all the Managed Package Promotion data.