This guide walks you through setting up a Salesforce integration that triggers mailings via Click2Mail Connect — all without writing a single line of code. The focus here is on the Salesforce side: creating a custom object, building automation with flows, configuring an outbound message, and linking data fields to the appropriate mail template. Click2Mail Connect serves as the secure data receiver and routing engine — once Salesforce sends the data, Connect validates it and queues it for mailing.
If you're looking for more help with Click2Mail Connect itself — like managing templates or setting up accounts — we have separate documents for that. This guide is specifically focused on Salesforce setup.
Step 1: Create a Custom Object in Salesforce
Start by creating a new custom object to hold your mailing data. This object functions as a container for each record that will be mailed — including name, address, and custom messaging.
Example Fields:
-
First Name
-
Last Name
-
Address 1
-
Address 2
-
City
-
State
-
ZIP
-
Custom Message
-
Promo Code
Tips:
-
Include an “Address 2” field, even if most records don’t use it — it helps for apartment numbers or suites.
-
Clean up any unneeded fields (like Plus 4 or Country) if you’re only mailing within the U.S.
Step 2: Connect Click2Mail and Salesforce Accounts
Go to connect.click2mail.com and add both your Salesforce and Click2Mail accounts under Connected Accounts.
Then, head to the Integrations tab and click Create. Follow these general steps:
-
Name the integration (e.g., TT50Off).
-
Choose Salesforce as the data source.
-
Select the custom object you just created.
-
Map Salesforce fields to the document template (created earlier in Connect).
This creates a webhook and injects a hidden field called Click2Mail into your custom object layout in Salesforce.
Step 3: Add the Click2Mail Field to Page Layout
Go back to Object Manager, edit your custom object layout, and drag the new Click2Mail field into the layout (recommended: above your custom message or promo code).
This field acts as a trigger when you enter the appropriate value (e.g., TT50Off).
Step 4: Create an Outbound Message
-
Go to Setup > Outbound Messages.
-
Click New Outbound Message.
-
Choose your custom object.
-
Paste the webhook URL (from Click2Mail Connect).
-
Select the fields to send:
-
First Name
-
Last Name
-
Address 1
-
Address 2
-
City
-
State
-
ZIP
-
Custom Message
-
Promo Code
-
Step 5: Create a Record-Triggered Flow
-
Go to Setup > Flows and create a New Flow.
-
Choose Record-Triggered Flow.
-
Set the object to your custom object (e.g., TT50Off).
-
Trigger the flow when Click2Mail equals TT50Off.
-
Add an Action: Select Outbound Message and choose the one you just created.
-
Save and Activate the flow.
Step 6: Test the Trigger
-
Open any record from your custom object.
-
Type TT50Off into the Click2Mail field and hit Save.
-
Salesforce sends the data to Click2Mail via webhook.
-
If successful, the Click2Mail field value will update to something like Pushed to C2M.
You can monitor success or failure via Connect’s Order History tab or the Failed Requests section. No mail will be sent or charged unless the job is valid and credit is available.
What Click2Mail Connect Does (General Overview)
Click2Mail Connect securely receives your Salesforce data and processes it into a print-ready mailpiece. It performs address validation, groups jobs into daily print batches, and manages credit balance. You can view job history, tracking, and invoices through the Click2Mail dashboard. Credit is required for automation to proceed.
For more details or help, visit click2mail.com or explore our full training series.
Carly Brown
Comments