Salesforce process builder allows you to build complex flows without code.
Campaign Monitor for Salesforce provides invokable actions that work with process builder allowing you to:
- Create a subscriber list.
- Add, delete or unsubscribe a contact.
- Add, delete or unsubscribe a lead.
Process builder is an advanced topic. To learn more, please refer to the Salesforce trailhead guide on how to use the Salesforce process builder - Automate simple business processes with process builder.
Using the Process Builder with Campaign Monitor
First start by creating your process builder flow. When you want to create your first action be that immediate or scheduled follow these steps:
Click Add action.
Choose apex on action type.
Give the Action a name.
In Apex Class start to type, this will display our invokable actions relating to lists and members.
a. Create a new subscriber list in Campaign Monitor.
b. Add a contact to a subscriber list.
c. Add a lead to a subscriber list.
d. Delete a contact from a subscriber list.
e. Delete a lead from a subscriber list.
f. Unsubscribe a contact from a subscriber list.
g. Unsubscribe a lead from a subscriber list.
When working with the add, delete or unsubscribe rules (options b through g above) you will need to specify either the contact or lead ID depending on what object you are working with. The contact or lead ID is simply the record ID.
The subscriber list ID can be found on the subscriber list record on the details screen under the collapsed system information.
Process builder does not work well when triggered in bulk i.e. when many records meet the flow criteria at once. Only use process builder if you are comfortable with how it works and have tested your flows.
Instant Import Wizard
The instant import wizard invokable action allows you to start an import based on a process flow. When the flow is triggered the import will start instantly. If you don't already have an import setup first create one. Once the import is setup you will see the import ID e.g. SI-0001 take a note of this ID.
Next create your process flow and click add action.
Action Type = Apex
Action Name = Enter a name e.g. Start Import Wizard
Apex Class = Start an Import Wizard Job
On Set Apex Variables click the Add Row button. There is only one variable which is called Import Id. The type is String, the value will be the ID you copied down earlier. See the screenshot below for a graphical representation .