Configure Objects and Triggers

Complete the steps to create triggers, enable objects, and configure triggers with Marketing Cloud Connect for Marketing Cloud Engagement.

Permission for Triggered Sends Configuration is required to complete these tasks.

  1. From Sales or Service Cloud, click Setup.
  2. Under Build, click Customize.
  3. Select the object.
  4. Click Triggers.
  5. Click New.
  6. In the Apex Trigger window, select Is Active.
  7. Enter the following code, substituting the desired object name where indicated with Object Name.
    trigger Trig_Object Name on Object Name (after insert, after update) { et4ae5.triggerUtility.automate('Object Name'); }
    

    For example:

    trigger Trig_Lead on Lead (after insert, after update) { et4ae5.triggerUtility.automate('Lead'); }
    
  8. Save the trigger.
    The trigger is created for the object.
  9. Click the Marketing Cloud tab.
  10. Click Configure Marketing Cloud Connect.
  11. Click Edit Settings.
  12. Under Triggered Sends, select Restriction to set user permissions and restrictions.
  13. Under Triggered Sends, add Enabled Objects to be used for triggered sends.
  14. Save the settings and selections.
    The restrictions are set and objects enabled.
  • Use Apex to Create Triggers
    A trigger is Apex code that executes before or after the following types of operations: insert, update, delete, merge, upsert, and undelete. Developer environments, sandboxes, and trial orgs can create, edit, and delete Apex classes and triggers directly in the Salesforce CRM user interface. Unlimited Edition and Enterprise Edition production orgs can execute and view Apex in the user interface, but modifying Apex in the user interface is not allowed.