Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Oct 29, 2025

Resolves #18880

  • Get Record by ID - added
  • Update Record - already implemented
  • Upsert Record - already implemented
  • List Object Fields - added

Summary by CodeRabbit

  • New Features

    • Get Record by ID — retrieve a Salesforce record by its ID.
    • List Object Fields — list all fields for a chosen object type, with optional filtering for custom fields only.
  • Chores

    • Package version updated to v1.10.0.

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 29, 2025 6:39pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 29, 2025 6:39pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

Two new Salesforce REST API action components were added: Get Record by ID (fetches a record using a constructed SOQL query) and List Object Fields (retrieves and optionally filters object fields). The package version for @pipedream/salesforce_rest_api was bumped from 1.9.2 to 1.10.0.

Changes

Cohort / File(s) Summary
Get Record by ID action
components/salesforce_rest_api/actions/get-record-by-id/get-record-by-id.mjs
New action exporting metadata, props (salesforce, sobjectType, recordId, fieldsToObtain) and a run method that normalizes fieldsToObtain, builds a SOQL SELECT ... FROM <sobjectType> WHERE Id = '<recordId>', calls this.salesforce.query, exports a summary, and returns the first record.
List Object Fields action
components/salesforce_rest_api/actions/list-object-fields/list-object-fields.mjs
New action exporting metadata, props (salesforce, sobjectType, optional customOnly) and a run method that calls this.salesforce.getFieldsForObjectType(this.sobjectType), optionally filters to custom fields when customOnly is true, exports a summary, and returns the field list.
Package version bump
components/salesforce_rest_api/package.json
version updated from 1.9.2 to 1.10.0.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GetRecordAction as Get Record by ID
    participant Salesforce

    User->>GetRecordAction: invoke(sobjectType, recordId, fieldsToObtain)
    GetRecordAction->>GetRecordAction: normalize fieldsToObtain
    GetRecordAction->>GetRecordAction: build SOQL query
    GetRecordAction->>Salesforce: query({ $, query })
    Salesforce-->>GetRecordAction: records[]
    GetRecordAction->>GetRecordAction: export "$summary"
    GetRecordAction-->>User: return records[0]
Loading
sequenceDiagram
    participant User
    participant ListFieldsAction as List Object Fields
    participant Salesforce

    User->>ListFieldsAction: invoke(sobjectType, customOnly)
    ListFieldsAction->>Salesforce: getFieldsForObjectType(sobjectType)
    Salesforce-->>ListFieldsAction: fields[]
    alt customOnly = true
        ListFieldsAction->>ListFieldsAction: filter fields to custom
    end
    ListFieldsAction->>ListFieldsAction: export "$summary"
    ListFieldsAction-->>User: return fields[]
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to SOQL construction in get-record-by-id for injection/escaping issues.
  • Verify behavior when queries return empty arrays or errors (both new actions have minimal error handling).
  • Check fieldsToObtain normalization and edge cases (empty string, null, invalid field names).
  • Note the summary typo in get-record-by-id: "Sucessfully" → "Successfully".

Poem

🐇 I hopped through schemas, fetched a record by its name,
I listed object fields — custom ones to claim,
A query built with care, a summary to show,
Two small actions ready — off we hop, off we go! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not follow the required template structure specified in the repository. The template requires a "## WHY" section to explain the motivation and reasoning for the changes, but the provided description contains only a list of which actions were added versus already implemented. While the description does link to the issue and provides relevant information about the changes, it fails to include the mandatory template section that explains the purpose and context of these additions.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Salesforce - new actions" clearly and concisely summarizes the main change—the addition of new Salesforce REST API action components. The title is specific enough to convey the purpose of the changeset without being overly verbose, and it accurately reflects that new actions have been introduced to the Salesforce integration. While it doesn't name each specific action added, this level of detail is not expected in a PR title.
Linked Issues Check ✅ Passed The pull request successfully implements the primary new coding requirements from issue #18880. Two of the four requested Salesforce operations are added: Get Record by ID [#18880] and List Object Fields, which satisfies the requirement to list custom fields for an object [#18880]. The PR description acknowledges that Update Record and Upsert Record were already implemented, indicating the issue is resolved with all four operations now available for use. The changes directly align with the API documentation references provided in the linked issue.
Out of Scope Changes Check ✅ Passed All changes in this pull request are directly related to the requirements specified in issue #18880. The two new action files (get-record-by-id.mjs and list-object-fields.mjs) implement the requested Salesforce operations, and the package.json version bump from 1.9.2 to 1.10.0 is a supporting change for releasing the new functionality. No unrelated or out-of-scope modifications are present in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-18880

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f493c1 and 090078f.

📒 Files selected for processing (1)
  • components/salesforce_rest_api/actions/list-object-fields/list-object-fields.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/salesforce_rest_api/actions/list-object-fields/list-object-fields.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e69925 and 6f493c1.

📒 Files selected for processing (3)
  • components/salesforce_rest_api/actions/get-record-by-id/get-record-by-id.mjs (1 hunks)
  • components/salesforce_rest_api/actions/list-object-fields/list-object-fields.mjs (1 hunks)
  • components/salesforce_rest_api/package.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/salesforce_rest_api/actions/get-record-by-id/get-record-by-id.mjs (1)
components/twenty/actions/create-update-delete-record/create-update-delete-record.mjs (1)
  • recordId (42-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @michelle0927, LGTM! Ready for QA!

@vunguyenhung
Copy link
Collaborator

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@vunguyenhung vunguyenhung merged commit 0e9a4e4 into master Nov 4, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the issue-18880 branch November 4, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Salesforce

4 participants