Skip to main content

Salesforce integration

Command AI's integration with Salesforce

Salesforce —> Command AI: use attributes that exist in Salesforce for Who targeting in Command AI

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);