Skip to content

17714 kustomer #17814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

17714 kustomer #17814

wants to merge 2 commits into from

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Jul 25, 2025

Resolves #17714

Summary by CodeRabbit

  • New Features

    • Added actions to retrieve, list, and update Kustomer custom objects by ID or external ID.
    • Enhanced integration with new options for selecting custom object classes and IDs.
  • Bug Fixes

    • Incremented version numbers for several actions and sources to ensure up-to-date components.
  • Chores

    • Updated package dependencies and overall component version for improved compatibility.

Actions
 - Get Custom Objects
 - Get Custom Object by ID
 - Get Custom Object by External ID
 - Update Custom Object by ID
@luancazarine luancazarine linked an issue Jul 25, 2025 that may be closed by this pull request
Copy link

vercel bot commented Jul 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Jul 25, 2025 9:27pm
pipedream-docs ⬜️ Ignored (Inspect) Jul 25, 2025 9:27pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 25, 2025 9:27pm

Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

This update introduces four new Kustomer actions for managing custom objects: retrieving by ID, by external ID, listing, and updating by ID. Supporting methods and property definitions are added to the Kustomer app module. Additionally, several existing actions and sources receive a version bump, and the package version and a dependency are updated.

Changes

File(s) Change Summary
components/kustomer/actions/create-conversation/create-conversation.mjs
components/kustomer/actions/create-customer/create-customer.mjs
components/kustomer/actions/update-conversation/update-conversation.mjs
components/kustomer/actions/update-customer/update-customer.mjs
components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs
components/kustomer/sources/new-customer-instant/new-customer-instant.mjs
components/kustomer/sources/new-message-instant/new-message-instant.mjs
components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs
components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs
Incremented version numbers from 0.0.1 to 0.0.2; no logic or functional changes.
components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs Added new action to retrieve a custom object by external ID.
components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs Added new action to retrieve a custom object by ID.
components/kustomer/actions/get-custom-objects/get-custom-objects.mjs Added new action to list custom objects by class name and optional date filter.
components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs Added new action to update a custom object by ID.
components/kustomer/kustomer.app.mjs Added prop definitions and methods for handling Kustomer custom objects (list, get, update).
components/kustomer/package.json Bumped package version to 0.2.0 and updated @pipedream/platform dependency to ^3.1.0.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Action
    participant KustomerApp
    participant KustomerAPI

    User->>Action: Trigger action (get/list/update custom object)
    Action->>KustomerApp: Call method (e.g., getCustomObjectById)
    KustomerApp->>KustomerAPI: Make API request (GET/PUT)
    KustomerAPI-->>KustomerApp: Return response
    KustomerApp-->>Action: Return processed data
    Action-->>User: Return result or error
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Suggested reviewers

  • GTFalcao

Poem

A hop and a leap, new actions appear,
Custom objects in Kustomer now crystal clear.
With version bumps tidy and features anew,
The rabbit reviewed, and so should you!
🐇✨

Code grows in the garden, neat and precise—
Hop in and review, don’t think twice!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/kustomer/actions/create-customer/create-customer.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/kustomer/actions/create-conversation/create-conversation.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

  • 11 others

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 17714-kustomer

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dae0a6a and ededdae.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • components/kustomer/actions/create-conversation/create-conversation.mjs (1 hunks)
  • components/kustomer/actions/create-customer/create-customer.mjs (1 hunks)
  • components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (1 hunks)
  • components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs (1 hunks)
  • components/kustomer/actions/get-custom-objects/get-custom-objects.mjs (1 hunks)
  • components/kustomer/actions/update-conversation/update-conversation.mjs (1 hunks)
  • components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs (1 hunks)
  • components/kustomer/actions/update-customer/update-customer.mjs (1 hunks)
  • components/kustomer/kustomer.app.mjs (2 hunks)
  • components/kustomer/package.json (2 hunks)
  • components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs (1 hunks)
  • components/kustomer/sources/new-customer-instant/new-customer-instant.mjs (1 hunks)
  • components/kustomer/sources/new-message-instant/new-message-instant.mjs (1 hunks)
  • components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs (1 hunks)
  • components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (12)
components/kustomer/actions/update-customer/update-customer.mjs (1)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs (2)

Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs, when processing items in getAndProcessData, savedIds is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

components/kustomer/package.json (1)

Learnt from: jcortes
PR: #14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like fs to package.json dependencies, as they are native modules provided by the Node.js runtime.

components/kustomer/actions/update-conversation/update-conversation.mjs (1)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

components/kustomer/actions/create-customer/create-customer.mjs (1)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

components/kustomer/sources/new-message-instant/new-message-instant.mjs (1)

Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

components/kustomer/sources/new-customer-instant/new-customer-instant.mjs (1)

Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

components/kustomer/actions/create-conversation/create-conversation.mjs (1)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs (1)

Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

components/kustomer/actions/get-custom-objects/get-custom-objects.mjs (2)

Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members action, the correct format is Successfully retrieved ${response.data.length} members.

Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members action, the correct format is Successfully retrieved ${response.data.length} members.

components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (3)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members action, the correct format is Successfully retrieved ${response.data.length} members.

Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members action, the correct format is Successfully retrieved ${response.data.length} members.

components/kustomer/kustomer.app.mjs (3)

Learnt from: GTFalcao
PR: #16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta and getEventType to enforce implementation in subclasses.

Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta and getEventType to enforce implementation in subclasses.

🧬 Code Graph Analysis (1)
components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs (1)
components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (1)
  • response (26-30)
⏰ 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: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (23)
components/kustomer/kustomer.app.mjs (7)

130-150: LGTM! The klassName propDefinition follows established patterns.

The implementation correctly follows the existing pattern for async options with proper pagination parameters and data mapping. The destructuring of attributes: { name: value, displayName: label } appropriately maps the API response structure.


151-172: LGTM! The customObjectId propDefinition correctly depends on klassName.

The implementation properly handles the dependency on klassName parameter and follows the established pagination pattern. The data mapping using attributes: { title: label } is appropriate for custom objects.


373-378: LGTM! The listKlasses method follows the established pattern.

The implementation is consistent with other list methods in the module, using the correct path /klasses and following the same _makeRequest pattern.


379-386: LGTM! The listCustomObjects method correctly handles the nested resource structure.

The method properly destructures the klassName parameter and constructs the correct path /klasses/${klassName} for the nested resource. The parameter handling follows established patterns.


387-396: LGTM! The getCustomObjectById method correctly implements the nested resource path.

The method properly handles both klassName and customObjectId parameters to construct the correct path /klasses/${klassName}/${customObjectId}. The parameter destructuring and path construction are appropriate.


397-406: LGTM! The getCustomObjectByExternalId method uses the correct API path format.

The method correctly constructs the path /klasses/${klassName}/externalId=${externalId} which appears to follow the Kustomer API convention for external ID lookups. Parameter handling is consistent with other methods.


407-417: LGTM! The updateCustomObjectById method correctly implements the PUT operation.

The method properly uses the PUT HTTP method and constructs the correct nested resource path. The parameter destructuring follows the established pattern used throughout the module.

components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs (1)

9-9: LGTM! Version increment aligns with package updates.

The version bump from "0.0.1" to "0.0.2" is consistent with the package version increment and other component updates in this PR.

components/kustomer/package.json (2)

3-3: LGTM! Minor version bump appropriately reflects new custom object features.

The version increment from "0.1.0" to "0.2.0" correctly follows semantic versioning for the addition of new custom object functionality.


16-16: LGTM! Platform dependency update follows semantic versioning.

The update from "^3.0.3" to "^3.1.0" is a reasonable minor version update that should maintain compatibility while potentially providing new features.

components/kustomer/sources/new-message-instant/new-message-instant.mjs (1)

9-9: LGTM! Version increment maintains consistency across components.

The version bump from "0.0.1" to "0.0.2" is consistent with other source components in this PR and aligns with the overall package update strategy.

components/kustomer/actions/update-conversation/update-conversation.mjs (1)

10-10: LGTM! Version increment maintains consistency across action components.

The version bump from "0.0.1" to "0.0.2" is consistent with other action components in this PR and follows the coordinated version update strategy.

components/kustomer/actions/create-conversation/create-conversation.mjs (1)

10-10: Version bump looks good

No functional changes detected. 👍

components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs (1)

9-9: Aligned version increment

Consistent with other components in this release. ✔️

components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs (1)

9-9: Version update acknowledged

Matches the coordinated 0.0.2 rollout. ✅

components/kustomer/actions/update-customer/update-customer.mjs (1)

10-10: Semantic version bump accepted

No code changes beyond metadata. Looks good. 🟢

components/kustomer/sources/new-customer-instant/new-customer-instant.mjs (1)

9-9: Minor version bump OK

Consistent with the rest of the Kustomer package. 👍

components/kustomer/actions/create-customer/create-customer.mjs (1)

10-10: LGTM! Version bump aligns with the broader integration update.

The version increment from "0.0.1" to "0.0.2" is appropriate and maintains consistency with other Kustomer components being updated in this PR.

components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs (1)

1-42: Well-structured action implementation with robust error handling.

The action follows Pipedream conventions well:

  • Proper use of ConfigurationError for API errors
  • Dynamic property definitions with klassName dependency
  • Clear summary message formatting
  • Consistent API method call pattern

The implementation looks solid and follows patterns established by similar actions in the codebase.

components/kustomer/actions/get-custom-objects/get-custom-objects.mjs (1)

1-41: Excellent implementation with proper summary formatting.

The action is well-implemented with:

  • Clear ISO 8601 date format specification for the fromDate parameter
  • Proper error handling consistent with other actions
  • Correct summary message format that follows established patterns (using response.data.length)
  • Good use of optional filtering parameter

The implementation aligns with best practices and retrieved learnings about summary message formatting.

components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (1)

1-38: Consistent implementation with appropriate design choices.

The action maintains consistency with the "by-id" variant while making appropriate design decisions:

  • Uses static string input for externalId (appropriate for user-provided identifiers)
  • Maintains the same error handling and summary message patterns
  • Proper use of the klassName propDefinition for class selection

The implementation is clean and follows established patterns.

components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs (2)

1-97: Comprehensive update action with proper JSON handling.

The action provides extensive update capabilities with:

  • Comprehensive set of optional update fields (externalId, title, description, data, custom, tags, rev)
  • Proper use of parseObject utility for JSON fields to safely handle string inputs
  • Appropriate mix of propDefinitions and static property definitions
  • Consistent error handling and summary message patterns

The implementation handles the complexity of update operations well while maintaining code clarity.


84-86: Good practice: Safe JSON parsing for object fields.

The use of parseObject() for the data, custom, and tags fields ensures safe handling of JSON string inputs while gracefully handling cases where the values might already be objects.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

Kustomer
2 participants