---
schema_version: "1"
id: 733cb382f808e9f271eee32b59ddb5d628f64a928cd06a5456a03861b23f0f80
title: Customize the Tactic Transfer Process
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/tactic_transfer_apex_setup.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/tactic_transfer_apex_setup.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d8c4a727a782ac6496eefad676de031aa206783030fdfd8c62e238dcc0269dc4
description: To modify the tactic details related to the promotion being transferred, create a callable Apex class as a customization hook.
---
# Customize the Tactic Transfer Process

To modify the tactic details related to the promotion being transferred, 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. The object is of type List<RE\_TacticTransfer\>. The RE\_TacticTransfer class exposes methods to access the promotion and its tactic or tactic products. For a list of all the exposed methods, see [RE\_TacticTransfer Class Reference](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/RE_tactic_transfer_class.htm "The RE_TacticTransfer Apex class provides programmatic access to the RE_TacticTransfer sObject and its related sObjects.").
    
    Here’s the Apex class structure.
    
    global class < Your Callable APEX Class > implements System.Callable {
    
        global Object call(String action, Map < String, Object > params) {
            // Get the RE\_TacticTransfer instances from the arguments
            List < cgcloud.RE\_TacticTransfer > tacticTransferWrapper = (List < cgcloud.RE\_TacticTransfer > ) params.get('tacticTransfer');
            // Your custom logic goes here
            return tacticTransferWrapper;
        }
    }
4. To modify the tactic or tactic product fields, use the methods exposed by the RE\_TacticTransfer class.
    
    Add your customizations in the Apex class to:
    
    - Create additional tactic records.
    - Modify and delete existing tactic records.
    
    Here’s a sample Apex class that adds additional tactic sObject records to a planned promotion that’s saved.
    
    global class TacticTransferSaveCust implements System.Callable {
    
        global Object call(String action, Map < String, Object > params) {
            // Get the RE\_TacticTransfer instances from the arguments
            List < cgcloud.RE\_TacticTransfer > tacticTransferWrapper = (List < cgcloud.RE\_TacticTransfer > ) params.get('tacticTransfer');
            for (Integer count = 0; count < 2; count++) {
                cgcloud\_\_Tactic\_\_c newTactic = new cgcloud\_\_Tactic\_\_c();
                newTactic.cgcloud\_\_Tactic\_Template\_\_c = 'a3A8D000000RFbnUAG';
                newTactic.cgcloud\_\_Date\_From\_\_c = Date.newInstance(2023, 9, 9);
                newTactic.cgcloud\_\_Date\_Thru\_\_c = Date.newInstance(2023, 9, 12);
                newTactic.RecordTypeId = '0128D000002MRKIQA4';
                newTactic.cgcloud\_\_Promotion\_\_c = 'a2Y8D000000g4kZUAQ';
                tacticTransferWrapper.add(new cgcloud.RE\_TacticTransfer(newTactic));
            }
            return tacticTransferWrapper;
        }
    }
    
    For use cases related to the promotion and tactic transfer process customization, see [Promotion and Tactic Transfer Customization Use Cases](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/tactic_transfer_apex_save_customization.htm "This section provides different Apex customization use cases for the promotion and tactic transfer process.").
5. From Setup, in the Quick Find box, enter Custom Metadata Types, and then expand **Custom Metadata Types**.
6. On the **CGCloud Process Customization** row, click **Manage Records**.
7. Click **New**, fill the following details, and then save your work.
    
    - **Label**: RE\_Tactic\_Transfer\_Save
    - **DeveloperName**: RE\_Tactic\_Transfer\_Save
    - **Class**: <Your Callable APEX Class>
    - **Method**: save
    - **Enabled**: Select the checkbox.

The Apex customization hook is enabled. When a planned promotion is saved in TPM, the call method modifies the tactic or tactic product details related to the promotion based on your custom logic before transferring it to RE.