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 can 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:
- In your sandbox, create your new messaging relationship that contains at least one mapping. For more information, see Creating a Messaging Relationship.
- Make a note of the source object.
- Activate your relationship using the default option. For more information, see Activating a Messaging Relationship.
- In Setup, navigate to the source object and view its triggers. For more information on how to view object triggers, see the Salesforce Help.
- 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
- [Optional] To create more message types that use the default activation method, repeat Steps 1-5.
- Export the messaging relationship details you want to transfer to your production org. For more information, see Exporting Publications and Subscriptions.
- Transfer data from your sandbox to your production org. We recommend using Salesforce change sets.
- From setup, create a new change set that includes the components that you identified in Step 5.
- Upload the outbound change set.
- In your production org, identify the inbound change set and deploy it.
For detailed information about using change sets, see the Salesforce Help. - In your production org, import the messaging relationships you exported from your sandbox org. For more information, see Importing Publications and Subscriptions.
- View your messaging relationship in your production org and optionally add mappings to it. For more information, see Adding Mappings to a Messaging Relationship.
- When you are ready to activate messaging in production, use the same options as you specified in Step 3.
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. Ensure you reactivate this relationship in your production org.
When using the default activation method, Foundations uses a remote site called SalesforceAPIVisualforceContext. Do not deactivate this remote site.