Documentation Index
Fetch the complete documentation index at: https://support.affinity.co/llms.txt
Use this file to discover all available pages before exploring further.
Reference — lookup information.
Overview
- Use Affinity data to create Salesforce notifications
- Example: How to create a record-trigger Flow to notify users about job changes
- Additional record-triggered notification types
- For accounts
- For contacts
- For both accounts and contacts
Use Affinity data to create Salesforce notifications
- Record-triggered Flows automatically execute actions when a record is created, updated, or deleted.
- You can use Affinity data to create these Flows to automate more of your workflows or create timely alerts. For example, you can create a Flow that is triggered when an existing contact’s relationship score is updated or a contact changes jobs.
- Let’s walk through the steps for creating notifications with record-triggered Flows. We’ll use a job change for this example, but once created, you can use this as a template to create additional record-triggered notifications.
Example: How to create a record-trigger Flow to notify users about job changes
Step 1 - Create a new record-triggered Flow
- From Setup, enter “Flows” in the Quick Find box, then select Flows.
- Click New Flow.
- Select Start from Scratch, and then click Next.
- Select Record-Triggered Flow.
- Click Create.
Step 2 - Define the trigger
We’ll create a trigger for any time a contact’s Job Title or Current Company changes. That way, we’ll get notified if they completely change jobs or simply change roles within the same company.- For Object, select Contact.
- For Trigger the Flow When, select A record is updated.
- For the Condition Requirements, select All Conditions Are Met (OR)
- Define the first condition:
- Field: Current_Job_Title_Affinity (Note: your field might have a different name)
- Operator: Is Changed
- Value: True
- Click Add Condition
- Define the second condition:
- Field: Current_Company_Affinity (note: your field might have a different name)
- Operator: Is Changed
- Value: True
- At the bottom of the Configure Start window, select Actions and Related Records.

Step 3 - Create a new custom notification type
- In a new tab, go to Setup, enter “Notification” in the Quick Find box, and then select Custom Notifications.
- Click New.
- Select Salesforce Desktop or Mobile as your notification type.
Step 4 - Add a Get Records element
- Click the plus sign (+) below the start node to add a new element.
- Select Get Records from the dropdown.
- Write “Get Notification Type ID” as the label.
- Under Get Records of This Object, search for and select Custom Notification Type.
- Filter the notification type using: Field: MasterLabel, Operator: Equals, Value: Affinity Job Change Notifications
- Select Only the first record and Automatically store all fields.

Step 5 - Add an Assignment element to ensure the right people are notified
- Click the plus sign (+) below the new Get Records node to add a new element.
- Select Assignment from the dropdown.
- Write “Assign Owner to Notification List” as the label.
- Go to the Toolbox in the left side panel and click New Resource.
- Fill in: Resource Type: Variable, API Name: Notification Recipient IDs, Description: List of people who will get notified about job changes, Data Type: Text, check Allow multiple values.
- Click Done.
- Set variables to: Variable: Notification Recipient IDs, Operator: Add, Value: Triggering Contact > Owner ID > User ID
Step 6 - Add an Action element to send the notification
- Click the plus sign (+) below the new Assignment node to add a new element.
- Select Action from the dropdown.
- Search and select Send Custom Notification.
- Give the element a name by adding a label (e.g. Send Job Change Notification).
- Add the new custom notification type ID you just created by selecting Custom Notification Type ID under Record Fields in the dropdown.
- Before adding the notification body or title values, you must create them as new resources (Text Templates).
- Add the new Notification Body and Notification Title values to the Action element.
- Add the new Notification Recipient IDs to Recipient IDs.
- Toggle the Target ID so it’s included and select Contact ID as the value.
Step 7 - Save, debug, and test your Flow
- Click Save or Save As a New Version.
- Select the Debug button and select a Contact to test.
- Change the Current Company on the Contact record and select Run.
- Once any bugs are resolved, you should run additional tests to ensure your Flow is working as expected.
- Once you’ve activated your flow, head over to a contact that you are the owner of, and try changing their job title or company.

Additional record-triggered notification types
For accounts
- Funding updates: You can trigger notifications when the Last Funding Date or Total Funding Amount (USD) fields change.
- Investor changes: Send notifications when the Investors field is updated.
- Headcount or growth signals: Create alerts if Number of Employees, or Employees (Current), Employees (3/6/12/24 Months Ago), or Employee Departures/Hires (Last 3 Months) fields significantly change.
- Industry shifts or location changes: Notify users if the company’s Location or Industry fields are updated.
- New relationship introduction: Use the Source of Introduction field to prompt notifications when a new introduction or referral is logged.
For contacts
- LinkedIn profile updates: If the LinkedIn URL or LinkedIn Profile Headline changes, send notifications.
- Contact information changes: Set up notifications when the Phone Number or Last Email Used fields change.
For both accounts and contacts
- Activity-Based Notifications: Create triggers when First Email, Last Email, First Meeting, or Last Meeting dates change.
Screenshots
