Salesforce
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,Connectors
The Salesforce add-on sends data from your application to Salesforce and reads it back. Its actions create records such as leads, cases, contacts and accounts, run SOQL queries to read fields from a record, and add leads to campaigns.
The add-on is installed separately as the DnnSharp.Salesforce package, and needs the SALESFORCE feature in your license. If it isn't licensed, the actions fail with a "not licensed" error. If you don't see the Salesforce actions or the Salesforce connector type, the add-on isn't installed.
Choosing an action
| Action | What it does | Use it to |
|---|---|---|
| Create a Salesforce Entity | Creates one record of a standard or custom object from a list of field values, and returns its ID. | Create a lead from a contact form, or open a case from a support request. |
| Run SOQL Query | Runs a SOQL query and saves fields from the first record in tokens. | Load a lead or contact by email, check whether a record exists, or look up an ID. |
| Add to campaign | Adds an existing lead to one or more campaigns by their IDs. | Register a new lead for an event and a newsletter campaign. |
| Create a Salesforce Entity (obsolete) | The older version of Create a Salesforce Entity, with the login details in the action. | Nothing new. Use Create a Salesforce Entity instead. |
| Run SOQL Query (obsolete) | The older version of Run SOQL Query, with the login details in the action. | Nothing new. Use Run SOQL Query instead. |
| Add to campaign (obsolete) | The older version of Add to campaign, with the login details in the action. | Nothing new. Use Add to campaign instead. |
| Add Salesforce Connector | Creates a Salesforce connector with the login details, and can save its ID in a token. | Let each customer or department save its own Salesforce account from a form. |
| Update Salesforce Connector | Replaces the title and login details of an existing Salesforce connector. Fields you leave out are cleared. | Save a new password or security token after it changes in Salesforce. |
Connectors and the obsolete versions
- Use a Salesforce connector. The current actions sign in with a Salesforce connector, which holds the login URL, username, password and security token, with the password and token saved encrypted. Create it on the Connectors page or with Add Salesforce Connector, and change it with Update Salesforce Connector. Neither action contacts Salesforce, so check the connector with Test Connector after saving.
- The obsolete versions store the login details in each action, so anyone who can edit or export the action can read them, and every action needs updating when the password changes. Each obsolete page has a section on moving to the current action.
- Sandbox orgs use a different login domain, for example
https://test.salesforce.com. Set it in the connector's Login Url. - Permissions. The actions run as the Salesforce user in the connector, with that user's access to objects and fields. Every run signs in again, which counts against your org's API limits.
Linking actions with IDs
The actions pass Salesforce IDs between them:
- Create a Salesforce Entity returns the new record's ID. Pass a lead's ID to Add to campaign.
- Run SOQL Query looks up IDs you don't have, such as a campaign ID from its name, or an existing lead by email. Use it before Create a Salesforce Entity to avoid duplicates, because that action doesn't check for them.
- Add to campaign only takes campaign IDs, and always sends the ID as a lead ID. Contacts and other records are rejected.
Tokens in a SOQL query aren't escaped, so don't put user input straight into the query. See Tokens in the query.
What isn't covered
- Changing or deleting records. Create a Salesforce Entity only inserts new records, and SOQL is read-only. There's no update, upsert or delete action.
- Reading many records. Run SOQL Query only reads the first record. To work with many, call the Salesforce REST API with Server Request and use Create List from JSON.
- Campaign member status. Add to campaign uses the campaign's default status, and can't change or remove existing members.
For the general connector actions, see Connectors. For Microsoft's CRM, see Dynamics CRM 365. For all add-ons, see Add-ons.
Revised 10/02/2026