Working with Salesforce Within Kognitos

This manual is divided into several sections, each focusing on a specific aspect of the Salesforce-Kognitos integration.


The integration of Salesforce with Kognitos offers a powerful and intuitive way to interact with Salesforce data and functionalities. This integration enables users to perform a wide range of operations on Salesforce objects, including querying, creating, updating, and deleting records, managing files, and automating processes, all through the use of Kognitos’ natural language processing capabilities. This section provides an overview of the Salesforce-Kognitos integration and outlines the prerequisites for using Salesforce on Kognitos.

Prerequisites for Using Kognitos with Salesforce

Before you can start using Kognitos to interact with Salesforce, there are several prerequisites that need to be met:

  1. Salesforce Account: You need to have an active Salesforce account. If you do not have one, you can sign up for a Salesforce trial account to get started.
  2. API Access: Ensure that your Salesforce account has API access enabled. API access is required for Kognitos to communicate with Salesforce.

Editions with API Access 
• Enterprise Edition
• Unlimited Edition
• Developer Edition
• Performance Edition

Editions without API Access 
• Group Edition
• Essentials Edition
• Professional Edition (can be purchased as an add-on)

  1. Security Token: Obtain your Salesforce security token, which is used in conjunction with your password to access Salesforce via the API securely. You can find this in your Salesforce settings under "My Personal Information" > "Reset My Security Token".
    You may need to contact your company’s IT support for the security tokens.
  2. Basic Understanding of Salesforce Objects: While Kognitos simplifies interactions, having a basic understanding of Salesforce objects (e.g., Account, Contact, Opportunity) and their relationships will help you automate more effectively with Kognitos.

Once these prerequisites are met, you are ready to start leveraging the power of Kognitos to enhance your Salesforce experience, making it more accessible, efficient, and customizable.

Setting Up Salesforce Connection

To interact with Salesforce using Kognitos to establish a secure connection to your Salesforce instance is the first critical step. This section outlines the credentials required for this connection and provides a detailed, step-by-step guide to connect successfully.

Required Credentials

To connect to Salesforce, you will need the following credentials:

  1. Salesforce Instance URL: The base URL of your Salesforce instance. This URL is unique to your organization and can be found in the address bar when you are logged into Salesforce. It typically follows the format https://<your_instance>
  2. Username: The email address or username associated with your Salesforce account.
  3. Password: The password for your Salesforce account.
  4. Security Token: A security token is an automatically generated key from Salesforce that adds an extra layer of security on top of your password. If you're accessing Salesforce from an untrusted network, you'll need this token. You can obtain your security token by navigating to your Salesforce settings and requesting a new token. Salesforce will email the token to the email address associated with your account.

Learning the Salesforce book (Integration)

  1. Gather Credentials: Ensure you have all the required credentials: Salesforce instance URL, username, password, and security token.
  2. Navigate to the Department tab of Kognitos and search for the Salesforce book

  1. Click on + Book button on the right of the card

  2. Add in the credentials when you are prompted

Note: In case you see Test and Production credentials separately you can add both. If you don't have two sets of credentials you can use the same credentials in both.

Successful integration: Once the book has been learnt successfully, you are ready to perform various operations on Salesforce. You can now fetch data, create new records, update existing ones, delete records, manage files, and more.

Working with Salesforce Objects

Interacting with Salesforce objects is a core functionality when integrating Salesforce with Kognitos. This section covers how to fetch data, create and modify Salesforce objects, and delete them when necessary.

Fetching Data using custom SOQL queries

To fetch data from Salesforce using custom SQL queries, see the example below.

 fetch the records from salesforce where
      the query is "SELECT Id, Email FROM Contact"

Fetching Data using direct queries

To fetch data from Salesforce using custom SQL queries, see the example below.

get salesforce\'s leads whose annual revenue is less than 1000000000

Creating and Modifying Salesforce Objects

Adding New Records

To add a new record to Salesforce, you need to specify the type of object you're creating and provide the necessary field values.


the opportunity is
    the name is "New Deal"
    the close date is "2023-12-31"
    the stage is "Prospecting"
add the opportunity in salesforce

This command creates a new opportunity named "New Deal" with a close date and stage specified.

Updating Existing Records

To update an existing Salesforce object, you must identify the object by its ID and specify the fields you want to update.


the opportunity's ID is "006xx000001Sv6aAAC"
change the opportunity's stage to "Closed Won" in salesforce

This command updates the stage of the specified opportunity to "Closed Won".

Deleting Salesforce Objects

Single Deletion

To delete a specific Salesforce object, you need to specify the object and its ID.


the salesobject's ID is "006xx000001Sv6aAAC"
delete the salesobject

This command deletes the sales object with the specified ID.

By following these guidelines, you can effectively manage Salesforce objects in Kognitos, from fetching and creating records to updating and deleting them as needed.

Managing Salesforce Reports

The ability to create, manage, and distribute Salesforce reports is crucial for analyzing business data and making informed decisions. Integrating Salesforce with Kognitos enhances the reporting process by simplifying the creation of reports, defining criteria, exporting reports, and even sending data directly from Salesforce via email. This section delves into how you can leverage Kognitos for managing Salesforce reports more efficiently.

Creating Salesforce Reports

Defining Report Criteria

Creating a report in Salesforce involves selecting the type of report, defining the criteria, and choosing the fields to display. With Kognitos, you can articulate these requirements in a more intuitive manner. For instance, you can specify the type of report you need, the records it should cover, and any specific conditions that must be met.


create a report in salesforce with
    the report name is "Quarterly Sales Summary"
    the report type is "Tabular"
    the fields are "Account Name", "Close Date", "Amount"
    the filter is "Close Date this quarter"

This command tells Kognitos to create a Salesforce report for opportunities from the last quarter, including specific fields. Kognitos translates this into the appropriate Salesforce report creation process, selecting the correct report type and applying the specified filters.

Exporting Reports to Different Formats

Once you have created a report in Salesforce, you might need to export it in various formats for analysis, presentation, or sharing purposes. Kognitos simplifies this process by allowing you to specify the desired export format directly in your command.

Exporting to CSV

export the report "Opportunities by Stage" from salesforce to CSV

This command instructs Kognitos to export the "Opportunities by Stage" report from Salesforce in CSV format. The CSV format is versatile and widely used for data manipulation and analysis in various software, including spreadsheet applications.

Exporting to PDF

export the report "Monthly Sales Performance" from salesforce to PDF

Exporting a report to PDF is particularly useful when you need a static snapshot of your data for sharing or presentation purposes. PDFs maintain formatting and are ideal for distributing reports that should not be altered, such as sales performance summaries or quarterly reviews.

Exporting to Excel

export the report "Lead Conversion Rates" from salesforce to Excel

Exporting reports to Excel allows for further data analysis and manipulation using Excel's robust set of features. Excel files can accommodate complex calculations, charts, and pivot tables, making them suitable for in-depth data analysis tasks.

Sending Data from Salesforce

Configuring Email Settings

Before you can send emails through Salesforce using Kognitos you need to ensure that your Salesforce email settings are correctly configured. Learn more here. This includes setting up email templates, defining sender profiles, and specifying email limits.

Approval Processes in Salesforce

Approval processes in Salesforce are automated sequences that an organization can use to approve records for database operations. These processes are crucial for maintaining data integrity and ensuring that changes or additions to records meet specific criteria set by the organization. The integration of Kognitos with Salesforce simplifies the interaction with these processes, making it easier for users to submit objects for approval and track their status.

Understanding Approval Processes

Approval processes in Salesforce are defined workflows that specify the steps required for a record to be approved. These processes can be applied to various Salesforce objects, such as Opportunities, Contacts, or custom objects, depending on the organization's needs. Approval processes typically involve one or more of the following components:

  • Criteria for entering the process: Defines what records are eligible for approval. For example, an opportunity might need to have a value greater than $10,000 to require approval.
  • Approval steps: The sequence of approval actions that need to be taken. This can involve multiple approvers at different stages.
  • Approval actions: Actions taken when a record is approved, rejected, or recalled, such as updating fields, sending email notifications, or executing custom logic.

Submitting Sales Objects for Approval

With Kognitos, users can submit Salesforce objects for approval using natural language commands. This simplifies the process, especially for users who may not be familiar with Salesforce's interface or approval process configurations.


submit the opportunity for approval with
    the opportunity's ID is "006xx000001Sv6aAAC"
    the comment is "Requesting approval for high-value opportunity"

In this example, an opportunity is submitted for approval by specifying its ID and providing a comment to give context to the approver. Kognitos translates this command into the appropriate Salesforce operation, automating the submission process.

File Management

Managing files within Salesforce objects is a common requirement for many business processes. Whether it's attaching contracts to accounts, downloading report attachments for analysis, or removing outdated files, efficient file management is crucial.

Attaching Files to Salesforce Objects

Attachment Process

Example: Attaching a PDF Contract to an Account

attach the file to the salesforce object with
    the file path is "/path/to/contract.pdf"
    the salesforce object's ID is "001xx000003DHP0AAO"
    the file type is "PDF"

This command specifies the file to attach (contract.pdf), identifies the Salesforce object by its ID, and indicates the file type. Kognitos handles the process of attaching the file to the specified Salesforce object.

Downloading Files from Salesforce Objects

Retrieving Attached Files

Example: Downloading a Contract Attached to an Account

download the file from the salesforce object with
    the salesforce object's ID is "001xx000003DHP0AAO"
    the file name is "contract.pdf"

This command retrieves an attached file (contract.pdf) from a specified Salesforce object. Kognitos facilitates the download process, making the file available for local use or review.

Detaching Files from Salesforce Objects

Removing Attachments

Example: Removing an Outdated Contract from an Account

detach the file from the salesforce object with
    the salesforce object's ID is "001xx000003DHP0AAO"
    the file name is "old_contract.pdf"

When a file, such as an outdated contract, needs to be removed from a Salesforce object, this command specifies the object and the file to be detached. Kognitos processes the request, removing the specified attachment from the Salesforce object.

Glossary of Terms

  • API (Application Programming Interface): A set of rules and protocols for building and interacting with software applications. Salesforce API allows external services like Kognitos to communicate with Salesforce to retrieve or modify data.
  • CRM (Customer Relationship Management): A technology for managing all your company's relationships and interactions with customers and potential customers. Salesforce is a leading CRM platform.
  • Salesforce Object: A database table in Salesforce. Common standard objects include Account, Contact, Lead, and Opportunity. Users can also create custom objects to store specific business data.
  • Salesforce Record: A single data entry within a Salesforce object. For example, a contact record in the Contact object.