Skip to main content
The Salesforce add lead to campaign action associates an existing Salesforce lead 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 lead records.

Supported parameters

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

Usage examples

  • “Add lead ID 00QPZ000001rbt8YAA to the Q1 Product Launch campaign.”
  • “Enroll the new lead in campaign ID 701PZ000002nrxyYAA with status ‘Sent’.”
  • “Associate the prospect lead 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 lead identifiers.
  • Fix: Check agent run details and Salesforce error messages. Adjust required fields, validation rules, or user permissions. Verify that the campaign ID and lead 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 lead to the same campaign.
  • Fix: Design your agent workflow to check if the lead 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 lead with a campaign.
Yes. You can combine this action with other Salesforce actions such as Create lead, Update lead, Search leads, List campaigns, 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 leads to campaigns. To remove a lead 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.