import React, { useState, Fragment } from 'react';
import CommandDropdown from './index';
export default function CommandContent() {
const [selectedCommand, setSelectedCommand] = useState('');
const renderCommandContent = () => {
if (!selectedCommand) return null;
const content = {
/* ===================== Create Record - Contact ===================== */
'Create Record - Contact': (
The Create Record - Contact command allows you to create a new Contact record in Salesforce.
A Contact in Salesforce represents an individual associated with an Account (business or organization).
Once the Create Record - Contact command is successfully executed, Salesforce returns a response with a unique Contact ID.
You can use this ID to retrieve the contact details via API or search for the Contact in Salesforce → Contacts.
The Create Record - Lead command allows you to create a new Lead record in Salesforce.
A Lead in Salesforce represents a potential customer who has shown interest in your business but has not yet been qualified as a Contact or Opportunity.
Once the Create Record - Lead command is successfully executed, Salesforce returns a response with a unique Lead ID.
You can use this ID to track the lead's status or update the lead details in Salesforce → Leads.
The Create Record - Opportunity command allows you to create a new Opportunity record in Salesforce.
An Opportunity represents a potential sale or business deal, helping sales teams track revenue and pipeline progress.
Once the Create Record - Opportunity command is successfully executed, Salesforce returns a response with a unique Opportunity ID.
You can use this ID to retrieve opportunity details via API or search for the opportunity in Salesforce → Opportunities.
Create a new task record in Salesforce to track activities and follow-ups.
The Create Record - Account command allows you to create a new Account record in Salesforce.
An Account in Salesforce represents a company or organization that your business interacts with, such as a customer,
partner, or competitor.
Once the Create Record - Account command is successfully executed, Salesforce returns a response with a unique
Account ID. You can use this ID to retrieve account details via API or search for the Account in Salesforce → Accounts.
The Update Record - Contact command allows you to modify an existing Contact record in Salesforce.
A Contact in Salesforce represents an individual associated with an Account, such as a customer, partner, or employee.
To update a Contact record, you must provide the unique Record ID of the contact you want to modify.
Once the update is successful, the changes will reflect in Salesforce, and you can retrieve the updated contact details via API or through Salesforce → Contacts.
The Update Record - Lead command allows you to modify an existing Lead record in Salesforce.
A Lead in Salesforce represents a potential customer or prospect who has shown interest in your products or services
but has not yet been qualified as an opportunity.
To update a Lead record, you must provide its unique Record ID. Once the update is successfully processed,
Salesforce will reflect the changes, allowing you to track lead progress and engagement.
The Update Record - Opportunity command allows you to modify an existing Opportunity record in Salesforce.
An Opportunity represents a potential sales deal with a specific account and is used to track revenue, forecast sales,
and manage the sales pipeline.
To update an Opportunity record, you must provide its unique Record ID. Once the update is successfully processed,
Salesforce will reflect the changes, helping sales teams track progress, revenue, and deal status.
The Update Record - Task command allows you to modify an existing Task record in Salesforce.
Tasks help users track activities such as follow-ups, meetings, or any other actionable items related to Leads,
Contacts, Accounts, or Opportunities.
To update a Task, you must provide its unique Record ID. Keeping task records up to date ensures proper task
management, timely follow-ups, and efficient workflow tracking for your sales and service teams.
The Update Record - Account command allows you to modify an existing Account record in Salesforce.
Accounts represent businesses, organizations, or individuals that have a relationship with your company.
Keeping account details up to date ensures accurate tracking of business relationships, customer interactions,
and ownership assignments.
To update an Account, you must provide its unique Record ID. Regular updates help maintain clean data,
improve reporting accuracy, and streamline communication with stakeholders.
The Get Record by ID - Contact command allows you to retrieve a specific Contact record from Salesforce
using its unique Record ID. Contacts represent individuals associated with an Account, such as customers, partners, or leads.
Fetching contact details enables better customer management, personalized communication, and efficient record-keeping.
By providing the correct Record ID, you can access the full details of a Contact, including their name, email,
phone number, and related records. This ensures accurate data retrieval and helps streamline workflow automation.
The Get Record by ID - Lead command allows you to retrieve a specific Lead record from Salesforce
using its unique Record ID. Leads represent potential customers or prospects who have expressed interest in your
products or services. Accessing lead details helps streamline follow-ups, nurture relationships, and convert them into
opportunities.
By providing the correct Record ID, you can retrieve comprehensive lead information, including name, company,
contact details, and status. This ensures efficient lead tracking and enables data-driven sales strategies.
Retrieve a specific opportunity record in Salesforce using its unique identifier. Retrieve a specific task record in Salesforce using its unique identifier. Retrieve a specific account record in Salesforce using its unique identifier. Retrieve a specific record in Salesforce using its unique identifier and record type. Retrieve contact records in Salesforce by applying filters and pagination. Retrieve lead records in Salesforce by applying filters and pagination. Retrieve opportunity records in Salesforce by applying filters and pagination. Retrieve any Salesforce records by specifying type, filters, and pagination.
The Get Record by View ID - Contact command allows you to retrieve a list of Contact records from Salesforce using a specific List View ID.
A Contact in Salesforce represents an individual associated with an Account (business or organization).
This command enables users to fetch contacts that meet predefined criteria within a saved list view in Salesforce. Once executed, the response contains a paginated list of Contact records, which can be displayed in applications or used for further processing.
The Get Record by View ID - Lead command allows you to retrieve a list of Lead records from Salesforce using a specific List View ID.
A Lead in Salesforce represents a potential customer or business prospect. Leads are often captured from marketing campaigns, website forms, or manual data entry.
This command helps users fetch leads that match predefined filters within a saved list view. Once executed, the response provides a paginated list of Lead records, which can be used for further processing, reporting, or sales outreach.
The Get Record by View ID - Opportunity command allows you to retrieve a list of Opportunity records from Salesforce using a specific List View ID.
An Opportunity in Salesforce represents a potential revenue-generating deal in the sales pipeline, linked to an Account and Contact.
This command is useful for sales teams to fetch opportunities that match predefined filters within a saved list view. Once executed, the response returns a paginated list of Opportunity records, which can be used for sales forecasting, reporting, and pipeline tracking.
The Get Record by View ID - Any command allows you to retrieve records of any Salesforce object type using a specific List View ID.
This command is useful when working with multiple record types, such as Contacts, Leads, Accounts, or Opportunities, and need to fetch records that match predefined filters in a saved list view.
Once executed, Salesforce returns a paginated response with records matching the list view filters. This command is ideal for generating reports,
managing bulk data retrieval, or integrating with third-party applications that require structured Salesforce data.
The Create Custom Field - Lead command allows you to add a new custom field to the Lead object in Salesforce. Custom fields help capture additional data specific to your business needs, ensuring that the Lead records store relevant and structured information beyond the standard fields.
Once the command is executed, Salesforce adds the new field to the Lead object. The field can then be used in reports, forms, and workflows to enhance lead management. This feature is useful for tracking custom attributes such as lead source details, scoring criteria, or industry-specific information.
The Create Custom Field - Contact command allows you to add a new custom field to the Contact object in Salesforce. Custom fields enhance data collection by enabling you to store additional information about contacts beyond standard Salesforce fields.
Once the command is executed, Salesforce adds the new field to the Contact object. The field can then be used in reports, forms, and workflows to improve contact management. This is particularly useful for capturing details such as communication preferences, relationship status, or any other custom business-specific attributes.
The Create Custom Field - Opportunity command allows you to add a new custom field to the Opportunity object in Salesforce. Custom fields enhance opportunity tracking by enabling the storage of additional details beyond standard Salesforce fields.
Once the command is executed, Salesforce adds the custom field to the Opportunity object, allowing users to capture and manage relevant business data such as deal progress, projected revenue, and custom sales metrics. These fields can be used in reports, automation workflows, and dashboards to improve sales insights and forecasting accuracy.
The Create Custom Field - Task command allows you to add a new custom field to the Task object in Salesforce. Custom fields help enhance task tracking by allowing additional data storage beyond standard Salesforce fields.
Once the command is executed, the new field becomes available in the Task object, enabling users to capture relevant details such as task priority, estimated effort, or custom classifications. These fields can be used in automation rules, reporting, and workflow triggers to improve task management and productivity.
The Create Custom Field - Account command allows you to add a new custom field to the Account object in Salesforce. Custom fields extend standard account attributes, enabling organizations to track and store additional business-specific details.
Once the command is executed, the custom field becomes available within the Account object, allowing users to capture important information such as customer segmentation, account classification, or specific financial data. These fields can be used in reporting, automation, and business intelligence to enhance customer management.
The Write SOQL Query command allows you to retrieve records from Salesforce objects using the Salesforce Object Query Language (SOQL).
SOQL is a query language similar to SQL but designed specifically for Salesforce, enabling you to filter, sort, and aggregate data stored in standard and custom objects.
SOQL queries are commonly used to extract relevant data for reports, dashboards, and application logic, ensuring users can efficiently work with Salesforce records.
Queries must specify the object, fields, and optional conditions to filter results.
The Create Custom Object command allows you to define a new custom object in Salesforce.
Custom objects are user-defined structures used to store specific types of data that do not fit into standard Salesforce objects.
These objects enable businesses to tailor Salesforce to their unique needs, allowing for efficient data management and integration with existing workflows.
When creating a custom object, you define its display labels, description, and key properties such as record names.
Custom objects can be used in reports, automation, and API integrations to enhance business processes.
The Describe Action Schema command provides metadata details about a Salesforce object or action.
It allows users to retrieve structural information, such as field properties, data types, and available operations
for a given object or action. This is useful for dynamically generating forms, validating inputs, and integrating
Salesforce data with external systems.
By using this command, you can programmatically inspect an object's schema and determine how to interact with it,
ensuring accurate data entry and processing.
The Custom Action command allows you to define and execute any API-based action within Salesforce.
With Custom Action, you can specify the HTTP method (GET, POST, PUT, DELETE), define the API endpoint,
and add query parameters, headers, and request bodies to customize the request.
Create Record - Contact
First Name
stringLast Name
stringAccount ID
string
You can find the Account ID by navigating to the Account record in Salesforce and copying the 15- or 18-character ID from the URL. Example: 0013Z00002ABC12345.
For more information,
Account ID Reference.
Email
string"johndoe@example.com".
Title
string"Marketing Manager".
Description
string"John is a key decision-maker in the marketing team.".
Additional Fields
string"Preferred language: English".
Create Record - Lead
First Name
string"Jane".Last Name
string"Smith".Company
string"Acme Inc.".Email
string"janesmith@acme.com".Phone
string"+1-555-1234".Website
stringhttp:// or https://. Example: "https://acme.com".
Title
string"CTO".Status
string
Description
string"Jane attended our webinar and expressed interest in our enterprise solutions.".
Additional Fields
string"Preferred contact method: Email".
Create Record - Opportunity
Name
string"Acme Inc. - Enterprise Software Deal".
Stage Name
string
Example: "Proposal".
Close Date
dateYYYY-MM-DD.
Example: "2024-12-31".
Account ID
string
You can find the Account ID by navigating to the Account record in Salesforce and copying the 15- or 18-character ID from the URL. Example: 0013Z00002ABC12345.
For more information,
Account ID Reference.
Amount
number15000 (for $15,000).
Description
string"Customer is interested in a bulk purchase and requires a custom proposal.".
Owner ID
string"0052x00000XYZ789".
You can find the Owner ID by navigating to the User Record in Salesforce and copying the 15- or 18-character User ID from the URL.
Additional Fields
string"Lead Source: Referral".
Create Record - Task
Subject
stringWhat ID
string
To find this ID, navigate to the respective record in Salesforce and copy the Record ID from the URL.
Example: 0012x00000ABC123 for an Account.
Activity Date
dateStatus
stringCreate Record - Account
Name
stringWebsite
stringPhone
stringOwner ID
string
You can find the Owner ID in the user profile URL in Salesforce.
Example: 0052x00000XYZ789
For more details, refer to the
Salesforce User ID Reference.
Description
stringUpdate Record - Contact
Record ID
string
You can find this ID by opening the Contact record in Salesforce and copying the Record ID from the URL.
Example: 0032x00000DEF456
First Name
stringLast Name
stringAccount ID
string
This is not the User ID of the person making the update, but the ID of the business or organization the contact is linked to.
Example: 0012x00000ABC123
Email
stringTitle
stringDescription
stringAdditional Fields
stringUpdate Record - Lead
Record ID
string
You can find this ID in the Leads Table or obtain it from an API response.
Format: 00QXXXXXXXXXXXXXXX
First Name
stringLast Name
stringCompany
stringEmail
stringPhone
stringWebsite
stringStatus
stringUpdate Record - Opportunity
Record ID
string
You can find this ID in the Opportunities Table or obtain it from an API response.
Format: 006XXXXXXXXXXXXXXX
Name
stringStage Name
stringClose Date
date
Use the format YYYY-MM-DD to ensure consistency.
Account ID
string
This ensures the opportunity remains linked to the correct business or organization.
Amount
numberDescription
stringAdditional Details
stringOwner ID
stringNext Steps
stringUpdate Record - Task
Record ID
string
This ensures the correct task is modified and linked to the appropriate record.
Retrieve this ID from the Tasks Table or obtain it from an API response.
Format: 00TXXXXXXXXXXXXXXX
What ID
string
This ensures the task remains associated with the correct Salesforce record.
Who ID
string
This is typically a Contact or Lead and helps track task ownership for better communication and follow-ups.
Subject
string
Example: "Follow-up Call" or "Send Proposal."
Activity Date
date
Keeping this updated helps teams manage deadlines and ensure timely completion of activities.
Format: YYYY-MM-DD
Status
string
Common statuses include "Not Started," "In Progress," "Completed," and "Deferred."
Update Record - Account
Record ID
string
This ensures that the correct Account record is modified.
Retrieve this ID from the Accounts Table or obtain it from an API response.
Format: 001XXXXXXXXXXXXXXX
Name
string
Example: "Acme Corporation" or "Tech Solutions Ltd."
Owner ID
string
Assigning the correct owner helps ensure accountability and smooth customer interactions.
Website
string
Example: https://www.company.com
Phone
string
Example: +1 555-123-4567
Description
stringAdditional Fields
stringGet Record by ID - Contact
Record ID
string
This ID is automatically generated when a Contact is created and is required to fetch the correct record.
Retrieve this ID from the Contacts Table, an API response, or directly from the Salesforce URL when viewing a Contact.
Format: 003XXXXXXXXXXXXXXX
Example: 0035g00000Abc123AAA
Get Record by ID - Lead
Record ID
string
This ID is automatically generated when a Lead is created and is required to fetch the correct record.
Retrieve this ID from the Leads Table, an API response, or directly from the Salesforce URL when viewing a Lead.
Format: 00QXXXXXXXXXXXXXXX
Example: 00Q4x00000Abc567XXX
Get Record by ID - Opportunity
Record ID
string
This ID is automatically generated when an opportunity is created and is required to fetch the correct record.
Retrieve this ID from the Opportunities Table, an API response, or directly from the Salesforce URL when viewing an opportunity.
Format: 006XXXXXXXXXXXXXXX
Example: 0067x00000Xyz890YYY
Get Record by ID - Task
Record ID
string
This ID is generated when a task is created and is required to fetch the correct record.
Retrieve this ID from the Tasks Table, an API response, or directly from the Salesforce URL when viewing a task.
Format: 00TXXXXXXXXXXXXXXX
Example: 00T9x00000Bcd234ZZZ
Get Record by ID - Account
Record ID
string
This ID is generated when an account is created and is required to fetch the correct record.
Retrieve this ID from the Accounts Table, an API response, or directly from the Salesforce URL when viewing an account.
Format: 001XXXXXXXXXXXXXXX
Example: 0012x00000Abc456AAA
Get Record by ID - Any
Record ID
string
Example: "0035g00000Xyz789AAA" (Contact), "00Q4x00000Abc123BBB" (Lead)
Record Type
stringSearch Record - Contact
Filter Formula
string
Example:
"FirstName = 'John' AND LastName = 'Doe'"
Retrieves contacts with the exact first and last name.
Example:
"Email LIKE '%@example.com'"
Finds contacts with an email ending in "@example.com".
Pagination Parameters
object
Example:
{ "{ limit: 10, offset: 0 }" }
Fetches the first 10 records.
Example:
{ "{ limit: 10, offset: 10 }" }
Fetches the next 10 records (records 11-20).
Search Record - Lead
Filter Formula
string
Example:
"Company = 'Acme Corp'"
Retrieves leads from Acme Corp.
Example:
"Company = 'Acme Corp' OR Company = 'Globex'"
Finds leads from either company.
Pagination Parameters
object
Example:
{ "{ limit: 10, offset: 20 }" }
Fetches leads 21-30.
Example:
{ "{ limit: 5, offset: 15 }" }
Fetches leads 16-20.
Search Record - Opportunity
Filter Formula
string
Example:
"StageName = 'Closed Won'"
Retrieves successfully closed deals.
Example:
"Amount > 50000"
Finds opportunities with a value greater than $50,000.
Pagination Parameters
object
Example:
{ "{ limit: 5, offset: 0 }" }
Fetches the first five records.
Example:
{ "{ limit: 10, offset: 10 }" }
Retrieves records 11-20.
Search Record - Any
Record Type
stringFilter Formula
string
Example:
"Name LIKE '%Acme%'"
Searches for records containing "Acme" in the name.
Example:
"Industry = 'Finance' AND BillingState = 'NY'"
Fetches finance-related records in New York.
Pagination Parameters
object
Example:
{ "{ limit: 20, offset: 50 }" }
Fetches records 51-70.
Example:
{ "{ limit: 30, offset: 90 }" }
Retrieves records 91-120.
Get Record by View ID - Contact
List View ID
string
Retrieve it from the Salesforce UI by opening the list view and copying the ID from the URL.
Example:
"00B5g00000Xyz123AAA"
Pagination Parameters
object
Example:
{ "{ limit: 10, offset: 0 }" }
Fetches the first 10 records.
Example:
{ "{ limit: 20, offset: 20 }" }
Fetches records 21-40.
Get Record by View ID - Lead
List View ID
string
Retrieve it from the Salesforce UI by opening the Lead list view and copying the ID from the URL.
Example:
"00B6x00000Abc789BBB"
Pagination Parameters
object
Example:
{ "{ limit: 15, offset: 0 }" }
Retrieves the first 15 Lead records.
Example:
{ "{ limit: 10, offset: 30 }" }
Retrieves Lead records 31-40.
Get Record by View ID - Opportunity
List View ID
string
Retrieve it from the Salesforce UI by opening an Opportunity list view and copying the ID from the URL.
Example:
"00B7x00000Def567CCC"
Pagination Parameters
object
Example:
{ "{ limit: 5, offset: 0 }" }
Retrieves the first five Opportunity records.
Example:
{ "{ limit: 10, offset: 10 }" }
Retrieves Opportunity records 11-20.
Get Record by View ID - Any
Record Type
string
Example: "Contact", "Lead", "Account", or "Opportunity".
List View ID
string
Retrieve it from the Salesforce UI by opening a list view and copying the ID from the URL.
Example:
"00B8x00000Ghi890DDD"
Pagination Parameters
object
Example:
{ "{ limit: 20, offset: 50 }" }
Retrieves records 51-70.
Example:
{ "{ limit: 30, offset: 90 }" }
Retrieves records 91-120.
Create Custom Field - Lead
Label
string
Example: "Lead Source Category".
Type
string
Example: "Text" for a custom Lead Identifier.
Default Checkbox Value
boolean
Example: "Is Active" set to true.
Length
integer
Example: "Company Code" with a max length of 10.
Decimal Places
integer
Example: "Discount Percentage" with 2 decimal places (e.g., 15.75%).
Picklist Values
array
Example: "Lead Status" with options: "New, Contacted, Qualified".
Visible Lines
integer
Example: "Notes" field with 5 visible lines.
Helper Text
string
Example: "Enter the primary reason for lead disqualification".
Default Field Value
string
Example: "Country" defaulting to "United States".
Create Custom Field - Contact
Label
string
Example: "Preferred Contact Method".
Type
string
Example: "Picklist" for selecting communication preferences.
Default Checkbox Value
boolean
Example: "Subscribed to Newsletter" set to true.
Length
integer
Example: "Nickname" with a max length of 30.
Decimal Places
integer
Example: "Credit Score" with 2 decimal places.
Picklist Values
array
Example: "Communication Preference" with options: "Email, Phone, SMS".
Visible Lines
integer
Example: "Additional Notes" with 4 visible lines.
Helper Text
string
Example: "Enter the best way to contact this person".
Default Field Value
string
Example: "Preferred Language" defaulting to "English".
Create Custom Field - Opportunity
Label
string
Example: "Expected Revenue Category".
Type
string
Example: "Stage Progress Indicator" as a picklist field.
Default Checkbox Value
boolean
Example: "Include in Forecast" set to true.
Length
integer
Example: "Sales Representative Name" with a 50-character limit.
Decimal Places
integer
Example: "Projected Growth Rate" with 3 decimal places (e.g., 3.145%).
Picklist Values
array
Example: "Sales Cycle Stage" with values: "Negotiation, Proposal, Closed".
Visible Lines
integer
Example: "Deal Summary" with 6 visible lines.
Helper Text
string
Example: "Specify the primary competitor involved in this deal".
Default Field Value
string
Example: "Probability" defaulting to "50%".
Create Custom Field - Task
Label
string
Example: "Task Category".
Type
string
Example: "Picklist" for task priority (High, Medium, Low).
Default Checkbox Value
boolean
Example: "Send Reminder" set to true.
Length
integer
Example: "Task Description" with a max length of 200 characters.
Decimal Places
integer
Example: "Estimated Duration (Hours)" with 1 decimal place (e.g., 2.5 hours).
Picklist Values
array
Example: "Task Type" with values: "Call, Meeting, Email".
Visible Lines
integer
Example: "Notes" with 3 visible lines.
Helper Text
string
Example: "Enter specific instructions for completing this task".
Default Field Value
string
Example: "Task Status" defaulting to "Open".
Create Custom Field - Account
Label
string
Example: "Account Tier".
Type
string
Example: "Picklist" for Tier selection (Gold, Silver, Bronze).
Default Checkbox Value
boolean
Example: "Preferred Customer" set to true.
Length
integer
Example: "Industry Type" with a max length of 50.
Decimal Places
integer
Example: "Annual Revenue" with 2 decimal places.
Picklist Values
array
Example: "Business Type" with values: "Enterprise, Small Business, Nonprofit".
Visible Lines
integer
Example: "Account History" with 4 visible lines.
Helper Text
string
Example: "Specify key details about the business relationship".
Default Field Value
string
Example: "Account Status" defaulting to "Active".
Write SOQL Query
Query
string
Example 1: Retrieve all contacts with a specific last name:
SELECT Id, FirstName, LastName
FROM Contact
WHERE LastName = 'Smith'
Example 2: Fetch opportunities that are in the proposal stage:
SELECT Id, Name, StageName
FROM Opportunity
WHERE StageName = 'Proposal'
Example 3: Get accounts created in the last 30 days:
SELECT Id, Name
FROM Account
WHERE CreatedDate = LAST_N_DAYS:30
Create Custom Object
Label
stringPlural Label
stringDescription
stringRecord Name
stringDescribe Action Schema
Record Type
stringOperation
stringCustom Action
Method
stringGET, POST, PUT, and DELETE.
Endpoint
string
https://yourInstance.salesforce.com/services/data/vXX.X/sobjects/ObjectName
Query Parameters
JSONBody
JSONPOST or PUT requests. This defines the structured data sent to the Salesforce API for processing.