Limitations
- As with other Salesforce actions, the exact parameter set and behavior can change over time. Confirm how this action behaves in your own environment before you depend on it for large-scale or fully automated contact creation.
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 and have permission to create Contact records.
Supported parameters
| Parameters | Type | Description |
|---|---|---|
| Account ID | String | Unique identifier for the account. |
| Birthdate | String | Birthdate of the individual. |
| Department | String | Department the individual belongs to. |
| Description | String | Additional details or notes about the record. |
| String | Primary email address. | |
| First name | String | First name of the individual. |
| Last name | String | Required. Last name of the individual. |
| Lead source | String | Source from which the lead was acquired. |
| Mailing city | String | City for the mailing address. |
| Mailing country | String | Country for the mailing address. |
| Mailing postal code | String | Postal or ZIP code for the mailing address. |
| Mailing state | String | State or province for the mailing address. |
| Mailing street | String | Street address for mailing. |
| Mobile phone | String | Mobile phone number. |
| Phone | String | Primary phone number. |
| Title | String | Job title or role of the individual. |
Usage example
You need to add a new contact to Salesforce for a customer representative you met at a conference, checking first to avoid creating a duplicate if they already exist in your system. Instruction to an agent: “Check if a contact exists in Salesforce for [email protected]. If not found, create a new contact for ABC JIM, Director of Product at XYZ Solutions, phone 123-555-0789, located in Palo Alto, CA, and associate her with the YXZ account.” Resulting behavior:- Calls a Salesforce search action to find contacts with email “[email protected]”.
- No existing contact found, so proceeds with creation.
- Calls Search Salesforce with SOQL to find the Account ID for “XYZ Solutions”.
- Retrieves the Account ID (for example, “001xx000001234567”).
-
Calls Create contact with:
-
First nameset to “ABC”. -
Last nameset to “JIM” (required). -
Emailset to “[email protected]”. -
Titleset to “Director of Product”. -
Phoneset to “123-555-0789”. -
Account IDset to “001xx000001234567”. -
Mailing cityset to “Palo Alto”. -
Mailing stateset to “CA”. -
Mailing countryset to “United States”.
-
- Creates a new Contact record in Salesforce linked to the XYZ Solutions account.
- Returns the Contact ID (for example, “003xx000001234567”).
- Confirms the contact was created and associated with the correct account.
Troubleshooting
Salesforce Create contact action does not appear in the Agent Builder
Salesforce Create contact 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 if it is not present already, link it to your Salesforce datasource instance, configure authentication, update publish settings, and save. After that, Salesforce Create contact must appear under Actions → By datasource → Salesforce in the agent builder.
Action fails with an authorization or OAuth error
Action fails with an authorization or OAuth error
Contacts are created but owners or field values are not what you expect
Contacts are created but owners or field values are not what you expect
- Possible cause: The prompts and field mappings of the agent into the Salesforce Create contact action do not match your Salesforce org’s schema or defaulting rules, for example, default contact owner or required custom fields.
- Fix: Review how your agent prompts and maps values into the Salesforce Create contact action, and confirm that your Salesforce org’s defaults, required fields, and validation rules align with how the agent is creating contacts. Update either the agent configuration or your Salesforce configuration so they match.
FAQs
Does this action deduplicate or update existing contacts?
Does this action deduplicate or update existing contacts?
No. This action always attempts to create a new contact. It does not check for existing contacts or update them. To avoid duplicates, design your agent to search for existing contacts, for example, by email address before calling Salesforce Create contact, and branch accordingly.
Can I use this action together with other Salesforce contact actions?
Can I use this action together with other Salesforce contact actions?
Yes. You can combine Salesforce Create contact with other Salesforce actions such as Salesforce Search, Search Salesforce with SOQL, Salesforce Add contact to campaign, Salesforce Associate contact to account, Salesforce Send email, and Salesforce Log email activity in the same agent so the flow can look up records, create new contacts, send follow-up emails, and log activity in a coordinated way.
What happens if I omit required fields?
What happens if I omit required fields?
The action must comply with your Salesforce org’s required fields, validation rules, and defaulting behavior. If the agent omits required fields or passes values that conflict with validation rules, Salesforce will reject the request and the action will fail. Check the agent run details and Salesforce error messages to identify missing fields.