Skip to Content

Jitterbit Sales Quote Agent

Overview

Jitterbit provides the Sales Quote Agent to customers through Jitterbit Marketplace. This agent uses the Retrieval-Augmented Generation (RAG) technique, which combines large language model (LLM) reasoning with access to external tools and data sources. This agent orchestrates the end-to-end quote creation process in Salesforce through a conversational interface, applying business logic such as uplift percentages, proration, rounding, and multi-year renewal sequencing, and ensuring compliance with historical contract terms. This allows Sales Ops, Customer Success, and Account Executive users to generate quotes without manual data entry.

The agent receives natural language requests through Slack and uses an LLM to determine user intent and select the appropriate tool for each step of the quoting process. Based on each request, the agent looks up Salesforce accounts and opportunities, retrieves available quote types, price books, and products, and creates the quote and its line items in Salesforce. Once all line items are added, the agent asks the user to review and confirm before generating the final quote PDF through an Apex REST endpoint provided by an installed Salesforce managed package. The agent maintains conversation and session history in Jitterbit Cloud Datastore to provide contextually aware responses across a session.

The agent performs the following tasks:

  • Receives natural language requests from users through Slack.
  • Uses an LLM to determine user intent and route each request to the appropriate tool.
  • Looks up Salesforce accounts and their associated opportunities.
  • Retrieves available Salesforce quote types, price books, and products for the user to select from.
  • Creates a quote and its associated quote line items in Salesforce, applying uplift percentages, proration, rounding, and multi-year renewal calculations, and ensuring compliance with historical contract terms.
  • Asks the user to review and confirm before generating the quote PDF.
  • Generates the quote PDF by calling an Apex REST endpoint provided by an installed Salesforce managed package.
  • Stores conversation and session history in Cloud Datastore to maintain context across messages.

This document explains how to set up and operate this AI agent. It covers architecture and prerequisites, guidance on prompting the agent, and steps to install, configure, and operate the AI agent.

AI agent architecture

This AI agent orchestrates Salesforce quote creation through a conversational Slack interface. A typical interaction follows these steps:

  1. A user sends a natural language message to the Sales Quote Agent through Slack.
  2. The agent retrieves conversation and session history from Cloud Datastore to maintain context, then calls the LLM with a set of available tools to determine user intent.
  3. Based on the selected tool, the agent queries Salesforce to look up the account, its opportunities, available quote types, price books, or products, and returns the results to the LLM for the user to review in Slack.
  4. Once the user selects a quote type, price book, and products, the agent creates the quote and quote line items in Salesforce, applying any requested uplift percentage and multi-year renewal logic.
  5. The agent asks the user to review and confirm before generating the quote PDF.
  6. Upon confirmation, the agent calls the Apex REST endpoint provided by the installed Salesforce managed package to generate the quote PDF.
  7. The agent posts the response back to the user in Slack, and conversation and session history is saved to Cloud Datastore for use in subsequent messages.

Workflow diagram

The following diagram shows the main request-handling workflow for the Sales Quote Agent.

--- config: themeVariables: lineColor: '#6b7280' edgeLabelBackground: '#f5f5f5' flowchart: padding: 20 nodeSpacing: 80 --- flowchart LR classDef default fill:white, stroke:black, stroke-width:3px, rx:15px, ry:15px JSP@{ shape: hex, label: "
Jitterbit
Sales Quote Agent" } SLK[fab:fa-slack
Slack] SF[fab:fa-salesforce
Salesforce] AZR[Azure OpenAI REST call] AZM@{ shape: hex, label: "Azure OpenAI model" } CD@{ shape: hex, label: "fas:fa-database
Cloud Datastore" } SLK -->|1. User request| JSP JSP <-->|2. Session history| CD JSP -->|3. Conversation and prompt| AZR AZR --> AZM AZM --> AZR AZR -->|4. Intent and tool selection| JSP JSP <-->|5. Account, opportunity, quote, and product data| SF JSP <-->|6. Quote PDF generation| SF JSP -->|7. Response| SLK

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 connects to 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. To use Azure OpenAI, you must have a Microsoft Azure subscription with permissions to create an Azure OpenAI resource with a deployed model.

CRM system

The agent looks up accounts, opportunities, quote types, price books, and products, and creates quotes and quote line items in Salesforce. To use Salesforce, you must have a Salesforce account configured for 2-legged OAuth 2.0 with permissions to read and write quote, quote line item, opportunity, and account records.

The agent also requires the Quotes feature to be enabled in the Salesforce org (Setup > Quote Settings > Enable Quotes) and the Standard Quote API managed package installed to generate quote PDFs. For installation instructions, see Install the Salesforce managed package.

Messaging platform

The agent uses Slack as its conversational interface. To use Slack, you must have a Slack workspace with a configured Slack app to receive and respond to messages. For detailed instructions on creating a Slack app, see Create a Slack app.

Cloud Datastore

The agent uses Cloud Datastore to maintain authorized Slack user records and conversation and session history across two key storages (see Configure Cloud Datastore). Cloud Datastore is part of the Jitterbit Harmony platform and does not require a separate service account, but the number of key storages available depends on your organization's purchased Cloud Datastore tier.

Agent prompts

The Sales Quote Agent receives all requests as natural language messages, primarily sent through the Slack app. This section describes the rules for effective prompts and provides example prompts.

Prompt guidelines

Follow these guidelines when sending messages to the agent:

  • Include the Salesforce account name in your initial prompt. The agent uses this to look up the account and its opportunities in Salesforce.
  • To apply an uplift percentage, include the percentage in your prompt (for example, with a 5% uplift).
  • To create a multi-year renewal quote, specify the number of years in your prompt. The agent applies proration and multi-year sequencing logic based on historical contract terms.
  • After the initial prompt, the agent guides you through selecting a quote type, price book, and products before creating the quote.
  • Review and confirm the quote details when asked before the agent generates the quote PDF.

Example prompts

The following example prompts show the types of prompts the agent can handle. Replace {Account Name} with the name of the Salesforce account.

Quote generation

Use these prompts to start generating a sales quote for an account:

Prompts

  • Generate quote for {Account Name}
  • Create quote for {Account Name} with a 5% uplift
  • Create a 3-year renewal quote for {Account Name} with a 5% uplift

Installation, configuration, and operation

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

  1. Download and install the project
  2. Create Microsoft Azure resources
  3. Create the Slack app
  4. Install the Salesforce managed package
  5. Configure Cloud Datastore
  6. Configure project variables
  7. Test connections
  8. Deploy the project
  9. Create the Jitterbit custom API
  10. Review project workflows
  11. Trigger the project workflows

For troubleshooting guidance, see Troubleshooting.

Download and install the project

Follow these steps to install the Studio project for the AI agent:

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

  2. Locate the AI agent named Jitterbit Sales Quote Agent. To locate the agent, use the search bar or, in the Filters pane under Type, select AI Agent to limit the display to AI agents.

  3. Click the 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 two-step configuration dialog.

    Note

    If you have not yet purchased the AI agent, Get 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.

  5. In configuration step 1, Download Customizations, download the provided Slack app manifest file. You will use this file when creating the Slack app.

  6. Click Next.

  7. In configuration step 2, Create a New Project, select an environment where the Studio project will be created, then click Create Project.

  8. After the progress dialog indicates the project is created, use the dialog link Go to Studio or open the project directly from the Studio Projects page.

Create Microsoft Azure resources

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

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

Note the deployment name, endpoint URL, and API key. Enter these values when you configure project variables.

To find these values, follow these steps:

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

  2. On the resource landing page, copy the endpoint URL (for the azure_openai_base_url project variable) and API key (for the azure_openai_api_key project variable).

  3. In the navigation menu under Shared resources, select Deployments. Copy the deployment name (for the Azure_OpenAI_Deployment_Name project variable).

Create the Slack app

To enable the agent's Slack interface, follow these steps:

  1. Create a Slack app using the manifest file downloaded in Download and install the project. The manifest pre-configures the bot user, OAuth scopes, and event subscriptions for the Sales Quote Agent. Install the app to your Slack workspace.

  2. Obtain the bot token and retain it for the bot_oauth_user_token project variable.

Install the Salesforce managed package

The agent generates quote PDFs using an Apex REST class provided by the Standard Quote API unlocked Salesforce managed package. Install this package in your Salesforce org before deploying the project.

Before installing the package, enable the Quotes feature in your Salesforce org by going to Setup > Quote Settings and enabling quotes. Installation fails if this feature is not enabled.

To install the package, use one of the following methods:

After installation, note the template IDs for your quote PDF templates. You enter these when reviewing the Tool - Generate Quote Pdf workflow.

Configure Cloud Datastore

The agent uses two Cloud Datastore key storages to manage authorized users and conversation and session history:

Key storage Purpose
Bot Authorized Users Maintains authorized Slack user records.
Quoting Q and A Maintains conversation and session history, including quote-in-progress data, for each Slack user.

For each key storage, follow these steps:

  1. Create the key storage with the name and custom fields specified below.
  2. In the Studio project's Components tab under Endpoints, locate each Cloud Datastore activity associated with that storage. Activities aren't prefixed with the storage name; instead, identify them by function: activities such as Query All Users, Create User Session, and Update User Session use the Bot Authorized Users storage, and activities such as Insert QA, Query Conversation History By Session Id, and Delete Old Conversation History of User use the Quoting Q and A storage. Double-click each activity to open it, assign the storage name, and save.

Bot Authorized Users

Create a key storage named Bot Authorized Users. The Key, AlternativeKey, and Value fields are present by default. No custom fields are required.

Field name Type Description
Key Text Enter manually. The email address of the user authorized to interact with the agent via the Slack bot.
AlternativeKey Text Auto-populated. The session for the user, generated during execution.
Value Text Enter manually. The email address of the user authorized to interact with the agent via the Slack bot.

Quoting Q and A

Create a key storage named Quoting Q and A. The Key, AlternativeKey, and Value fields are present by default. Add the following custom fields:

Field name Type Description
Key Text Auto-populated. The unique identifier assigned to a message.
AlternativeKey Text Auto-populated. The unique identifier assigned to a chat session.
Value Text Not used.
slackChannel Text Auto-populated. The Slack channel ID from which the message is sent.
User Text Auto-populated. The Slack username of the user who sends the message.
Email Text Auto-populated. The email address of the user who sends the message.
FirstName Text Auto-populated. The first name of the user who sends the message.
LastName Text Auto-populated. The last name of the user who sends the message.
UserQuestion Big Text Auto-populated. The question or message submitted by the user to the agent.
AIAnswer Big Text Auto-populated. The response generated by the agent to the user's question.
ai_reformulate_question Big Text Auto-populated. The user's question after being reformulated or rephrased by the AI to improve understanding.
MessageTimestampText Text Auto-populated. The timestamp text of the message.

Configure project variables

In the Studio project installed from Marketplace, set values for the following project variables.

To configure project variables, use the project's actions menu and select Project Variables to open the configuration drawer.

Salesforce

Variable name Description
SF_Base_URL Base URL for the Salesforce instance.
SF_Client_ID Client ID from your Salesforce connection's 2-legged OAuth 2.0 configuration.
SF_Client_Secret Client secret from your Salesforce connection's 2-legged OAuth 2.0 configuration.

Azure OpenAI

Variable name Description
Azure_OpenAI_Deployment_Name Deployment name of the Azure OpenAI model to use.
azure_openai_base_url Endpoint URL for the Azure OpenAI resource.
azure_openai_api_key API key used to authenticate requests to the Azure OpenAI service.
Max_Output_Tokens Maximum number of tokens the LLM can return in a single response.

Cloud Datastore

Variable name Description
Cloud_Datastore_Access_Token Cloud Datastore authentication token, obtained from the Management Console Access Tokens page.

Slack

Variable name Description
bot_oauth_user_token The Slack bot token obtained after creating the Slack app, used for the Slack connection's Bot User OAuth Token field.

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 and select Deploy.

Create the Jitterbit custom API

Create a custom API with the following services.

For the Slack request handler, use these settings:

Setting Value
Service name slackBotRequest
Operation Slack Bot Request
Path /
Method POST
Response Type System Variable

For the generic request handler, used by other client applications such as embeddable widgets, use these settings:

Setting Value
Service name genericApiRequestHandler
Operation Generic API Request Handler
Path /agentembedding
Method POST
Response Type System Variable

After configuring the services, publish the custom API. In your Slack app's configuration, use the resulting API service URL for the / path as the request URL for events and slash commands.

Review project workflows

The Studio project contains 12 workflows that implement the Sales Quote Agent functionality, organized into three functional groups.

Entry point and routing

Workflow Description
Main Entry - Slack API Request Handler Receives incoming Slack messages, maintains authorized user records, and routes requests to the tools logic workflow.
Main - Generic API Request Handler Receives requests from other client applications, such as embeddable widgets, and routes them to the tools logic workflow.
Main - AI Agent Tools Logic Analyzes each request using the LLM to identify the intended function and invokes the appropriate tool workflow.
Main Entry - Slack API Request Handler

This workflow is triggered by the Jitterbit custom API each time a user sends a message to the Slack bot. It manages incoming Slack bot requests and maintains authorized user records in the Bot Authorized Users Cloud Datastore key storage, and queries the Quoting Q and A key storage for conversation history. After collecting this information, it passes the request to the Main - AI Agent Tools Logic workflow.

Main - Generic API Request Handler

This workflow is triggered by the Jitterbit custom API when a request comes from a client other than Slack, such as an embeddable chat widget. It supports a reset-context command that clears the caller's conversation history, and otherwise passes the request to the Main - AI Agent Tools Logic workflow using the same conversation-history and user-lookup logic as the Slack entry point.

Main - AI Agent Tools Logic

This workflow receives the incoming request from the Main Entry - Slack API Request Handler or Main - Generic API Request Handler workflow, analyzes it using the LLM to identify the intended function, and prepares a payload to invoke the appropriate agent tool workflow. This workflow also manages all LLM requests and captures LLM responses for downstream use.

Salesforce quote tools

Workflow Description
Tool - Get SalesForce Account Details Looks up account details for the account name provided in the Slack prompt.
Tool - Get SalesForce Opportunities Fetches all opportunities associated with the account.
Tool - Get Quote Types Fetches available Salesforce quote record types for the user to select from.
Tool - Generate Quote Creates a quote in Salesforce after all required information is collected.
Tool - Get PriceBook List Fetches the list of available price books from Salesforce.
Tool - Get PricebookProductList Fetches the product list for the price book selected by the user.
Tool - Insert Quote LineItems Creates quote line items in Salesforce, including multi-year line item calculations.
Tool - Generate Quote Pdf Calls an Apex REST endpoint to generate the quote PDF after user confirmation.
Tool - Get SalesForce Account Details

This workflow looks up the account name provided by the user in the Slack prompt and returns the account information to the LLM for further processing and response to the user in Slack.

Tool - Get SalesForce Opportunities

This workflow fetches all opportunities associated with the account provided by the user and returns the list to the LLM for further processing and response to the user in Slack.

Tool - Get Quote Types

This workflow runs a query on the Salesforce RecordType object and fetches all records of type Quote. This list is sent to the user to select an appropriate record type for the quote.

Tool - Generate Quote

After the LLM collects all required information for a quote, such as name, dates, and uplift percentage, this workflow creates a quote in Salesforce.

Tool - Get PriceBook List

Once a quote is created, product details must be added as quote line items. This workflow fetches the list of available price books from Salesforce and provides the list to the LLM to share with the user for selection.

Tool - Get PricebookProductList

This workflow fetches the product list from the price book selected by the user and returns the list to the LLM to share with the user. The user then selects the products to add to the quote.

Tool - Insert Quote LineItems

Once the user selects and shares the list of products, the LLM performs calculations to prepare line items for multi-year scenarios if needed. The multi-year line items are then provided as input to this workflow to generate the quote line items in Salesforce.

Tool - Generate Quote Pdf

Once quote line items are created, the LLM asks the user to review and confirm PDF generation for the quote. Upon confirmation, this workflow calls a Salesforce REST API endpoint that triggers an Apex script to generate the quote PDF.

This workflow runs the Set_templateID script to set template IDs from Salesforce, then selects the appropriate PDF template ID in the Main -Generate Quote Pdf script based on the quote's product line (whether the quote type is an eBridge or a standard Jitterbit quote), whether a subscription start date is present, and whether the initial term is greater than or less than 12 months. Set the template IDs obtained when you installed the Salesforce managed package in the Set_templateID script, and adjust the selection logic in the Main -Generate Quote Pdf script as needed for your organization's quote templates.

Utilities

Workflow Description
Utility - Bot Chat Cloud Datastore Contains all Cloud Datastore operations used in the project, including querying and updating records.
Utility - Bot Chat Cloud Datastore

This workflow is a collection of all Cloud Datastore operations used in the project, including querying and updating records in the Bot Authorized Users and Quoting Q and A key storages.

Trigger the project workflows

The Sales Quote Agent is triggered by incoming messages from the Slack app connected to the Main Entry - Slack API Request Handler workflow. You don't need to manually run an operation to start the agent; the Slack app handles triggering automatically when users send messages.

Troubleshooting

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

For additional assistance, contact Jitterbit support.