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
| Parameter | Type | Description |
|---|---|---|
| Campaign ID | String | The unique identifier of the Salesforce campaign to add the contact to. Required. |
| Contact ID | String | The unique identifier of the Salesforce contact to associate with the campaign. Required. |
| Status | String | Optional 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
Action does not appear in the agent builder
Action does not appear in the agent builder
- 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.
Action fails with OAuth or connected account error
Action fails with OAuth or connected account error
- 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.
Action succeeds but contact is not added to campaign
Action succeeds but contact is not added to campaign
- 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.
Duplicate contact additions
Duplicate contact additions
- 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
Is this a read or write action?
Is this a read or write action?
This is a write action. It sends a request to Salesforce to modify campaign-member data by associating a contact with a campaign.
Can I use this action with other Salesforce actions?
Can I use this action with other Salesforce actions?
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.
What happens if I add the same contact to a campaign multiple times?
What happens if I add the same contact to a campaign multiple times?
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.
Can I remove a contact from a campaign?
Can I remove a contact from a campaign?
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.
How do I find the campaign ID?
How do I find the campaign ID?
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.