Skip to main content
The Salesforce add contact to campaign action associates an existing Salesforce contact with a specific campaign. This is a write action that enables agents to automate common follow-up steps like adding new prospects to nurture journeys or event campaigns immediately after creation or qualification.

Prerequisites

  • Your Salesforce org must be connected as a data source in Glean, and an admin must enable the Salesforce action pack and complete Salesforce Actions Setup including OAuth configuration.
  • Users must authenticate for Salesforce actions on first use.
  • The Salesforce user must have permission to work with the relevant campaign and contact records.

Supported parameters

ParameterTypeDescription
Campaign IDStringThe unique identifier of the Salesforce campaign to add the contact to. Required.
Contact IDStringThe unique identifier of the Salesforce contact to associate with the campaign. Required.
StatusStringOptional campaign member status representing how the contact engages with the campaign (e.g., “Sent”, “Responded”).

Usage examples

  • “Add contact ID 003PZ000001rbt8YAA to the Q1 Product Launch campaign.”
  • “Enroll the new contact in campaign ID 701PZ000002nrxyYAA with status ‘Sent’.”
  • “Associate Sarah Chen’s contact record with the Webinar Attendees campaign.”

Troubleshooting

  • Possible cause: The Salesforce action pack is not added or published in your Glean deployment.
  • Fix: In the Glean admin console, go to Platform → Actions, add the Salesforce action pack, link it to your Salesforce datasource, configure authentication, update publish settings, and save. After that, Salesforce actions should appear under Actions → By datasource → Salesforce.
  • Possible cause: The user’s connected Salesforce account is missing, inactive, or misconfigured, or the Salesforce connected app is not set up correctly.
  • Fix: Ask the user to re-authenticate Salesforce when prompted by Glean. If errors persist, verify the Salesforce connected app configuration (callback URL and scopes) and confirm that Salesforce Actions Setup is complete.
  • Possible cause: Salesforce rejected the request due to validation rules, missing required fields, insufficient permissions, or incorrect campaign or contact identifiers.
  • Fix: Check agent run details and Salesforce error messages. Adjust required fields, validation rules, or user permissions. Verify that the campaign ID and contact ID are correct and that the user has access to both records.
  • Possible cause: The action’s idempotency behavior may allow multiple additions of the same contact to the same campaign.
  • Fix: Design your agent workflow to check if the contact is already a campaign member before calling this action. Validate the behavior in your Salesforce org before using in high-volume automated workflows.

FAQs

This is a write action. It sends a request to Salesforce to modify campaign-member data by associating a contact with a campaign.
Yes. You can combine this action with other Salesforce actions such as Create contact, Search contacts, Associate contact to account, Send email, and Log email activity in the same agent to create comprehensive workflows.
The idempotency behavior depends on your Salesforce configuration. In most cases, Salesforce will update the existing campaign member record rather than create a duplicate. Test this behavior in your org before deploying to production workflows.
This action only adds contacts to campaigns. To remove a contact from a campaign, you would need to use a different Salesforce action or perform the operation directly in Salesforce.
You can find the campaign ID in Salesforce by navigating to the campaign record and copying the ID from the URL, or use the Search campaigns action to programmatically find the campaign ID based on campaign name or other criteria.