Salesforce integration
CommandBar’s integration with Salesforce works in two directions:
- CommandBar —> Salesforce: send CommandBar-generated events to Salesforce
- Salesforce —> CommandBar: use attributes that exist in Salesforce for Who targeting in CommandBar
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 CommandBar 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 CommandBar
Sending Properties to CommandBar
You can send any of the existing user properties that you send to Salesforce to CommandBar. 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 CommandBar:
window.CommandBar.boot(userID, userProperties);
// Adding one-off or session only properties to CommandBar is easy too:
window.CommandBar.addMetadata("userIsWorkspaceOwner", true);