Salesforce integration
Command AI's integration with Salesforce works in two directions:
- Command AI —> Salesforce: send Command AI-generated events to Salesforce
- Salesforce —> Command AI: use attributes that exist in Salesforce for Who targeting in Command AI
One-time configuration
Once configured, the integration will "just work" — no maintenance required. You will not need to make any code changes to handle new attributes.
Sending Command AI events to Salesforce
This is a 1-step integration!
Navigate to Integrations and click Enable on the Salesforce integration card.
Using Salesforce data and events in Command AI
Sending Properties to Command AI
You can send any of the existing user properties that you send to Salesforce to Command AI. Here’s a simplified code snippet:
// Your existing user properties
var userProperties = {
Id: "0017000000hOMChAAO",
Name: "Updated Lead Name",
...
};
// Single record update example for an Account
conn.sobject("Lead").update(userProperties, function(err, ret) {
if (err || !ret.success) { return console.error(err, ret); }
console.log('Updated Successfully : ' + ret.id);
// ...
});
// And additionally sent to Command AI:
window.CommandBar.boot(userID, userProperties);
// Adding one-off or session only properties to Command AI is easy too:
window.CommandBar.addMetadata("userIsWorkspaceOwner", true);