Zum Inhalt springen

Jitterbit Sentiment Analysis Agent

Overview

Jitterbit provides the Sentiment Analysis Agent to customers through Jitterbit Marketplace. This agent uses AI to evaluate the sentiment of customer support cases, helping organizations understand customer satisfaction trends and identify cases that need attention.

Sentiment analysis is a natural language processing (NLP) technique that determines whether text expresses a positive, negative, or neutral attitude. The agent applies this technique to Salesforce cases and their comments, providing insights such as starting sentiment when a case is opened, ending sentiment after interactions occur, and a suggested resolution status.

The agent integrates with Azure OpenAI to analyze case text and classify the sentiment. The agent performs the following tasks:

  • Connects to Salesforce to retrieve case and comment data using Jitterbit Studio.
  • Sends case content to Azure OpenAI for sentiment analysis.
  • Stores the analysis results in either Jitterbit Cloud Datastore or Jitterbit App Builder.
  • Provides a custom API through Jitterbit API Manager to query sentiment data by case number or account name from Cloud Datastore.

This document explains how to set up and operate this AI agent. It covers architecture and prerequisites, example API queries that show what the agent can do, and steps to install, configure, and operate the AI agent.

AI agent architecture

This AI agent analyzes the sentiment of Salesforce support cases. A typical workflow follows these steps:

  1. The agent runs on a schedule or manually and queries Salesforce for cases that were modified since the last run.
  2. For each case, the agent extracts the case number, subject, description, comments, and related case details. The agent then sends this content to Azure OpenAI.
  3. Azure OpenAI analyzes the text and returns sentiment classifications. These classifications include starting sentiment, ending sentiment, suggested resolution status, and an explanation.
  4. The agent stores the analysis results in Cloud Datastore or App Builder.
  5. Users can query sentiment data through a custom API by case number or account name (Cloud Datastore only), or create a custom application in App Builder to visualize the sentiment data that is stored in tables.

Workflow diagrams

The following diagrams depict the two main workflows in this integration.

Sentiment analysis

The agent runs on a schedule or manually to analyze Salesforce cases:

--- config: flowchart: padding: 20 nodeSpacing: 100 --- flowchart LR classDef default fill:white, stroke:black, stroke-width:3px, rx:15px, ry:15px JSP@{ shape: hex, label: "
Jitterbit Sentiment
Analysis Agent" } SF[fab:fa-salesforce
Salesforce] AZR[Azure OpenAI REST call] AZM@{ shape: hex, label: "Azure OpenAI model" } STR@{ shape: hex, label: "fas:fa-database
Cloud Datastore
or App Builder" } SF -->|1. Query cases| JSP JSP -->|2. Case content| AZR AZR --> AZM AZM --> AZR AZR -->|3. Sentiment analysis| JSP JSP -->|4. Store results| STR

API query

Users query sentiment data from Cloud Datastore through the custom API:

--- config: flowchart: padding: 20 nodeSpacing: 100 --- flowchart LR classDef default fill:white, stroke:black, stroke-width:3px, rx:15px, ry:15px JSP@{ shape: hex, label: "
Jitterbit Sentiment
Analysis Agent" } STR@{ shape: hex, label: "fas:fa-database
Cloud Datastore" } JCA@{ shape: hex, label: "
Jitterbit API Manager
custom API" } API[fas:fa-code
API client] API -->|1. Query sentiment| JCA JCA -->|2. Trigger request handler| JSP JSP -->|3. Fetch results| STR STR -->|4. Return data| JSP JSP -->|5. Sentiment response| API

Prerequisites

You need the following components to use this AI agent.

Harmony components

You must have a Jitterbit Harmony license with access to the following components:

Supported endpoints

The AI agent incorporates the following endpoints. You can accommodate other systems by modifying the project's endpoint configurations and workflows.

Large language model (LLM)

The AI agent uses Azure OpenAI as the LLM provider for sentiment analysis. To use Azure OpenAI, you must have a Microsoft Azure subscription with permissions to create an Azure OpenAI resource with a deployed gpt-4o model.

Tip

For pricing information, see the Azure OpenAI pricing page.

Data source

The AI agent uses Salesforce as the source for customer case data.

Example API queries

The following table shows example API requests that you can use to query sentiment analysis results from Cloud Datastore. These API queries are only applicable when you use Cloud Datastore for storage. If you use App Builder for storage, you create a custom application within App Builder to visualize and interact with the sentiment data.

Query type Example request body Description
By case number {
  "currentPage": 1,
  "itemsPerPage": 4,
  "field": "Key",
  "value": "00001137"
}
Queries sentiment analysis results for a specific case number. This example uses the case number (Key) 00001137.
By account name {
  "currentPage": 1,
  "itemsPerPage": 4,
  "field": "AlternativeKey",
  "value": "Acme Corporation"
}
Queries sentiment analysis results for all cases that are associated with a specific account name. This example uses the account name (AlternativeKey) Acme Corporation.
By customer name {
  "currentPage": 1,
  "itemsPerPage": 5,
  "customerName": "Edge Communications"
}
Queries sentiment analysis results for all cases that are associated with a specific customer name. This example uses the customer name (customerName) Edge Communications.

Installation, configuration, and operation

Follow these steps to install, configure, and operate this AI agent:

  1. Install the project.
  2. Review project workflows.
  3. Create Microsoft Azure resources.
  4. Prepare Jitterbit Cloud Datastore.
  5. Configure project variables.
  6. Test connections.
  7. Deploy the project.
  8. Create the Jitterbit custom API.
  9. Trigger the project workflows.
  10. Troubleshooting.

Install the project

Follow these steps to install the Studio project:

  1. Log in to the Harmony portal at https://login.jitterbit.com and open Marketplace.

  2. Locate the AI agent named Jitterbit Sentiment Analysis Agent. To locate the agent, you can use the search bar or, in the Filters pane under Type, select AI Agent to filter the display.

  3. Click the AI agent's Documentation link to open its documentation in a separate tab. Keep the tab open to refer back to after starting the project.

  4. Click Start Project to open a configuration dialog to import the AI agent as a Studio project.

    Note

    If you have not yet purchased the AI agent, Get this agent is displayed instead. Click it to open an informational dialog, then click Submit to have a representative contact you about purchasing the AI agent.

    Tip

    The configuration dialog includes a warning not to import the template before applying endpoint customizations. This warning does not apply to this AI agent. You can ignore it and follow the recommended order of steps in this documentation.

  5. Click Next.

  6. In configuration step 2, Create a New Project, select an environment where you want to create the Studio project, then click Create Project.

  7. A progress dialog is displayed. After it indicates that the project is created, use the dialog link Go to Studio or open the project directly from the Studio Projects page.

Review project workflows

In the open Studio project, review the workflows and descriptions in the following table to understand what each workflow does.

Workflow name Trigger type Description
Tool - Get Salesforce Cases Manual or scheduled Retrieves cases and comments from Salesforce and sends them for sentiment analysis.
Main - AI Agent Tools Logic Called by other workflows Sends case content to Azure OpenAI for sentiment analysis and processes the response.
Utility - Store to App Builder Called by other workflows Stores sentiment analysis results in App Builder. Use this workflow if you choose App Builder for storage.
Utility - Store and Query to Cloud Datastore Called by other workflows Stores and queries sentiment analysis results in Cloud Datastore. Use this workflow if you choose Cloud Datastore for storage.
Main Entry - Datastore API Request Handler API Handles API requests to query sentiment by case number or account name from Cloud Datastore.
Main Entry - Query Customer API Request Handler API Handles API requests to query sentiment by customer name from Cloud Datastore. This workflow provides an alternative query method for Cloud Datastore data.

Tool - Get Salesforce Cases

This workflow automates case and comment processing by extracting details from Salesforce (based on LastModifiedDate) and sending them for sentiment analysis. The workflow stores results in your chosen storage destination (Cloud Datastore or App Builder).

You must run this workflow first to load all case data and generate sentiment analysis. For more information about running the workflow, see Trigger the project workflows.

Note

If your organization's case data is in a system other than Salesforce, you must modify the workflow's operations to replace Salesforce-specific components with components for your endpoint.

Main - AI Agent Tools Logic

This workflow processes individual cases received from the Tool - Get Salesforce Cases workflow. It sends the case content (including subject, description, and comments) to Azure OpenAI, which analyzes the text and returns sentiment classifications such as Positive, Negative, or Neutral. The workflow then calls the appropriate utility workflow to store the analysis results.

In the configuration of the Salesforce Query activity, the following query retrieves case and comment information. If your Salesforce organization does not use these objects and fields, or if case and comment information is stored in different objects or fields, you must customize the query to align with your Salesforce organization's data model:

SELECT  Account.Id,
        Account.Name,
        CreatedBy.Email,
        CreatedBy.Name,
        LastModifiedBy.Email,
        LastModifiedBy.Name,
        Owner.Email,
        Owner.Name,
        (SELECT CreatedBy.Email,
                CreatedBy.Name,
                Id,
                CommentBody,
                CreatedDate,
                LastModifiedDate,
                LastModifiedBy.Email,
                LastModifiedBy.Name
         FROM CaseComments),
        Id,
        CaseNumber,
        Comments,
        CreatedDate,
        Description,
        LastModifiedDate,
        Origin,
        Priority,
        Reason,
        Status,
        Subject,
        Type
FROM    Case
WHERE   LastModifiedDate > [Last_Modified_Date_Variable]
        AND AccountId != null

Note

This example query includes standard Salesforce Case and Account fields. You may need to add custom fields specific to your organization or modify the WHERE clause to filter cases based on your business requirements (such as case queues, status values, or record types).

Utility - Store to App Builder

This workflow stores sentiment analysis results for each case in App Builder. Use this workflow if you want to build a custom application for viewing and interacting with the sentiment data. App Builder provides both data storage and application development capabilities for creating interactive dashboards and reports. When you use App Builder for storage, you create a custom application within App Builder to query and visualize the data rather than using the API.

Utility - Store and Query to Cloud Datastore

This workflow stores and queries sentiment analysis results for each case in Cloud Datastore. Use this workflow if you want to access the sentiment data programmatically through the API without building a custom application. Cloud Datastore provides backend storage that you can query through API requests.

Main Entry - Datastore API Request Handler

This workflow manages incoming API requests from users who want to query sentiment analysis by case number or account name from Cloud Datastore. A Jitterbit custom API triggers the workflow each time a user interacts with the API. For configuration information, see Create the Jitterbit custom API.

Note

This API handler only works with Cloud Datastore. If you use App Builder for storage, you create a custom application within App Builder to access the data.

Main Entry - Query Customer API Request Handler

This workflow manages incoming API requests from users who want to query sentiment analysis by customer name from Cloud Datastore. This workflow provides an alternative query method for accessing Cloud Datastore data. A Jitterbit custom API triggers the workflow each time a user interacts with the API. For configuration information, see Create the Jitterbit custom API.

Note

This API handler only works with Cloud Datastore. If you use App Builder for storage, you create a custom application within App Builder to access the data.

Create Microsoft Azure resources

Create the following Microsoft Azure resources and retain the information for configuring the AI agent. To create and manage these resources, you must have a Microsoft Azure subscription with the appropriate permissions.

Azure OpenAI resource

You must create an Azure OpenAI resource and deploy a gpt-4o model through the Azure AI Foundry portal.

You need the deployment name, Azure OpenAI endpoint URL, and API key to configure the Azure OpenAI project variables. To find these values, follow these steps:

  1. In the Azure AI Foundry portal, open the specific OpenAI resource.

  2. On the landing page for the resource, find the values for the endpoint URL (azure_openai_base_url) and API key (azure_openai_api_key).

  3. In the navigation menu under Shared resources, select Deployments. The deployment name (azure_deployment_id) appears in the list.

Prepare Jitterbit Cloud Datastore

Skip this section if you are using App Builder for storage.

If you are using Cloud Datastore, create a key storage named Sentiment_Analysis. Configure the fields with the names and types that are listed in the following table.

Note

If you use a name other than Sentiment_Analysis for the key storage, you must update all Cloud Datastore activities to reference that key storage.

As you add custom fields, use the table to determine whether to toggle each field to Required in the Cloud Datastore user interface. The AlternativeKey and Value fields are default fields that you cannot remove or toggle.

You can leave blank the values of fields that auto-populate or that the agent does not use.

Sentiment analysis storage (Sentiment_Analysis)

This key storage stores AI-generated sentiment analysis results for each Salesforce case. The sentiment values indicate whether the case communications are positive, negative, or neutral. The agent automatically populates this data when it runs.

Name Type Required Value definition Description
Key Text Yes Auto-populated The unique identifier that is assigned to a Salesforce case (case number).
AlternativeKey Text Yes Auto-populated The unique identifier that is assigned to a Salesforce account (ID).
Value Text No Auto-populated The link to open the Salesforce case.
StartingSentiment Text Yes Auto-populated The sentiment that is detected in the initial case content (for example, Positive, Negative, or Neutral).
endingSentiment Text Yes Auto-populated The sentiment that is detected after all case communications and actions are considered.
suggestedStatus Text Yes Auto-populated The AI-recommended status: Resolved or Unresolved.
explanation BigText No Auto-populated The AI-generated explanation of why the sentiment received its classification.
AccountName Text Yes Auto-populated The account name for this case.
BusinessSegment Text Yes Auto-populated The business segment name for this case.
Territory Text Yes Auto-populated The territory name for this case.

Configure project variables

In the Studio project, you must set values for the following project variables.

To configure project variables, use the project's actions menu to select Project Variables. This action opens a drawer along the bottom of the page where you can review and set the values.

Cloud Datastore

Configure this variable only if you are using Cloud Datastore for storage.

Variable name Description
Cloud_Datastore_Access_Token The Cloud Datastore access token that you use for authentication.

Common

Variable name Description
html_regex The regular expression pattern used to replace special characters.

Azure OpenAI

Variable name Description
azure_openai_top_p Controls how much of the probability mass the model considers when it generates text. Low values (0.1–0.3) produce focused output, while high values (0.9–1.0) produce more diverse output. Set to 0.95.
azure_openai_temperature Controls the randomness of model output. Lower values (0.0–0.3) make responses more focused and deterministic, while higher values (0.8–1.0) increase creativity and diversity. Set to 0.2 for deterministic answers.
azure_deployment_id The name of the Azure OpenAI deployment that you use to access the model. Set to gpt-4o.
azure_openai_base_url The base URL for accessing the Azure OpenAI service. Example: https://<your-resource-name>.openai.azure.com.
azure_openai_api_key The API key that you use to authenticate requests to the Azure OpenAI service.
ai_prompt The input text or instruction provided to the AI model that guides how it generates a response. Example: "You are an AI assistant that helps users find accurate and relevant information."
ai_sentiment_value_ranges The possible sentiment values that the AI can assign to cases. You can customize these based on your requirements. Default values are Positive, Very Positive, Neutral, Negative, and Very Negative.

Salesforce

Variable name Description
SF_User_Name The integration user name that you use to set up a connection with the Salesforce connector.
SF_Security_Token The API token that you use to set up a connection with the Salesforce connector.
SF_Password The integration user password that you use to set up a connection with the Salesforce connector.
SF_Org_Base_URL The URL used to build the Salesforce case URL. When you click this link, it redirects to the case information in Salesforce.
SF_Login_URL The URL used to log in to Salesforce. Usually https://login.salesforce.com.
SF_Last_Modified_Date The starting date used when retrieving cases the first time the integration runs.
SF_Case_Queue_Filter The case queues to include when retrieving data. If this filter is not relevant, you can remove it based on your requirements.

App Builder

Configure these variables only if you are using App Builder for storage.

For detailed instructions on configuring API keys and REST API endpoints, see Publish App Builder app as a REST API endpoint.

Variable name Description
app_builder_base_url The base URL of your App Builder instance. This URL serves as the host for all REST API calls. Example: https://development.appbuilder.example.com.
app_builder_api_key The REST API authentication key. This key is generated in the App Builder IDE and is associated with a specific user account. See Obtain an API key below.
app_builder_endpoint_url The API endpoint path that follows the base URL. This path includes the REST API version, application endpoint, and resource name. Example: rest/v1/SentimentEndpoint/sentimentanalysis. See Find your endpoint URL below.
Obtain an API key

To obtain an API key for the app_builder_api_key variable:

  1. Create an API Key security provider in IDE > Security Providers.
  2. Assign the API key to a user in IDE > User Management.
Find your endpoint URL

To find the correct value for the app_builder_endpoint_url variable:

  1. Navigate to IDE > REST APIs.
  2. Locate your application in the Application panel. The endpoint name is displayed in the Endpoint column.
  3. In the Business Objects panel, find the table that is published as a REST resource. The resource name is displayed in the Name column.
  4. Construct the endpoint URL using this format: rest/v1/{ApplicationEndpoint}/{ResourceName}.

Test connections

Test the endpoint configurations to verify connectivity using the defined project variable values.

To test connections, go to the design component palette's Project endpoints and connectors tab, hover over each endpoint, and click Test.

Deploy the project

Deploy the Studio project.

To deploy the project, use the project's actions menu to select Deploy.

Create the Jitterbit custom API

Create a custom API using API Manager for the operations in the Main Entry - Datastore API Request Handler and Main Entry - Query Customer API Request Handler workflows.

This custom Jitterbit API triggers two operations that query Cloud Datastore. You need to create two services for this custom API.

Note

These API services only work with Cloud Datastore. If you use App Builder for storage, you create a custom application within App Builder to access the data instead of using these API services.

Configure and publish the custom API with the following settings for the first service:

Setting Value
Service name datastoreApiRequestHandler
Operation Datastore API Request Handler
Path /datastoreApiRequestHandler
Method POST
Response Type System Variable

Configure and publish the custom API with the following settings for the second service:

Setting Value
Service name customerApiRequestHandler
Operation Customer API Request Handler
Path /customerApiRequestHandler
Method POST
Response Type System Variable

After you configure each service, publish the custom API.

Save the API service URL of the published API for use when making API requests. To find the service URL, go to the API details drawer on the Services tab, hover over the service's Actions column, and click Copy API service URL.

Tip

You can also add a security profile for authentication.

Trigger the project workflows

For the initial data load, run the operation in the first workflow, Tool - Get Salesforce Cases. To run the operation, hover over the operation and select the Run option. Run the operation again in the future when your data is updated.

Tip

You can schedule this operation to get updated data on a regular basis. To set up a schedule, open the operation's actions menu and select Settings > Schedules.

The following workflows are triggered by the Jitterbit custom APIs and only work with Cloud Datastore:

  • Main Entry - Datastore API Request Handler: This workflow is triggered by API requests (with authentication) and queries by Key (case number) or AlternativeKey (account name).
  • Main Entry - Query Customer API Request Handler: This workflow is triggered by API requests (with authentication) and queries by customerName (customer name). This workflow provides an alternative query method for Cloud Datastore data.

All other workflows are triggered by other operations and run downstream of the workflows that are listed above. These workflows are not intended to run independently.

Troubleshooting

If you encounter issues, review the following logs for detailed troubleshooting information:

For additional assistance, contact Jitterbit support.