Salesforce
Setup within Maven
Maven needs several pieces of information to connect to your Salesforce instance.
- First find your Salesforce domain which is the first portion of your URL (e.g. https://mycompany.my.salesforce.com)
- Then find your Organization ID which is listed under Company Information within the Salesforce’s Settings page (e.g. 00AA10000001AAA)
After you click “Save”, you will see a message below the Salesforce settings letting you know whether the connection is successful.
Optionally, if you wish to use your own connected app, enter a custom App Client Id/Secret.
You can also optionally enter the name of the custom field name used for the first user message if your salesforce setup does start with an EmailMessage.
Setup within Salesforce
Video Guides
- Video 1: Setting Up Salesforce Integration Part 1
- Video 2: Setting Up Maven Copilot
- Video 3: Setting Up Live Agent Handoff in Salesforce
Set up an Integration User
Create a Connected App
- Go to Setup > App Manager > New Connected App.
- Enable OAuth Settings.
- Set Callback URL:
https://mavenagi.com
. - Selected OAuth Scopes:
- Manage user data via APIs (
api
) - Access the Salesforce API Platform (
sfap_api
)
- Manage user data via APIs (
- Enable Client Credentials Flow.
- Save the app.
- Click Manage Consumer Details.
- Copy Client Id and Client Secret for later use.
Create an Integration User
- Navigate to Setup > Users > New User.
- User License: Salesforce Integration
- Profile: Salesforce API Only System Integration
- Check Flow User.
- Save.
- Go to Permission Set License Assignments > Edit Assignments.
- Check Salesforce API Integration.
Set up Integration User Permissions
- Go to Setup > Permission Sets > New.
- Label: Maven Integration User Permissions
- Do not select a Permission Set License.
- Navigate to Permission Set > Manage Assignments, and add the Integration User.
- Go to Permission Set > Assigned Connected Apps > Edit, and add the connected app.
- Object Settings:
- Cases: Add read + create permissions (if using handoff).
- Email Message: Add read permission.
- CaseFeed: Add read permission.
Link the Connected App to the Integration User
- Go to Setup > Manage Connected Apps > Your Connected App.
- Edit Policies.
- Under OAuth Policies, set Permitted Users to Admin approved users are pre-authorized.
- Under Client Credentials Flow, set Run As to the Integration User.
Link Connected App to Maven
- Go to Maven Dashboard > Integrate Salesforce.
- Enter:
- Salesforce Domain: (from Setup > My Domain > Current My Domain URL)
- Connected App Client Id and Secret
- Salesforce Org Id: (from Setup > Company Information > Organization Id)
- When you see “Connection successful”, Maven is now synced with Salesforce.
Enable Knowledge Connection
- Set up integration user permissions for Knowledge.
- Navigate to Maven Integration User Permissions.
- Go to Object Settings > Knowledge (Knowledge_kav).
- Enable:
- Read
- View All Records
- View All Fields permissions.
- In Maven Dashboard, navigate to Train > Knowledge.
Install Maven Copilot
- Install Maven Copilot 2.0 from AppExchange.
- Set up Maven API Key in Salesforce:
- Navigate to Setup > Named Credentials > External Credentials.
- Find Maven AGI Agent Key > Principles section > Edit.
- Add Authentication Parameter:
- Name:
AgentAPIKey
- Value: (See Maven Dashboard)
- Name:
Set up Email Case Settings
Support Settings
- Go to Feature Settings > Service.
- Set Default Case Owner and Automated Case User to an Admin or Support Lead.
- Click Save.
Enable Email-to-Case
- Navigate to Feature Settings > Service > Email-to-Case.
- Check:
- Enable Email-to-Case
- Enable on-demand service
- Click Save.
Add a Routing Address
- Click New.
- Enter:
- Routing Name:
email2case
- Email Address: (Notification Email)
- Case Origin:
Email
- Routing Name:
- Click Save.
Set up User Permissions in Salesforce
- Create a Permission Set:
Maven AGI User Permissions
. - Assign to:
- Users needing access to Maven Copilot.
- The Integration User.
- Under Apex Class Access, add:
mavenagi.MavenProxy
mavenagi.CaseWebhookHandler
mavenagi.TriggerDeduper
- Under External Credential Principal Access, add:
MavenAGIAgentKey - Maven API Key
- Under Object Settings, enable read access for:
- User External Credentials
- Under Assigned Connected Apps, add:
MavenAGI Copilot
- Update OAuth Policy:
- Setup > Connected Apps > OAuth Policies
- Set to Admin approved users are pre-authorized.
Add MavenCopilot Lightning Component
- Navigate to Case Page > Gear Icon > Edit Page.
- Drag Copilot Component to the desired location.
Webhook Configurations
-
Set custom setting defaults for triggers to OFF.
-
Use VSCode Salesforce Extension to deploy
mavenWebhooks.platformEventSubscriberConfig-meta.xml
:
Replace {INTEGRATION_USER_NAME}
with the unique user name of the integration user you created above. This will configure the webhooks so they are sent from the integration user.
Alternatively, you can use the REST API to deploy these changes. Make a POST
request to:
For the changes to take effect:
- Go to Setup > Platform Events > MavenCaseWebhookEvent > Subscriptions
- Click on Manage for
MavenCaseWebhookEventTrigger
- Click Suspend, then click Resume
Configure Live Agent Handoff for Chat
Salesforce configuration varies drastically from organization to organization, depending on their requirements and infrastructure. As such, there is no one configuration that applies to Maven AGI chat handoff integration.
Handoff integration depends on a Salesforce chat deployment and button that can resolve to an Available state. Any other state will result in the API returning a ChatRequestFailed
event.
Required Properties
- Button ID – The unique identifier for your chat button in Salesforce.
- Chat Host URL – The base URL for your Live Agent server (e.g.,
https://d.la12s-core1.sfdc-lywfpd.salesforceliveagent.com
). - Chat Deployment ID – The unique identifier for your chat deployment.
- ES Live Agent Dev Name – The developer name of the Embedded Service (ES) Live Agent configuration.
- Organization ID
Configuration Steps
1. Enable Chat
- Navigate to Feature Settings > Service > Chat
- Check Enable Chat
- Copy/save the Chat API Endpoint for later
2. Set Up Chat Deployment
- Search “Deployments” and pick the one for Feature Settings > Service > Chat
- Click New
- Chat Deployment and Developer Name:
Live Agent Deployment
- Chat Window Title:
Support
- Check Allow Access to Prechat API
- (Optional) Check Enable Custom Timeouts
- Idle Connection Warning:
10
- Idle Connection Timeout:
15
- Idle Connection Warning:
- Click Save
3. Configure Omni-Channel Settings
- Navigate to Feature Settings > Service > Omni-Channel
- Check Enable Omni-Channel
- Check Enable Skills-Based and Direct-to-Agent-Routing
- Select Warn agents in a popup radio button
- Click Save
Note: Ensure that Enhanced Omni-Channel Routing is set to Off
4. Create a Routing Configuration
- Navigate to Feature Settings > Service > Omni-Channel
- Click New
- Routing Configuration Name:
Live Agent Routing
- Developer:
Live_Agent_Routing
- Overflow Assignee: (Optional, can be set as yourself)
- Routing Priority:
1
- Routing Model:
Least Active
- Push Out Time:
60
- Capacity Type:
Inherited
- Units of Capacity:
1.00
5. Create a Queue
- Navigate to Setup > Users > Queues
- Label/Name:
Live Agent Queue
- Routing Configuration:
Live Agent Routing
- Available Objects: Add
Case
andChat Transcript
- Under Queue Members, add agents:
- Typically a Public Group containing support agents
- Can also be set as an individual user for testing
- Ensure all selected users have Chat User and Service Cloud enabled in their user configuration
6. Configure Chat Buttons & Integrations
- Navigate to Feature Settings > Service > Chat
- Click New
- Type:
Chat Button
- Name/Developer Name:
Live Agent Chat
- Routing Type:
Omni-Channel
- Queue: Add
Live Agent Queue
from Step 5 - Check Enable Queue
- Overall Queue Size:
10
- Click Save
7. Ensure Presence Configurations are Set Correctly
- Navigate to Feature Settings > Service > Omni-Channel
- Verify the default Presence Configuration:
- Ensure it allows for the queue to hand off automatically to agents
- Set Capacity to a reasonable number per agent
- Enable Audio Settings
- Check all boxes under Transfer Settings
- Assign the appropriate Profile for support agents if configured
- Click Save
8. Create an Embedded Services Deployment
- Navigate to Feature Settings > Service > Embedded Service Deployments
- Click New Deployment > Embedded Chat
- Service Deployment Name:
Live Agent Deployment
- Chat Button:
Live Agent Chat
9. Create JSON String for Handoff
Now, gather values for the required parameters and create the JSON configuration for the Chat Installation in Maven:
- The
apiSecret
above is a placeholder and should be replaced. availabilityFallbackMessage
can be customized.chatButtonId
is found in the Chat Button view after creation in Step 8.deploymentId
is found in the Chat Deployment after creation in Step 4 (Org ID is also shown next to deployment ID).
This JSON string is inserted into the Live Agent Handoff configuration section of Maven Chat settings.
Using Live Handoff
Once configured, support agents can use the Salesforce Service Console:
- Click the 9 dots on the left of the screen and search for
Service Console
- Click Omni-Channel at the bottom
- Click the dropdown arrow next to Offline
- Select Available - Chat
Now, agents are online and can receive incoming chats from Maven.
To initiate a handoff:
- In a configured Maven chat instance, type “connect to an agent” (this trigger can be customized)
- A confirmation popup will appear
- Click Connect to live agent
- The message will appear in the Salesforce Service Console
- Agents can then accept the message and pick up the conversation
Still not working?
Contact us for more support.