Using the Default Messaging Activation Method

You can use the default activation method to automate the process of sending Foundations messages.

When using the default activation method, Foundations automatically creates a trigger to send messages for new and updated source records.

You can specify whether you want to send these messages as soon as a record is saved or use a scheduled job to define the delivery schedule.

Due to requirements for automatically creating triggers, you must use this activation method in a sandbox environment, then transfer the relevant data to your production org.

This section describes how to set up this option for use in your production org:

  1. In your sandbox, create your new messaging relationship that contains at least one mapping. For more information, see Creating a Messaging Relationship.
  2. Make a note of the source object.
  3. Activate your relationship using the default option. For more information, see Activating a Messaging Relationship.
  4. In Setup, navigate to the source object and view its triggers. For more information on how to view object triggers, see the Salesforce Help.
  5. Identify the Apex trigger and Apex class that relate to this relationship and make a note of them. You can identify them from their name format:
    • Apex trigger: FDN_Messaging_<15 character publication ID>
    • Apex class: FDN_Messaging_<15 character publication ID>Test
  6. [Optional] To create more message types that use the default activation method, repeat Steps 1-5.
  7. Export the messaging relationship details you want to transfer to your production org. For more information, see Exporting Publications and Subscriptions.
  8. Transfer data from your sandbox to your production org. For example, by using Salesforce change sets.
    1. From setup, create a new change set that only includes the components that you identified in Step 5.
    2. Upload the outbound change set.
    3. In your production org, identify the inbound change set and deploy it. We recommend using the Run specified tests option and listing the names of the generated Apex classes (named FDN_Messaging_<15 character publication ID>Test).

    4. For detailed information about using change sets, see the Salesforce Help.
  9. In your production org, import the messaging relationships you exported from your sandbox org. For more information, see Importing Publications and Subscriptions.
  10. View your messaging relationship in your production.
  11. When you have finished developing the message type, activate messaging in production with the same options as you specified in Step 3. Once set, the Activation Method cannot be changed in your production org.

If you need to change messaging relationship details, such as the source object, on a relationship that contains the default activation method, apply the changes in your sandbox org and transfer them to your production org.

When using the default activation method, Foundations uses a remote site called SalesforceAPIVisualforceContext. Do not deactivate this remote site.