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': (

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.

First Name string

The contact's given name, used for identification in Salesforce. It is typically the first part of the full name and helps distinguish between contacts. Example: John.

Last Name string

The contact's family name or surname. This field is mandatory for proper record-keeping and searching in Salesforce. Example: Doe.

Account ID string

The unique identifier of the Salesforce Account associated with this Contact. This is not the Account ID of the user creating the Contact but the ID of the business or organization the Contact belongs to.

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

The contact's primary email address. It must be in a valid email format and should be unique within Salesforce to avoid duplicate records. Example: "johndoe@example.com".

Title string

The contact’s job title or designation within their organization. This helps in identifying the contact’s role and responsibilities. Example: "Marketing Manager".

Description string

Additional notes or details about the contact. Can be used to store context or specific information about interactions. Example: "John is a key decision-maker in the marketing team.".

Additional Fields string

Any custom fields required for specific business needs. Salesforce allows custom fields based on organizational requirements. Example: "Preferred language: English".
Appsmith Salesforce Integration
), /* ===================== Create Record - Lead ===================== */ 'Create Record - Lead': (

Create Record - Lead

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.

First Name string

The lead's given name, used for identification and communication. Example: "Jane".

Last Name string

The lead's family name or surname. This field is mandatory. Example: "Smith".

Company string

The business entity associated with the lead. Example: "Acme Inc.".

Email string

The lead's primary business email address. It must be in a valid email format. Example: "janesmith@acme.com".

Phone string

The lead's primary contact number. Example: "+1-555-1234".

Website string

The lead's company website URL. Must start with http:// or https://. Example: "https://acme.com".

Title string

The lead's job title. Example: "CTO".

Status string

The current position of the lead in your sales pipeline:

Description string

Additional notes or details about the lead. Can be used to store context or specific information about interactions. Example: "Jane attended our webinar and expressed interest in our enterprise solutions.".

Additional Fields string

Any custom fields required for specific business needs. Salesforce allows custom fields based on organizational requirements. Example: "Preferred contact method: Email".
), 'Create Record - Opportunity': (

Create Record - Opportunity

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.

Name string

A descriptive name for the opportunity, typically including the product, service, or client name. Example: "Acme Inc. - Enterprise Software Deal".

Stage Name string

The current stage in the sales process. This determines the progress of the deal in the sales pipeline. Example stages: Example: "Proposal".

Close Date date

The expected or actual closing date of the opportunity. Format: YYYY-MM-DD. Example: "2024-12-31".

Account ID string

The unique identifier of the Salesforce Account associated with this Contact. This is not the Account ID of the user creating the Contact but the ID of the business or organization the Contact belongs to.

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 number

The estimated total value of the opportunity in the company's currency. Example: 15000 (for $15,000).

Description string

Additional notes or details about the opportunity. Can be used to document key discussions, agreements, or next steps. Example: "Customer is interested in a bulk purchase and requires a custom proposal.".

Owner ID string

The Salesforce user responsible for managing this opportunity. This should be a valid Salesforce User ID. Example: "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

Any custom fields required for specific business needs. Salesforce allows custom fields based on organizational requirements. Example: "Lead Source: Referral".
), /* ===================== Create Record - Task ===================== */ 'Create Record - Task': (

Create Record - Task

Create a new task record in Salesforce to track activities and follow-ups.

Subject string

A brief description of the task. This will appear as the main title in the task list.

What ID string

The unique identifier of the related object, such as a Lead, Contact, Opportunity, or Account.

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 date

The due date for the task. Use the format YYYY-MM-DD.

Status string

The current status of the task (e.g., Not Started, In Progress, Completed, Waiting on someone else, Deferred).
), /* ===================== Create Record - Account ===================== */ 'Create Record - Account': (

Create Record - Account

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.

Name string

The official name of the company or organization. This field is required to create an account.

Website string

The company's official website URL. This helps in identifying and verifying the account.

Phone string

The primary contact number for the account. This is useful for communication and maintaining customer relationships.

Owner ID string

The Owner ID is the unique identifier of the Salesforce user who owns or manages the account. It is assigned to a specific user and determines who has primary responsibility for this record.

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 string

A detailed description of the account. This field allows you to provide additional context about the business, its operations, or any relevant notes for internal reference.
), /* ===================== Update Record - Contact ===================== */ 'Update Record - Contact': (

Update Record - Contact

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.

Record ID string

The unique identifier of the Contact record that needs to be updated. This ID ensures that the correct record is modified.

You can find this ID by opening the Contact record in Salesforce and copying the Record ID from the URL.

Example: 0032x00000DEF456

First Name string

The given name of the contact. Use this field to update or correct the contact's first name.

Last Name string

The surname or family name of the contact. This field is typically required for identifying the contact.

Account ID string

The unique identifier of the Account to which the contact belongs. If the contact has switched companies or organizations, update this field to reflect the new association.

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 string

The primary email address of the contact. Updating this field ensures that communications reach the correct email.

Title string

The job title or position of the contact within their organization. Keeping this updated helps in identifying their role in business interactions.

Description string

Additional details about the contact, such as background information, notes from interactions, or special preferences.

Additional Fields string

Any other fields required to update the contact record. This can include custom fields specific to your Salesforce setup.
), /* ===================== Update Record - Lead ===================== */ 'Update Record - Lead': (

Update Record - Lead

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.

Record ID string

The unique identifier of the Lead record that needs to be updated. This ensures the correct lead is modified.

You can find this ID in the Leads Table or obtain it from an API response.

Format: 00QXXXXXXXXXXXXXXX

First Name string

The given name of the lead. Use this field to update or correct the first name of the individual.

Last Name string

The surname or family name of the lead. This field is typically required for identifying the lead.

Company string

The business entity associated with the lead. Updating this field ensures that the lead remains linked to the correct organization.

Email string

The primary business email address of the lead. Keeping this updated ensures that communications reach the correct recipient.

Phone string

The primary contact number of the lead. Updating this field ensures that outreach efforts are directed to the correct number.

Website string

The official website URL of the lead’s company. This field helps associate the lead with their business online presence.

Status string

The current stage of the lead in the sales pipeline. Updating this field helps track the lead’s progress, such as "New," "Working," "Qualified," or "Converted."
), /* ===================== Update Record - Opportunity ===================== */ 'Update Record - Opportunity': (

Update Record - Opportunity

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.

Record ID string

The unique identifier of the Opportunity record that needs to be updated. This ensures the correct opportunity is modified.

You can find this ID in the Opportunities Table or obtain it from an API response.

Format: 006XXXXXXXXXXXXXXX

Name string

The name of the opportunity. Updating this field ensures the opportunity is correctly labeled and identifiable in reports.

Stage Name string

The current sales stage of the opportunity. Keeping this field updated helps track progress through the sales pipeline. Common stages include "Prospecting," "Negotiation," and "Closed Won."

Close Date date

The expected or actual closing date of the opportunity.

Use the format YYYY-MM-DD to ensure consistency.

Account ID string

The unique identifier of the Account associated with the Opportunity.

This ensures the opportunity remains linked to the correct business or organization.

Amount number

The estimated total revenue value of the opportunity. Updating this helps maintain accurate revenue forecasts.

Description string

Additional details about the opportunity, such as background information, special conditions, or notes from the sales team.

Additional Details string

Any extra fields required for updating the opportunity. Use this to capture custom fields relevant to your sales process.

Owner ID string

The unique identifier of the Salesforce user who owns the opportunity. Updating this field reassigns ownership.

Next Steps string

The next planned actions for the opportunity. This field helps track follow-ups, pending tasks, or important deal milestones.
), /* ===================== Update Record - Task ===================== */ 'Update Record - Task': (

Update Record - Task

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.

Record ID string

The unique identifier of the Task that needs to be updated.

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

The unique identifier of the related object, such as a Lead, Contact, Opportunity, or Account.

This ensures the task remains associated with the correct Salesforce record.

Who ID string

The unique identifier of the person associated with the task.

This is typically a Contact or Lead and helps track task ownership for better communication and follow-ups.

Subject string

The subject of the task. Updating this field ensures clarity in task lists and reports.

Example: "Follow-up Call" or "Send Proposal."

Activity Date date

The due date of the task.

Keeping this updated helps teams manage deadlines and ensure timely completion of activities.

Format: YYYY-MM-DD

Status string

The current status of the task. Updating this ensures progress tracking and completion monitoring.

Common statuses include "Not Started," "In Progress," "Completed," and "Deferred."
), /* ===================== Update Record - Account ===================== */ 'Update Record - Account': (

Update Record - Account

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.

Record ID string

The unique identifier of the Account that needs to be updated.

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

The name of the Account. Keeping this field updated ensures consistency and better identification in records and reports.

Example: "Acme Corporation" or "Tech Solutions Ltd."

Owner ID string

The unique identifier of the Salesforce user who owns the Account.

Assigning the correct owner helps ensure accountability and smooth customer interactions.

Website string

The official website URL of the Account. Updating this field helps maintain accurate company contact details.

Example: https://www.company.com

Phone string

The primary contact number associated with the Account. Keeping phone numbers updated facilitates direct communication.

Example: +1 555-123-4567

Description string

Additional details about the Account. This field can be used to store background information, key business insights, or other relevant notes.

Additional Fields string

Any extra fields necessary for updating the Account record. This ensures flexibility to store custom information as needed.
), /* ===================== Get Record by ID - Contact ===================== */ 'Get Record by ID - Contact': (

Get Record by ID - Contact

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.

Record ID string

The unique identifier for a Contact record in Salesforce.

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 ===================== */ 'Get Record by ID - Lead': (

Get Record by ID - Lead

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.

Record ID string

The unique identifier for a Lead record in Salesforce.

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 ===================== */ 'Get Record by ID - Opportunity': (

Get Record by ID - Opportunity

Retrieve a specific opportunity record in Salesforce using its unique identifier.

Record ID string

The unique identifier for an opportunity record in Salesforce.

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 ===================== */ 'Get Record by ID - Task': (

Get Record by ID - Task

Retrieve a specific task record in Salesforce using its unique identifier.

Record ID string

The unique identifier for a task record in Salesforce.

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 ===================== */ 'Get Record by ID - Account': (

Get Record by ID - Account

Retrieve a specific account record in Salesforce using its unique identifier.

Record ID string

The unique identifier for an account record in Salesforce.

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 ===================== */ 'Get Record by ID - Any': (

Get Record by ID - Any

Retrieve a specific record in Salesforce using its unique identifier and record type.

Record ID string

The unique identifier for a Salesforce record. Generated automatically, it can be retrieved from relevant tables, API responses, or the Salesforce URL. Format varies based on the object type.
Example: "0035g00000Xyz789AAA" (Contact), "00Q4x00000Abc123BBB" (Lead)

Record Type string

Specify the object type of the record to retrieve, such as Contact, Lead, or Account.
), /* ===================== Search Record - Contact ===================== */ 'Search Record - Contact': (

Search Record - Contact

Retrieve contact records in Salesforce by applying filters and pagination.

Filter Formula string

Define conditions to filter search results and fetch only relevant contacts.
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

Manage search results by retrieving records in chunks instead of all at once.
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 ===================== */ 'Search Record - Lead': (

Search Record - Lead

Retrieve lead records in Salesforce by applying filters and pagination.

Filter Formula string

Define conditions to filter search results and fetch only relevant leads.
Example:
"Company = 'Acme Corp'"
      
Retrieves leads from Acme Corp.
Example:
"Company = 'Acme Corp' OR Company = 'Globex'"
      
Finds leads from either company.

Pagination Parameters object

Manage search results by retrieving records in chunks instead of all at once.
Example:
{ "{ limit: 10, offset: 20 }" }
      
Fetches leads 21-30.
Example:
{ "{ limit: 5, offset: 15 }" }
      
Fetches leads 16-20.
), /* ===================== Search Record - Opportunity ===================== */ 'Search Record - Opportunity': (

Search Record - Opportunity

Retrieve opportunity records in Salesforce by applying filters and pagination.

Filter Formula string

Define conditions to filter search results and fetch only relevant opportunities.
Example:
"StageName = 'Closed Won'"
      
Retrieves successfully closed deals.
Example:
"Amount > 50000"
      
Finds opportunities with a value greater than $50,000.

Pagination Parameters object

Manage search results by retrieving records in chunks instead of all at once.
Example:
{ "{ limit: 5, offset: 0 }" }
      
Fetches the first five records.
Example:
{ "{ limit: 10, offset: 10 }" }
      
Retrieves records 11-20.
), /* ===================== Search Record - Any ===================== */ 'Search Record - Any': (

Search Record - Any

Retrieve any Salesforce records by specifying type, filters, and pagination.

Record Type string

Define the object type to search (e.g., Contact, Lead, Account).

Filter Formula string

Define conditions to filter search results and fetch only relevant records.
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

Manage search results by retrieving records in chunks instead of all at once.
Example:
{ "{ limit: 20, offset: 50 }" }
      
Fetches records 51-70.
Example:
{ "{ limit: 30, offset: 90 }" }
      
Retrieves records 91-120.
), /* ===================== Get Record by View ID - Contact ===================== */ 'Get Record by View ID - Contact': (

Get Record by View ID - Contact

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.

List View ID string

A unique identifier assigned to a saved list view in Salesforce. It allows fetching records based on predefined filters.
Retrieve it from the Salesforce UI by opening the list view and copying the ID from the URL.
Example:
"00B5g00000Xyz123AAA"
      

Pagination Parameters object

Manage search results by retrieving records in chunks instead of all at once.
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 ===================== */ 'Get Record by View ID - Lead': (

Get Record by View ID - Lead

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.

List View ID string

A unique identifier assigned to a saved list view in Salesforce. It allows fetching Lead records based on predefined filters.
Retrieve it from the Salesforce UI by opening the Lead list view and copying the ID from the URL.
Example:
"00B6x00000Abc789BBB"
      

Pagination Parameters object

Manage result sets by fetching records in batches to optimize performance.
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 ===================== */ 'Get Record by View ID - Opportunity': (

Get Record by View ID - Opportunity

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.

List View ID string

A unique identifier assigned to a saved list view in Salesforce. It allows fetching Opportunity records based on predefined filters.
Retrieve it from the Salesforce UI by opening an Opportunity list view and copying the ID from the URL.
Example:
"00B7x00000Def567CCC"
      

Pagination Parameters object

Manage result sets by fetching records in batches to optimize performance.
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 ===================== */ 'Get Record by View ID - Any': (

Get Record by View ID - Any

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.

Record Type string

Specifies the type of record to be fetched using the list view.
Example: "Contact", "Lead", "Account", or "Opportunity".

List View ID string

A unique identifier assigned to a saved list view in Salesforce. It allows fetching records based on predefined filters.
Retrieve it from the Salesforce UI by opening a list view and copying the ID from the URL.
Example:
"00B8x00000Ghi890DDD"
      

Pagination Parameters object

Manages the retrieval of records in chunks to optimize performance.
Example:
{ "{ limit: 20, offset: 50 }" }
      
Retrieves records 51-70.
Example:
{ "{ limit: 30, offset: 90 }" }
      
Retrieves records 91-120.
), /* ===================== Create Custom Field - Lead ===================== */ 'Create Custom Field - Lead': (

Create Custom Field - Lead

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.

Label string

The display name for the custom field, shown in the UI. Choose a descriptive name that aligns with business terminology.
Example: "Lead Source Category".

Type string

The data type of the field, such as Text, Number, Boolean, or Picklist. Determines how data is stored and validated.
Example: "Text" for a custom Lead Identifier.

Default Checkbox Value boolean

For checkbox fields, define whether it should be checked (true) or unchecked (false) by default.
Example: "Is Active" set to true.

Length integer

Defines the maximum number of characters allowed for a text field. Helps prevent excessive data entry.
Example: "Company Code" with a max length of 10.

Decimal Places integer

Specifies how many decimal places a numeric field should allow. Useful for financial or measurement-related fields.
Example: "Discount Percentage" with 2 decimal places (e.g., 15.75%).

Picklist Values array

A set of predefined selectable values for picklist fields. Ensures data consistency.
Example: "Lead Status" with options: "New, Contacted, Qualified".

Visible Lines integer

Specifies the number of visible lines in a long text field. Helps with structured data entry.
Example: "Notes" field with 5 visible lines.

Helper Text string

Provides guidance on what to enter in the field. Displayed as a tooltip or inline text.
Example: "Enter the primary reason for lead disqualification".

Default Field Value string

The pre-populated value shown when creating a new record. Ensures faster data entry.
Example: "Country" defaulting to "United States".
), /* ===================== Create Custom Field - Contact ===================== */ 'Create Custom Field - Contact': (

Create Custom Field - Contact

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.

Label string

The name of the field as displayed in the UI. Choose a descriptive label that aligns with business terminology.
Example: "Preferred Contact Method".

Type string

Defines the data type, such as Text, Boolean, or Picklist. Determines how the field stores and validates data.
Example: "Picklist" for selecting communication preferences.

Default Checkbox Value boolean

Defines whether a checkbox should be checked (true) or unchecked (false) by default.
Example: "Subscribed to Newsletter" set to true.

Length integer

Specifies the maximum number of characters for text fields. Helps prevent excessively long data entries.
Example: "Nickname" with a max length of 30.

Decimal Places integer

Determines how many decimal places a numeric field should support. Useful for fields involving numerical precision.
Example: "Credit Score" with 2 decimal places.

Picklist Values array

A predefined list of values for selection. Ensures consistency in data entry.
Example: "Communication Preference" with options: "Email, Phone, SMS".

Visible Lines integer

Defines how many lines are visible for long text fields. Helps structure multiline text input.
Example: "Additional Notes" with 4 visible lines.

Helper Text string

Instructions or hints displayed to users to guide data entry.
Example: "Enter the best way to contact this person".

Default Field Value string

A default value pre-filled in new records. Ensures faster data entry and standardization.
Example: "Preferred Language" defaulting to "English".
), /* ===================== Create Custom Field - Opportunity ===================== */ 'Create Custom Field - Opportunity': (

Create Custom Field - Opportunity

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.

Label string

The display name for the field as shown in the UI. Choose a meaningful name that aligns with sales processes.
Example: "Expected Revenue Category".

Type string

Defines the kind of data the field holds, such as Text, Number, Boolean, or Picklist. Determines data format and validation rules.
Example: "Stage Progress Indicator" as a picklist field.

Default Checkbox Value boolean

Determines whether a checkbox field is selected (true) or unselected (false) by default.
Example: "Include in Forecast" set to true.

Length integer

Defines character limits for text fields to maintain data quality and consistency.
Example: "Sales Representative Name" with a 50-character limit.

Decimal Places integer

Controls decimal precision for numeric values. Useful for currency calculations, probability fields, or percentage values.
Example: "Projected Growth Rate" with 3 decimal places (e.g., 3.145%).

Picklist Values array

A predefined list of selectable values for structured data entry. Helps standardize opportunity categorization.
Example: "Sales Cycle Stage" with values: "Negotiation, Proposal, Closed".

Visible Lines integer

Defines the number of lines visible in a long text field. Useful for capturing detailed notes or descriptions.
Example: "Deal Summary" with 6 visible lines.

Helper Text string

Provides additional instructions for users entering data to ensure accuracy and consistency.
Example: "Specify the primary competitor involved in this deal".

Default Field Value string

The automatically populated value when creating new records. Helps streamline data entry and standardize default assumptions.
Example: "Probability" defaulting to "50%".
), /* ===================== Create Custom Field - Task ===================== */ 'Create Custom Field - Task': (

Create Custom Field - Task

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.

Label string

The name displayed in the UI for this field. Choose a clear and meaningful label that aligns with task tracking needs.
Example: "Task Category".

Type string

Defines the type of data stored, such as Text, Boolean, or Picklist. Determines input validation and format.
Example: "Picklist" for task priority (High, Medium, Low).

Default Checkbox Value boolean

Determines whether a checkbox field is selected (true) or unselected (false) by default.
Example: "Send Reminder" set to true.

Length integer

Defines character limits for text fields to maintain consistency and data quality.
Example: "Task Description" with a max length of 200 characters.

Decimal Places integer

Determines decimal precision for numeric values, useful for tracking time estimates or measurements.
Example: "Estimated Duration (Hours)" with 1 decimal place (e.g., 2.5 hours).

Picklist Values array

A predefined list of selectable values for structured task categorization.
Example: "Task Type" with values: "Call, Meeting, Email".

Visible Lines integer

Defines how many lines are visible for long text fields, improving readability for detailed notes.
Example: "Notes" with 3 visible lines.

Helper Text string

Instructions or hints displayed to users to guide data entry and ensure consistency.
Example: "Enter specific instructions for completing this task".

Default Field Value string

A default value pre-filled in new records to streamline task creation.
Example: "Task Status" defaulting to "Open".
), /* ===================== Create Custom Field - Account ===================== */ 'Create Custom Field - Account': (

Create Custom Field - Account

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.

Label string

The name displayed in the UI for this field. Choose a descriptive and meaningful label for clarity.
Example: "Account Tier".

Type string

Defines the type of data stored in this field, such as Text, Boolean, or Picklist. Determines input validation and field behavior.
Example: "Picklist" for Tier selection (Gold, Silver, Bronze).

Default Checkbox Value boolean

Defines whether a checkbox field should be checked (true) or unchecked (false) by default.
Example: "Preferred Customer" set to true.

Length integer

Specifies the maximum number of characters allowed for text fields to ensure data consistency.
Example: "Industry Type" with a max length of 50.

Decimal Places integer

Determines decimal precision for numeric values, useful for financial or statistical data.
Example: "Annual Revenue" with 2 decimal places.

Picklist Values array

A predefined list of selectable values to maintain structured data entry.
Example: "Business Type" with values: "Enterprise, Small Business, Nonprofit".

Visible Lines integer

Defines the number of lines visible for long text fields, improving readability for multi-line input.
Example: "Account History" with 4 visible lines.

Helper Text string

Instructions or hints displayed to users to ensure accurate data entry.
Example: "Specify key details about the business relationship".

Default Field Value string

A default value pre-filled in new records to streamline account creation.
Example: "Account Status" defaulting to "Active".
), /* ===================== Write SOQL Query ===================== */ 'Write SOQL Query': (

Write SOQL Query

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.

Query string

The SOQL query used to retrieve records from Salesforce. Queries must specify the object and fields to retrieve.
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 ===================== */ 'Create Custom Object': (

Create Custom Object

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.

Label string

The display name of the object. Example: "Project".

Plural Label string

The plural form of the object label for UI display. Example: "Projects".

Description string

A brief explanation of the object's purpose. Example: "Stores details about company projects."

Record Name string

The unique name field for each record. Example: "Project Name".
), /* ===================== Describe Action Schema ===================== */ 'Describe Action Schema': (

Describe Action Schema

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.

Record Type string

The type of record being described. Example: "Lead".

Operation string

The action being performed on the object, such as Create, Update, or Delete. Example: "Update".
), /* ===================== Custom Action ===================== */ 'Custom Action': (

Custom Action

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.

Method string

The HTTP method used for the API request. Options include GET, POST, PUT, and DELETE.

Endpoint string

The Salesforce API endpoint where the request is sent. This endpoint specifies the resource being accessed or modified within Salesforce. To locate the correct endpoint, refer to the Salesforce API documentation or use the Salesforce Developer Console to inspect API URLs.

Example: https://yourInstance.salesforce.com/services/data/vXX.X/sobjects/ObjectName

Query Parameters JSON

Optional key-value pairs sent as query parameters in the API request URL. Query parameters help filter or modify the request results based on specific criteria.

Body JSON

The request payload for POST or PUT requests. This defines the structured data sent to the Salesforce API for processing.
), }; return content[selectedCommand] ||

; }; return ( {renderCommandContent()} ); }