Skip to main content

Salesforce Case Management Agent

Overview

The Salesforce Case Management Agent is an out-of-the-box Agent within the ai12z Copilot suite that allows you to interact with Salesforce to retrieve and update case details. By integrating with your Salesforce instance, this agent simplifies customer service operations by providing quick access to case information and enabling case updates directly from the bot. With straightforward configuration and minimal setup, you can enhance your customer support capabilities without extensive development effort.

Key Features

  • Retrieve Case Details: Fetch detailed information about a specific case using the case number and associated email.
  • Update Cases: Modify case attributes such as status, description, or any custom fields directly from your application.
  • Salesforce Integration: Seamlessly connects with your Salesforce instance using secure API calls.
  • Easy Configuration: Simple setup process within the ai12z Copilot platform.

Purpose

The agent is designed to:

  • Enhance Customer Support: Enable your support team to access and update case information quickly, improving response times and customer satisfaction.
  • Simplify Integration: Eliminate the need for complex Salesforce API integrations and handling of data retrieval and updates.
  • Save Time: Automate the process of case management, allowing your team to focus on resolving issues.

How It Works

  1. Salesforce Connection: The agent connects to your Salesforce instance using stored credentials.
  2. Input Parameters: Provide the case number and email to retrieve or update case information.
  3. Case Retrieval: Fetches case details, including owner information, subject, status, description, and comments.
  4. Case Update: Allows you to update case fields such as status, description, or add comments.

Salesforce Agent Configuration

Prerequisites

  • Salesforce Account: You must have an active Salesforce account with API access.
  • Credentials: Ensure you have your Salesforce username, password, and security token.

Configuring the Salesforce Agent in ai12z Copilot

To connect your ai12z Copilot to your Salesforce instance, you need to provide your Salesforce credentials within the platform. This is done through a setup interface where you input your Salesforce account details.

Accessing the Salesforce Settings

  1. Navigate to Project Settings:

    • Log in to your ai12z Copilot portal.
    • Go to Project Settings.
  2. Select the Salesforce Case Management Agent:

  3. Open the Update Settings Dialog:

    • Click on the Settings or Configure button associated with the Salesforce agent to open the setup dialog.

Update Settings Dialog

The Update Settings dialog allows you to input or update your Salesforce configuration settings. The form includes the following elements:

Fields
  • Username*:

    • Enter your Salesforce username.
    • This is a required field.
  • Password*:

    • Enter your Salesforce password.
    • This is a required field.
  • Security Token*:

    • Enter your Salesforce security token.
    • This token is typically used for API access to Salesforce.
    • If you don't have a security token, you can reset it from your Salesforce account settings.
    • This is a required field.
  • JSONata:

    • An optional field where you can input a JSONata expression.
    • JSONata is a lightweight query and transformation language for JSON data.
    • Allows custom processing or filtering of Salesforce responses within the Copilot system.
    • Use this field if you need to customize how data is retrieved or formatted.
Buttons
  • Cancel:

    • Cancels the current operation.
    • Closes the dialog without saving any changes.
  • Save:

    • Commits the changes made in the form to the system.
    • Saves the provided settings for Salesforce case management integration.

Example of the Update Settings Dialog:

Title: Update Settings

Fields:
- Username*: [______________________]
- Password*: [______________________]
- Security Token*: [______________________]
- JSONata: [______________________]

Buttons:
[ Cancel ] [ Save ]

Saving the Configuration

  1. Enter the Required Information:

    • Fill in the Username, Password, and Security Token fields with your Salesforce credentials.
    • If needed, enter a JSONata expression in the JSONata field.
  2. Save the Settings:

    • Click the Save button to commit your changes.
    • The system will securely store your Salesforce credentials and configuration.
  3. Confirmation:

    • Upon successful saving, you should receive a confirmation message.
    • If there are any errors (e.g., incorrect credentials), the system will prompt you to correct them.

Testing the Connection

After saving your settings, it's recommended to test the connection to ensure that the agent can communicate with your Salesforce instance.

  1. Test Retrieval:

    • Try retrieving a case using the agent with a known case number and email.
  2. Test Update:

    • Attempt to update a case to confirm that the agent has the necessary permissions.
  3. Monitor Logs:

    • Check the logs or console for any error messages if the tests fail.

Security Considerations

  • Credential Storage:

    • Your credentials are stored securely within the ai12z Copilot system.
    • Ensure that access to the Project Settings is restricted to authorized personnel.
  • Permissions:

    • The Salesforce user account provided should have appropriate permissions to access and modify cases as needed.

Resetting Credentials

If you need to update or reset your Salesforce credentials:

  1. Access the Update Settings Dialog:

    • Navigate to the Salesforce Case Management Agent settings as described above.
  2. Update the Fields:

    • Enter the new credentials in the Username, Password, and Security Token fields.
  3. Save the Changes:

    • Click Save to update the settings.

Parameters

Retrieve Case Information

When invoking the agent to retrieve case details, you can specify the following parameters:

  • caseNumber (string, required): The unique identifier assigned to each case record in Salesforce. For example, "500dM00000EsC1sQAF".

    • Description: In Salesforce, the Case Number is a unique identifier assigned to each case record. It is a standard field in the Case object, automatically generated when a new case is created. The Case Number is used to track and manage individual cases, making it easier to reference and differentiate them.
  • email (string, required): The email address associated with the case owner or the contact related to the case. For example, "johnsmith@xyz.com".

    • Description: The email is used in combination with the Case Number to retrieve specific case details.

Update Case Information

To update a case, you will need to specify additional parameters

  • caseNumber (string, required): The unique case number.
  • email (string, required): email of who the case belongs to.

Enabling the Agent

To enable the Salesforce Case Management Agent in your ai12z Copilot:

  1. Access the Agent Settings:

    • Log in to your ai12z Copilot dashboard.
    • Navigate to the Agents section.
  2. Locate the Agent:

    • Find the Salesforce Case Management agent in the list of available agents.
  3. Enable the Agent:

    • Click on the agent and select Enable to activate it for your projects.
  4. Configure Salesforce Credentials:

    • Follow the steps outlined in the Configuring the Salesforce Agent in ai12z Copilot section to input your credentials.
  5. Set Parameters:

    • When using the agent, specify the required parameters (caseNumber, email, and optionally updates) as needed for your application.

Usage Examples

Example 1: Retrieving Case Information

  • Use the ai12z forms to collect the required information such as case Number and email
{
"function": "salesforce_case_info",
"parameters": {
"caseNumber": "500dM00000EsC1sQAF",
"email": "johnsmith@xyz.com"
}
}

In this example, the agent will:

  • Connect to Salesforce using the stored credentials.
  • Retrieve the case details for the case number 500dM00000EsC1sQAF associated with johnsmith@xyz.com.
  • Return the case information, including comments, in a structured JSON format.

Output Example

{
"records": [
{
"Owner": {
"Email": "johnsmith@xyz.com",
"Name": "John Smith"
},
"CaseNumber": "500dM00000EsC1sQAF",
"Subject": "Issue with Product X",
"Status": "Open",
"Description": "Customer reports a problem with Product X.",
"CaseComments": {
"records": [
{
"CommentBody": "Initial customer inquiry.",
"CreatedDate": "2023-09-22T14:35:47.000+0000"
},
{
"CommentBody": "Support team responded.",
"CreatedDate": "2023-09-23T09:15:20.000+0000"
}
]
}
}
],
"totalSize": 1,
"done": true
}

Example 2: Updating a Case from the Bot

  • Use the ai12z Forms to control collectin case number and to update the status and Description.
{
"function": "salesforce_update_case",
"parameters": {
"caseNumber": "500dM00000EsC1sQAF",
"updates": {
"Status": "Closed",
"Description": "Issue resolved. Closing the case."
}
}
}

In this example, the agent will:

  • Connect to Salesforce using the stored credentials.
  • Update the case with the number 500dM00000EsC1sQAF.
  • Change the status to "Closed" and update the description.
  • Return a success message upon successful update.

Output Example

{
"result": "Case 500dM00000EsC1sQAF updated successfully."
}

Benefits

  • Improved Efficiency: Quickly access and update case information without logging into Salesforce directly.
  • Enhanced Customer Service: Respond to customer inquiries faster by having immediate access to case details and the ability to update cases on the fly.
  • Streamlined Operations: Integrate case management into your existing workflows and applications.
  • Time Savings: Reduce the time spent on administrative tasks, allowing your team to focus on resolving issues.

Limitations

  • Salesforce API Limits: Be aware of your Salesforce API usage limits to avoid hitting the maximum number of API calls allowed.
  • Permission Requirements: Ensure that the Salesforce user account used has the necessary permissions to access and update cases.
  • Non-Customizable: This is an out-of-the-box agent with fixed functionality and cannot be extensively customized.

Best Practices

  • Secure Credentials: Always store your Salesforce credentials securely and limit access to authorized personnel.
  • Error Handling: Implement error handling in your application to manage cases where the agent cannot retrieve or update case information.
  • Data Validation: Validate input parameters before invoking the agent to prevent errors due to incorrect data.
  • Monitor Usage: Keep track of your Salesforce API usage to ensure compliance with your plan's limits.

Support

If you need assistance or have questions about the agent:

  • Documentation: Refer to the ai12z Copilot documentation for more detailed information.
  • Contact Us: Reach out to our support team at support@ai12z.com for personalized help.

By including the setup dialog and configuration steps, you can easily integrate the Salesforce Case Management Agent within the ai12z Copilot platform, ensuring seamless connectivity with your Salesforce instance. This empowers your team to access and update case information directly from your applications, enhancing customer service and streamlining support operations—all with minimal effort and cost.