# Salesforce on boxd

> Salesforce is a leading CRM platform integrating sales, service, marketing, and analytics to build customer relationships and drive business growth.

- Page: https://boxd.sh/integrations/salesforce/
- CLI: `run salesforce` (200 commands, 35 marked common)
- SDK: `import { salesforce } from "@boxd/run"`; every parameter and response type is at `@boxd/run/salesforce`
- Triggers: 7
- Connect: `run auth salesforce` (Sign in with Salesforce), or https://app.boxd.sh/integrations/detail/salesforce
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth salesforce      # once: prints a link to connect your account
run salesforce           # list its commands
run salesforce get-org-limits
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { salesforce } from "@boxd/run";

const result = await salesforce.getOrgLimits();
console.log(result);

salesforce.on("account-created-or-updated", async (event) => {
  // Account Created or Updated: runs on this machine, once per event
  console.log(event);
});
```

Run it with `run salesforce.run.ts`. A script that calls `.on()` keeps running as a job and handles each event.

## Commands

Required flags are listed; `run salesforce <command> --help` lists the optional ones. "common" marks what `run salesforce` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `account-creation-with-content-type-option` ·deprecated | `salesforce.accountCreationWithContentTypeOption()` | `--Name` | 66 | Creates a new Salesforce Account using a JSON POST request, requiring 'Name'; specific fields (e.g., custom, DunsNumber) may have org-level prerequisites |
| `add-contact-to-campaign` | `salesforce.addContactToCampaign()` | `--campaign-id` `--contact-id` | 2 | Adds a contact to a campaign by creating a CampaignMember record to track campaign engagement |
| `add-lead-to-campaign` | `salesforce.addLeadToCampaign()` | `--campaign-id` `--lead-id` | 2 | Adds a lead to a campaign by creating a CampaignMember record, allowing you to track campaign engagement |
| `add-opportunity-line-item` | `salesforce.addOpportunityLineItem()` | `--opportunity-id` `--pricebook-entry-id` `--quantity` | 6 | Adds a product (line item) to an opportunity |
| `apply-lead-assignment-rules` | `salesforce.applyLeadAssignmentRules()` | `--lead-id` | 0 | Applies configured lead assignment rules to a specific lead, automatically routing it to the appropriate owner based on your organization's rules |
| `associate-contact-to-account` | `salesforce.associateContactToAccount()` | `--account-id` `--contact-id` | 1 | Associates a contact with an account by updating the contact's AccountId field |
| `clone-opportunity-with-products` | `salesforce.cloneOpportunityWithProducts()` | `--opportunity-id` | 4 | Clones an opportunity and optionally its products (line items) |
| `clone-record` | `salesforce.cloneRecord()` | `--object-type` `--record-id` | 1 | Creates a copy of an existing Salesforce record by reading its data, removing system fields, and creating a new record |
| `close-or-abort-job` | `salesforce.closeOrAbortJob()` | `--job-id` `--state` | 0 | Close or abort a Salesforce Bulk API v2 ingest job |
| `complete-task` | `salesforce.completeTask()` | `--task-id` | 2 | Marks a task as completed with optional completion notes |
| `composite-graph-action` ·common ·deprecated | `salesforce.compositeGraphAction()` | `--graphs` | 0 | Use post-composite-graph instead |
| `create-account` ·common | `salesforce.createAccount()` | `--name` | 22 | Creates a new account in Salesforce with the specified information |
| `create-bulk-ingest-job` | `salesforce.createBulkIngestJob()` | `--object-type` `--operation` | 5 | Create a Bulk API 2.0 ingest job (POST /jobs/ingest) |
| `create-bulk-query-job` | `salesforce.createBulkQueryJob()` | `--query` | 4 | Create a Bulk API 2.0 query job (POST /jobs/query) for a SOQL query over a large result set |
| `create-campaign` ·common | `salesforce.createCampaign()` | `--name` | 13 | Creates a new campaign in Salesforce |
| `create-campaign-record-via-post` ·deprecated | `salesforce.createCampaignRecordViaPost()` | `--Name` | 35 | Creates a new campaign record in Salesforce; if 'ParentId' is provided, it must be a valid ID of an existing Campaign record, and if 'OwnerId' is provided, it must be a valid ID of an active User |
| `create-contact` ·common | `salesforce.createContact()` | `--last-name` | 15 | Creates a new contact in Salesforce with the specified information |
| `create-custom-field` ·common | `salesforce.createCustomField()` | `--field-api-name` `--field-type` `--label` `--object-api-name` | 16 | Create a custom field on a Salesforce object using the Tooling API |
| `create-custom-object` ·common | `salesforce.createCustomObject()` | `--full-name` `--label` `--name-field` `--plural-label` | 5 | Create a custom object in Salesforce using the Metadata API |
| `create-lead` ·common | `salesforce.createLead()` | `--Company` `--LastName` | 18 | Creates a new lead in Salesforce |
| `create-lead-with-specified-content-type` ·deprecated | `salesforce.createLeadWithSpecifiedContentType()` | `--Company` `--LastName` | 52 | Creates a new Lead in Salesforce, requiring `LastName` and `Company` unless person accounts are enabled and `Company` is null |
| `create-new-contact-with-json-header` ·deprecated | `salesforce.createNewContactWithJsonHeader()` | `--LastName` | 63 | Creates a new Contact in Salesforce; 'LastName' is required, an existing 'AccountId' must be used if provided, and any custom fields (ending with 'c') must be predefined |
| `create-note` | `salesforce.createNote()` | `--parent-id` `--title` | 4 | Creates a new note attached to a Salesforce record with the specified title and content |
| `create-note-record-with-content-type-header` ·deprecated | `salesforce.createNoteRecordWithContentTypeHeader()` | `--Body` `--ParentId` `--Title` | 12 | Creates a new Note record in Salesforce, associated with an existing Salesforce object via `ParentId`, automatically including a `Content-Type: application/json` header |
| `create-opportunity` ·common | `salesforce.createOpportunity()` | `--close-date` `--name` `--stage-name` | 10 | Creates a new opportunity in Salesforce with the specified information |
| `create-opportunity-record` ·deprecated | `salesforce.createOpportunityRecord()` | `--CloseDate` `--Name` `--StageName` | 46 | Creates a new Opportunity record in Salesforce; `Name`, `StageName`, and `CloseDate` are mandatory, and ensure any referenced IDs (e.g., `AccountId`, `CampaignId`) are valid and corresponding… |
| `create-record` | `salesforce.createRecord()` | `--api-name` `--fields` | 2 | Create a Salesforce record using the UI API |
| `create-s-object-record` ·common | `salesforce.createSObjectRecord()` | `--fields` `--sobject-type` | 0 | Create a new Salesforce SObject record |
| `create-sobject-tree` | `salesforce.createSobjectTree()` | `--records` `--sobject-api-name` | 0 | Create one or more sObject trees with root records of the specified type |
| `create-task` | `salesforce.createTask()` | `--subject` | 11 | Creates a new task in Salesforce to track activities, to-dos, and follow-ups related to contacts, leads, or other records |
| `delete-account` ·common | `salesforce.deleteAccount()` | `--account-id` | 0 | Permanently deletes an account from Salesforce |
| `delete-campaign` ·common | `salesforce.deleteCampaign()` | `--campaign-id` | 0 | Permanently deletes a campaign from Salesforce |
| `delete-contact` ·common | `salesforce.deleteContact()` | `--contact-id` | 0 | Permanently deletes a contact from Salesforce |
| `delete-file` ·common | `salesforce.deleteFile()` | `--file-id` | 0 | Permanently delete a file from Salesforce |
| `delete-job-query` | `salesforce.deleteJobQuery()` | `--job-id` | 0 | Delete a Salesforce Bulk API v2 query job |
| `delete-lead` ·common | `salesforce.deleteLead()` | `--lead-id` | 0 | Permanently deletes a lead from Salesforce |
| `delete-lead-object-by-its-id` ·deprecated | `salesforce.deleteLeadObjectByItsId()` | `--id` | 0 | Permanently deletes an existing Lead object from Salesforce using its unique ID |
| `delete-note` | `salesforce.deleteNote()` | `--note-id` | 0 | Permanently deletes a note from Salesforce |
| `delete-opportunity` ·common | `salesforce.deleteOpportunity()` | `--opportunity-id` | 0 | Permanently deletes an opportunity from Salesforce |
| `delete-sobject` | `salesforce.deleteSobject()` | `--id` `--sobject-name` | 0 | Delete a single Salesforce record by its ID |
| `delete-sobject-collections` | `salesforce.deleteSobjectCollections()` | `--ids` | 1 | Delete up to 200 records in one request with optional rollback |
| `execute-global-quick-action` | `salesforce.executeGlobalQuickAction()` | `--action-name` `--record` | 1 | Execute a global (non-object-specific) quick action (POST /quickActions/{actionName}) |
| `execute-invocable-action` | `salesforce.executeInvocableAction()` | `--action-name` `--action-type` `--inputs` | 0 | Invoke any standard or custom invocable action by name (POST /actions/standard/{name} or /actions/custom/{name}) |
| `execute-sobject-quick-action` | `salesforce.executeSobjectQuickAction()` | `--action-name` `--record` `--sobject` | 1 | Execute a specific quick action on an sObject to create records with pre-configured defaults |
| `execute-soql-query` ·deprecated | `salesforce.executeSoqlQuery()` | `--soql-query` | 0 | Use run-soql-query instead |
| `execute-sosl-search` ·common | `salesforce.executeSoslSearch()` | `--q` | 0 | Execute a SOSL search to search across multiple Salesforce objects |
| `fetch-account-by-id-with-query` ·deprecated | `salesforce.fetchAccountByIdWithQuery()` | `--id` | 1 | Use this action to retrieve a Salesforce Account by its unique ID, which must be a valid and existing Salesforce Account ID; you can optionally specify a comma-delimited list of fields to return |
| `get-account` ·common | `salesforce.getAccount()` | `--account-id` | 0 | Retrieves a specific account by ID from Salesforce, returning all available fields |
| `get-all-custom-objects` | `salesforce.getAllCustomObjects()` | — | 3 | Retrieves Salesforce objects (standard and custom) with detailed metadata |
| `get-all-fields-for-object` ·common | `salesforce.getAllFieldsForObject()` | `--object-name` | 0 | Retrieves all fields (standard and custom) for a Salesforce object with complete metadata including field types, constraints, picklist values, and relationships |
| `get-all-navigation-items` | `salesforce.getAllNavigationItems()` | — | 4 | Gets all navigation items (tabs) that the user has access to |
| `get-api` | `salesforce.getApi()` | — | 1 | Discover available REST API resources for a specified Salesforce API version |
| `get-app` | `salesforce.getApp()` | `--app-id` | 1 | Get metadata about a specific Salesforce app by ID |
| `get-apps` | `salesforce.getApps()` | — | 1 | Get metadata for all apps a user has access to |
| `get-batch-of-records` ·common | `salesforce.getBatchOfRecords()` | `--record-ids` | 2 | Retrieve multiple Salesforce records in a single request with customizable field selection |
| `get-campaign` ·common | `salesforce.getCampaign()` | `--campaign-id` | 0 | Retrieves a specific campaign by ID from Salesforce, returning all available fields |
| `get-chatter-resources` | `salesforce.getChatterResources()` | — | 0 | Access Chatter resources directory |
| `get-child-records` | `salesforce.getChildRecords()` | `--record-id` `--relationship-name` | 4 | Get child records for a specified parent record and child relationship name |
| `get-compact-layouts` | `salesforce.getCompactLayouts()` | `--object-list` | 0 | Retrieve compact layout information for multiple Salesforce objects |
| `get-composite-resources` ·common | `salesforce.getCompositeResources()` | — | 0 | Retrieve a list of available composite resources in Salesforce |
| `get-composite-sobjects` ·common | `salesforce.getCompositeSobjects()` | `--fields` `--ids` `--sobject-name` | 0 | Retrieves multiple records of the same object type by IDs with a request body |
| `get-consent-action` | `salesforce.getConsentAction()` | `--action` `--ids` | 0 | Check consent preferences for a SINGLE action (e.g. email, track, fax, phone, solicit, shouldForget) across one or more records (Contact, Lead, User, Person Account, or Individual) |
| `get-contact` ·common | `salesforce.getContact()` | `--contact-id` | 1 | Retrieves a specific contact by ID from Salesforce, returning all available fields |
| `get-contact-by-id` | `salesforce.getContactById()` | `--id` | 1 | Retrieves a Salesforce Contact by its unique ID; the ID must correspond to an existing Contact record in Salesforce |
| `get-dashboard` | `salesforce.getDashboard()` | `--dashboard-id` | 0 | Gets detailed metadata for a specific dashboard including its components, layout, and filters |
| `get-file-content` ·common | `salesforce.getFileContent()` | `--file-id` | 2 | Returns the binary content of a Salesforce file, including references to external files |
| `get-file-information` | `salesforce.getFileInformation()` | `--file-id` | 0 | Retrieve comprehensive metadata and information about a specified file in Salesforce |
| `get-file-shares` | `salesforce.getFileShares()` | `--file-id` | 2 | Returns information about the objects with which the specified file has been shared |
| `get-global-actions` | `salesforce.getGlobalActions()` | — | 3 | Retrieve actions displayed in the Salesforce Global Actions menu with metadata |
| `get-job-failed-record-results` | `salesforce.getJobFailedRecordResults()` | `--job-id` | 2 | Retrieve failed records from a Salesforce Bulk API 2.0 ingest job |
| `get-job-successful-record-results` | `salesforce.getJobSuccessfulRecordResults()` | `--job-id` | 2 | Retrieve successfully processed records from a Salesforce Bulk API 2.0 ingest job |
| `get-job-unprocessed-record-results` | `salesforce.getJobUnprocessedRecordResults()` | `--job-id` | 2 | Retrieve unprocessed records from a Salesforce Bulk API 2.0 ingest job |
| `get-last-selected-app` | `salesforce.getLastSelectedApp()` | — | 1 | Retrieves the app the current user last selected or the app the user sees by default |
| `get-lead` ·common | `salesforce.getLead()` | `--lead-id` | 0 | Retrieves a specific lead by ID from Salesforce, returning all available fields |
| `get-list-view-actions` | `salesforce.getListViewActions()` | `--list-view-id` | 0 | Retrieve header actions on list views |
| `get-list-view-metadata-batch` ·common | `salesforce.getListViewMetadataBatch()` | `--list-view-ids` | 0 | Retrieve metadata for multiple list views in a single batch request |
| `get-list-view-metadata-by-name` | `salesforce.getListViewMetadataByName()` | `--list-view-api-name` `--sobject-api-name` | 0 | Returns list view metadata by object and list view API name |
| `get-list-view-records-by-id` | `salesforce.getListViewRecordsById()` | `--list-view-id` | 5 | Returns record data for a list view by its ID |
| `get-list-view-records-by-name` | `salesforce.getListViewRecordsByName()` | `--list-view-api-name` `--sobject-api-name` | 7 | Retrieves paginated record data for a specified list view using the object and list view API names |
| `get-list-view-results` | `salesforce.getListViewResults()` | `--list-view-id` `--sobject` | 0 | Retrieves the results of a list view for a specified sObject |
| `get-lookup-field-suggestions` | `salesforce.getLookupFieldSuggestions()` | `--field-api-name` `--object-api-name` | 6 | Retrieve lookup field suggestions for editing lookup fields with search filtering |
| `get-lookup-suggestions-case-contact` | `salesforce.getLookupSuggestionsCaseContact()` | `--field-api-name` `--object-api-name` `--source-record` | 5 | Get lookup field suggestions with POST request |
| `get-mru-list-view-metadata` | `salesforce.getMruListViewMetadata()` | `--sobject-api-name` | 0 | Retrieve MRU list view metadata for a Salesforce object |
| `get-mru-list-view-records` | `salesforce.getMruListViewRecords()` | `--sobject-api-name` | 5 | Retrieve record data for an object's most recently used (MRU) list view |
| `get-note` | `salesforce.getNote()` | `--note-id` | 0 | Retrieves a specific note by ID from Salesforce, returning all available fields |
| `get-note-by-id-with-fields` ·deprecated | `salesforce.getNoteByIdWithFields()` | `--id` | 1 | Retrieves a Salesforce Note object by its ID, optionally specifying which fields to return; the Note ID must exist |
| `get-object-list-views` | `salesforce.getObjectListViews()` | `--sobject-api-name` | 0 | Returns a collection of list views associated with a Salesforce object |
| `get-opportunity` ·common | `salesforce.getOpportunity()` | `--opportunity-id` | 1 | Retrieves a specific opportunity by ID from Salesforce, returning all available fields |
| `get-org-limits` ·common | `salesforce.getOrgLimits()` | — | 0 | Retrieve organization limits with max and remaining allocations |
| `get-photo-actions` | `salesforce.getPhotoActions()` | `--record-ids` | 2 | Retrieve available photo actions for Salesforce pages |
| `get-picklist-values-by-record-type` | `salesforce.getPicklistValuesByRecordType()` | `--record-type-id` `--sobject-api-name` | 0 | Get values for all picklist fields of a record type, including dependent picklists |
| `get-query-job-info` | `salesforce.getQueryJobInfo()` | `--job-id` | 0 | Retrieve information about a Salesforce Bulk API v2 query job |
| `get-query-job-results` | `salesforce.getQueryJobResults()` | `--job-id` | 2 | Retrieves results for a completed Bulk API v2 query job in CSV format |
| `get-quick-actions` | `salesforce.getQuickActions()` | — | 0 | Retrieve global and object-specific quick actions from Salesforce |
| `get-record-counts` | `salesforce.getRecordCounts()` | `--sobjects` | 0 | Retrieve total record counts for specified Salesforce objects |
| `get-record-edit-page-actions` | `salesforce.getRecordEditPageActions()` | `--record-ids` | 3 | Get available actions on record edit pages |
| `get-related-list-actions` | `salesforce.getRelatedListActions()` | `--record-ids` `--related-list-ids` | 3 | Get actions on related lists for record detail pages |
| `get-related-list-preferences-batch` ·common | `salesforce.getRelatedListPreferencesBatch()` | `--related-list-ids` | 0 | Get a batch of related list user preferences from Salesforce |
| `get-related-list-records-contacts` | `salesforce.getRelatedListRecordsContacts()` | `--parent-record-id` `--related-list-id` | 6 | Retrieve related list records with request body parameters for filtering and pagination |
| `get-report` | `salesforce.getReport()` | `--report-id` | 0 | Gets detailed metadata for a specific report including its structure, columns, filters, and groupings |
| `get-report-instance` | `salesforce.getReportInstance()` | `--instance-id` `--report-id` | 0 | Gets the results of a report instance created by running a report |
| `get-s-object-quick-action-default-values` | `salesforce.getSObjectQuickActionDefaultValues()` | `--action-name` `--context-id` `--sobject` | 0 | Retrieves default field values for a quick action in a specific record context |
| `get-s-object-record` | `salesforce.getSObjectRecord()` | `--record-id` `--sobject-api-name` | 1 | Retrieve a single Salesforce record by ID from any sObject type |
| `get-s-objects-describe-layouts-record-type-id` | `salesforce.getSObjectsDescribeLayoutsRecordTypeId()` | `--record-type-id` `--sobject` | 0 | Retrieve layout metadata for a specific record type on an object |
| `get-s-objects-updated` | `salesforce.getSObjectsUpdated()` | `--end` `--sobject` `--start` | 0 | Retrieve a list of sObject records that have been updated within a given timeframe |
| `get-search-layout` | `salesforce.getSearchLayout()` | `--object-names` | 0 | Retrieves search result layout information for specified sObjects |
| `get-search-suggestions` | `salesforce.getSearchSuggestions()` | `--channel` `--language` `--q` | 1 | Returns a list of suggested searches based on the user's query string |
| `get-sobject-by-external-id` | `salesforce.getSobjectByExternalId()` | `--field-name` `--field-value` `--sobject` | 1 | Retrieve a Salesforce record by matching an external ID field value |
| `get-sobject-collections` | `salesforce.getSobjectCollections()` | `--fields` `--ids` `--sobject-type` | 1 | Retrieve multiple records of the same sObject type in a single API call |
| `get-sobject-list-view` | `salesforce.getSobjectListView()` | `--list-view-id` `--sobject-name` | 0 | Retrieve basic information about a specific list view for an sObject |
| `get-sobject-list-views` | `salesforce.getSobjectListViews()` | `--sobject-name` | 0 | Retrieve list views for a specified sObject |
| `get-sobject-platformaction` | `salesforce.getSobjectPlatformaction()` | — | 0 | Retrieves metadata description of PlatformAction SObject |
| `get-sobject-quick-action-default-values` | `salesforce.getSobjectQuickActionDefaultValues()` | `--action-name` `--sobject` | 0 | Retrieves default field values for a specific quick action on an sObject |
| `get-sobject-relationship` | `salesforce.getSobjectRelationship()` | `--id` `--relationship-field-name` `--sobject` | 1 | Retrieves records by traversing sObject relationships using friendly URLs |
| `get-sobjects-sobject-describe-approvallayouts` | `salesforce.getSobjectsSobjectDescribeApprovallayouts()` | `--sobject-name` | 0 | Retrieves approval layouts for a specified Salesforce object |
| `get-support` | `salesforce.getSupport()` | — | 0 | Retrieves the root of the Support Knowledge REST API |
| `get-support-knowledge-articles` | `salesforce.getSupportKnowledgeArticles()` | — | 8 | Retrieves user's visible knowledge articles and data categories from Salesforce Knowledge |
| `get-supported-objects-directory` | `salesforce.getSupportedObjectsDirectory()` | — | 1 | Get a Salesforce org's active theme and directory of supported objects |
| `get-theme` | `salesforce.getTheme()` | — | 0 | Get icons and colors for Salesforce UI themes |
| `get-ui-api-actions-lookup-account` | `salesforce.getUiApiActionsLookupAccount()` | — | 4 | Get lookup field actions for a Salesforce object |
| `get-ui-api-actions-record-related-list` | `salesforce.getUiApiActionsRecordRelatedList()` | `--record-id` | 4 | Get available actions on related lists for a record detail page |
| `get-ui-api-apps-user-nav-items` | `salesforce.getUiApiAppsUserNavItems()` | `--app-id` | 4 | Get personalized navigation items for a specific Salesforce app |
| `get-ui-api-list-info-recent` | `salesforce.getUiApiListInfoRecent()` | — | 5 | Get list views for a Salesforce object |
| `get-ui-api-mru-list-records-account` | `salesforce.getUiApiMruListRecordsAccount()` | — | 5 | Get Most Recently Used (MRU) list view records for Account object |
| `get-ui-api-record-ui` | `salesforce.getUiApiRecordUi()` | `--record-ids` | 6 | Retrieve layout, field metadata, and record data in a single response |
| `get-uiapi-actions-mru-list-account` | `salesforce.getUiapiActionsMruListAccount()` | — | 3 | Retrieve header actions available on the MRU (Most Recently Used) list view for a specified Salesforce object |
| `get-uiapi-list-info-account-all-accounts` | `salesforce.getUiapiListInfoAccountAllAccounts()` | — | 0 | Retrieves list view metadata for the Account AllAccounts view using Salesforce UI API |
| `get-uiapi-list-info-account-recent` | `salesforce.getUiapiListInfoAccountRecent()` | — | 2 | Get list view metadata from Salesforce UI API |
| `get-uiapi-list-info-account-search-result` | `salesforce.getUiapiListInfoAccountSearchResult()` | — | 0 | Retrieves list view metadata for the Account SearchResult view using Salesforce UI API |
| `get-uiapi-related-list-preferences` | `salesforce.getUiapiRelatedListPreferences()` | `--object-api-name` `--related-list-id` | 0 | Retrieve user preferences for a specific related list on an object |
| `get-uiapimru-list-info-account` | `salesforce.getUiapimruListInfoAccount()` | — | 0 | Get Most Recently Used (MRU) list view metadata for Account object |
| `get-user-info` | `salesforce.getUserInfo()` | — | 2 | Retrieves information about the current user or a specific user in Salesforce |
| `head-actions-custom` | `salesforce.headActionsCustom()` | — | 1 | Return HTTP headers for custom invocable actions without response body |
| `head-actions-standard` | `salesforce.headActionsStandard()` | — | 2 | Return HTTP headers for standard invocable actions metadata without response body |
| `head-appmenu-salesforce1` | `salesforce.headAppmenuSalesforce1()` | — | 2 | Return HTTP headers for AppMenu Salesforce1 mobile navigation items without response body |
| `head-process-rules-s-object` | `salesforce.headProcessRulesSObject()` | `--sobject` | 0 | Return HTTP headers for process rules of an sObject without retrieving the response body |
| `head-quick-actions` | `salesforce.headQuickActions()` | — | 0 | Return HTTP headers for Quick Actions resource without response body |
| `head-sobject-quick-action-default-values` | `salesforce.headSobjectQuickActionDefaultValues()` | `--action-name` `--context-id` `--sobject-type` | 2 | Return HTTP headers for sObject quick action default values by context ID without response body |
| `head-sobjects-global-describe-layouts` | `salesforce.headSobjectsGlobalDescribeLayouts()` | — | 2 | Return HTTP headers for all global publisher layouts without response body |
| `head-sobjects-quick-action` | `salesforce.headSobjectsQuickAction()` | `--action-name` `--sobject-type` | 2 | Return HTTP headers for a specific sObject quick action without response body |
| `head-sobjects-user-password` | `salesforce.headSobjectsUserPassword()` | `--user-id` | 0 | Return HTTP headers for User password resource without response body |
| `list-accounts` | `salesforce.listAccounts()` | — | 1 | Lists accounts from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-analytics-templates` | `salesforce.listAnalyticsTemplates()` | — | 4 | List CRM Analytics templates available in the org |
| `list-campaigns` | `salesforce.listCampaigns()` | — | 1 | Lists campaigns from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-contacts` | `salesforce.listContacts()` | — | 1 | Lists contacts from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-custom-invocable-actions` | `salesforce.listCustomInvocableActions()` | — | 0 | Retrieves the list of custom actions including Flow actions, Apex actions, and invocable processes |
| `list-dashboards` | `salesforce.listDashboards()` | — | 0 | Lists dashboards with basic metadata including name, ID, and URLs |
| `list-email-templates` | `salesforce.listEmailTemplates()` | — | 8 | Lists available email templates in Salesforce with filtering and search capabilities |
| `list-leads` | `salesforce.listLeads()` | — | 1 | Lists leads from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-notes` | `salesforce.listNotes()` | — | 1 | Lists notes from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-opportunities` | `salesforce.listOpportunities()` | — | 1 | Lists opportunities from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-pricebook-entries` | `salesforce.listPricebookEntries()` | — | 1 | Lists pricebook entries from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-pricebooks` | `salesforce.listPricebooks()` | — | 1 | Lists pricebooks from Salesforce using SOQL query, allowing flexible filtering, sorting, and field selection |
| `list-reports` | `salesforce.listReports()` | — | 0 | Lists reports with basic metadata including name, ID, and URLs |
| `list-standard-invocable-actions` | `salesforce.listStandardInvocableActions()` | — | 0 | Retrieves the list of standard actions that can be statically invoked |
| `log-call` | `salesforce.logCall()` | — | 9 | Logs a completed phone call as a task in Salesforce with call-specific details like duration, type, and disposition |
| `log-email-activity` | `salesforce.logEmailActivity()` | `--from-address` `--related-to-id` `--subject` `--to-address` | 11 | Creates an EmailMessage record to log email activity in Salesforce, associating it with related records |
| `mass-transfer-ownership` | `salesforce.massTransferOwnership()` | `--new-owner-id` `--object-type` `--record-ids` | 1 | Transfers ownership of multiple records to a new owner in a single operation using Salesforce's composite API for better performance |
| `parameterized-search` | `salesforce.parameterizedSearch()` | `--q` | 8 | Execute RESTful search using parameters instead of SOSL clause |
| `patch-composite-sobjects` ·common | `salesforce.patchCompositeSobjects()` | `--external-id-field-name` `--records` `--sobject-name` | 1 | Upsert up to 200 records using external ID field matching |
| `post-composite-graph` ·common | `salesforce.postCompositeGraph()` | `--graphs` | 0 | Execute multiple related REST API requests in a single transactional call with up to 500 subrequests per graph |
| `post-composite-sobjects` ·common | `salesforce.postCompositeSobjects()` | `--records` | 1 | Create up to 200 records in one request using sObject Collections |
| `post-parameterized-search` | `salesforce.postParameterizedSearch()` | `--q` | 7 | Execute parameterized search across Salesforce objects with advanced filtering |
| `query` ·common ·deprecated | `salesforce.query()` | `--q` | 0 | Use run-soql-query instead |
| `query-all` | `salesforce.queryAll()` | `--query` | 0 | Execute SOQL queries including soft-deleted and archived records |
| `query-contacts-by-name` ·deprecated | `salesforce.queryContactsByName()` | `--contact-name` | 2 | Finds Salesforce Contact records by name using a case-insensitive search |
| `query-more` | `salesforce.queryMore()` | `--next-records-url` | 0 | Retrieve the next page of SOQL results using a query locator (GET /query/{queryLocator}) |
| `query-report` ·deprecated | `salesforce.queryReport()` | `--id` `--reportFormat` `--reportType` | 29 | Executes a Salesforce report synchronously by its `id` and `reportType`, optionally with dynamic ad-hoc adjustments like filters or groupings, and returns its data without modifying the saved report |
| `remove-account-by-unique-identifier` ·deprecated | `salesforce.removeAccountByUniqueIdentifier()` | `--id` | 0 | Deletes an existing Salesforce Account using its unique ID, returning an empty response on success (HTTP 204) |
| `remove-campaign-object-by-id` ·deprecated | `salesforce.removeCampaignObjectById()` | `--id` | 0 | Permanently deletes a specific Campaign SObject in Salesforce using its unique ID |
| `remove-from-campaign` | `salesforce.removeFromCampaign()` | `--campaign-id` | 2 | Removes a lead or contact from a campaign by deleting the CampaignMember record |
| `remove-note-object-by-id` ·deprecated | `salesforce.removeNoteObjectById()` | `--id` | 0 | Permanently deletes an existing Salesforce Note object identified by its unique ID |
| `remove-opportunity-by-id` ·deprecated | `salesforce.removeOpportunityById()` | `--id` | 0 | Permanently deletes an existing Salesforce Opportunity by its ID; if the Opportunity does not exist, a 'not found' (404) error occurs |
| `remove-specific-contact-by-id` ·deprecated | `salesforce.removeSpecificContactById()` | `--id` | 0 | Permanently deletes a specific Contact from Salesforce using its unique ID, which must correspond to an existing record |
| `retrieve-account-data-and-error-responses` ·deprecated | `salesforce.retrieveAccountDataAndErrorResponses()` | — | 0 | Retrieves comprehensive metadata for the Salesforce Account sObject, detailing its properties, recent records, and related resource URLs |
| `retrieve-campaign-data-with-error-handling` ·deprecated | `salesforce.retrieveCampaignDataWithErrorHandling()` | — | 0 | Retrieves comprehensive information and metadata for the Salesforce Campaign sObject, provided it is enabled and accessible in the organization, and features robust error handling |
| `retrieve-contact-info-with-standard-responses` ·deprecated | `salesforce.retrieveContactInfoWithStandardResponses()` | — | 0 | Retrieves comprehensive metadata (e.g., fields, data types, picklist values) for the Salesforce Contact SObject; this action does not retrieve individual contact records |
| `retrieve-lead-by-id` | `salesforce.retrieveLeadById()` | `--id` | 2 | Retrieves details for a Salesforce Lead by its ID; the specified Lead ID must exist in Salesforce |
| `retrieve-lead-data-with-various-responses` ·deprecated | `salesforce.retrieveLeadDataWithVariousResponses()` | — | 0 | Retrieves Lead sObject data from Salesforce, such as recently viewed leads or general Lead object information |
| `retrieve-note-object-information` ·deprecated | `salesforce.retrieveNoteObjectInformation()` | — | 0 | Retrieves comprehensive metadata for the Salesforce 'Note' SObject, if it is enabled and accessible, to understand its structure and capabilities |
| `retrieve-opportunities-data` | `salesforce.retrieveOpportunitiesData()` | — | 0 | Retrieves all available Opportunity records, representing potential revenue-generating deals, from Salesforce |
| `retrieve-opportunity-by-id-with-optional-fields` ·deprecated | `salesforce.retrieveOpportunityByIdWithOptionalFields()` | `--id` | 1 | Retrieves a Salesforce Opportunity by its ID; the Opportunity ID must exist |
| `retrieve-specific-campaign-object-details` ·deprecated | `salesforce.retrieveSpecificCampaignObjectDetails()` | `--id` | 1 | Retrieves details for a specific Salesforce Campaign object by its ID, optionally limiting to specified fields; the Campaign object must exist |
| `retrieve-specific-contact-by-id` | `salesforce.retrieveSpecificContactById()` | `--id` | 1 | (DEPRECATED: use `get-contact-by-id`) Retrieves a Salesforce Contact by its unique ID; the ID must correspond to an existing Contact record in Salesforce |
| `run-report` | `salesforce.runReport()` | `--report-id` | 0 | Runs a report synchronously (GET /analytics/reports/{id}?includeDetails=true) and returns the results in one call |
| `run-report-async` | `salesforce.runReportAsync()` | `--report-id` | 2 | Run a Salesforce report asynchronously (POST /analytics/reports/{id}/instances) |
| `run-soql-query` ·common | `salesforce.runSoqlQuery()` | `--query` | 0 | Executes a SOQL query against Salesforce data |
| `search` ·common ·deprecated | `salesforce.search()` | `--q` | 0 | Use execute-sosl-search instead |
| `search-accounts` | `salesforce.searchAccounts()` | — | 10 | Search for Salesforce accounts using criteria like name, industry, type, location, or contact information |
| `search-campaigns` | `salesforce.searchCampaigns()` | — | 8 | Search for Salesforce campaigns using multiple criteria like name, type, status, date range, or active status |
| `search-contacts` | `salesforce.searchContacts()` | — | 7 | Search Salesforce Contact records (not Leads, use search-leads for those) using name, email, phone, account, or title |
| `search-knowledge-articles` | `salesforce.searchKnowledgeArticles()` | `--language` `--publishStatus` `--q` | 4 | Search for Salesforce Knowledge articles with titles matching the search query |
| `search-leads` | `salesforce.searchLeads()` | — | 9 | Search for Salesforce leads using criteria like name, email, phone, company, title, status, or lead source |
| `search-notes` | `salesforce.searchNotes()` | — | 9 | Search for Salesforce notes using multiple criteria like title, body content, parent record, owner, or creation date |
| `search-opportunities` | `salesforce.searchOpportunities()` | — | 12 | Search for Salesforce opportunities using multiple criteria like name, account, stage, amount, close date, or status |
| `search-tasks` | `salesforce.searchTasks()` | — | 11 | Search for Salesforce tasks using multiple criteria like subject, status, priority, assigned user, related records, or dates |
| `send-email` | `salesforce.sendEmail()` | `--body` `--subject` `--to-addresses` | 10 | Sends an email through Salesforce with options for recipients, attachments, and activity logging |
| `send-email-from-template` | `salesforce.sendEmailFromTemplate()` | `--recipient-id` `--template-id` | 9 | Sends an email using a predefined Salesforce email template with merge field support |
| `send-mass-email` | `salesforce.sendMassEmail()` | `--recipient-ids` | 8 | Sends an email to each recipient immediately and irreversibly, using a template or custom subject/body (requires either a valid template_id or both subject and body) |
| `set-user-password` | `salesforce.setUserPassword()` | `--user-id` | 1 | Set or reset a Salesforce user's password |

## Triggers

`salesforce.on("<event>", handler)` in a script; required config goes before the handler as an object.

| Event | Name | Required config | Description |
|---|---|---|---|
| `"account-created-or-updated"` | Account Created or Updated | — | Triggers when an Account is created or updated in Salesforce |
| `"contact-updated"` | Contact Updated | — | Triggers when an existing Salesforce Contact record is modified |
| `"generic-s-object-record-updated"` | Record Updated (Generic SObject) | `sobject_name` | Triggers when monitored fields change on any Salesforce SObject |
| `"new-contact"` | New Contact Trigger | — | Triggers when a new Contact is Created in Salesforce |
| `"new-lead"` | New Lead Trigger | — | Triggers when a new Lead is created in Salesforce |
| `"new-or-updated-opportunity"` | New or Updated Opportunity | — | Triggers when a Salesforce Opportunity is created or updated |
| `"task-created-or-completed"` | Task Created or Completed | — | Triggers when a Task is created or when its status changes to Completed in Salesforce |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
