When you connect AI Email (AIE) with Salesforce, the system automatically prevents any email addresses marked as “do not contact” (DNC) in either platform from receiving messages from your AI email agent. This ensures that your emails align with the CAN-SPAM Act best practices and are less likely to be flagged as spam.
To make it easy for recipients to opt out, we recommend adding an Unsubscribe option in your email signature.
Requirements
- The DNC field in Salesforce must be a boolean field. 
- The boolean DNC field in Salesforce must be mapped to the one in AIE. 
One-time DNC sync
To align your DNC records, AIE performs a one-time sync where:
- AIE looks at your Salesforce records and matches any leads that are already in AIE by their email addresses. AIE uses the email address as the unique identifier for each lead and assigns a Salesforce ID to those leads. 
 
- If there are duplicate leads in Salesforce (same email address), AIE uses latest modified record and assigns that Salesforce ID to AIE lead. 
DNC status logic
- If a Salesforce lead has a DNC status of false or blank, the AIE DNC status updates to true. 
- If a Salesforce lead has a DNC status of true, the AIE DNC status updates to true. 
This logic ensures that a lead that is marked as DNC in either AIE or Salesforce will be marked on both platforms as DNC, thus ensuring that no communication will be sent to those DNC leads from AIE.
Post-sync checks
After the initial sync, AIE checks Salesforce on a Just-In-Time (JIT) basis, before the AI email agent sends out any communication (initial email and follow-up emails), AIE performs a sequence of checks as follows:
- If a lead is marked as DNC in AIE, the email will not be sent. 
- AIE checks Salesforce for DNC status. DNC status must be either False or blank. If DNC status is not False or blank, email will be sent. 
- If the Salesforce DNC status is True on the JIT check, AIE updates the lead record on AIE to reflect DNC=True. 
Given this logic, AIE always checks just before an email is sent, to get the DNC status of a lead. This prevents an email being sent to a lead that is marked as DNC in either AIE or Salesforce.
Given the nature of JIT checks, the DNC statuses across AIE and Salesforce are not synced in real-time or regularly. Thus, there may be discrepancies in records at any one time.
Example of a post-sync check
To explain the Salesforce post-sync check, consider a lead that exists in AIE but hasn’t been updated for a long time. This lead may have a different DNC status compared to what is in Salesforce. The statuses won’t match until a JIT check is done. When an email is about to be sent to this lead through AIE, the JIT check reveals that the lead is marked as DNC in Salesforce. As a result, the email won’t be sent, and AIE updates its record to show that the lead is DNC=True.
AIE manual DNC requests
When a lead requests not to be contacted through the AI email agent, or if an AIE user marks the lead as “DNC” in AIE, then if the lead has a Salesforce ID, AIE updates the DNC status in Salesforce. If the lead does not have a Salesforce ID, AIE cannot update the status.