-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add list sales order items action to Returnless integration #18276
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
Add list sales order items action to Returnless integration #18276
Conversation
- New action component to retrieve items from specific sales orders - Implements cursor-based pagination using existing app methods - Follows existing patterns from list-sales-orders action - Uses orderId and maxResults prop definitions from app file - Increment package version from 0.1.0 to 0.1.1 Features: - Lists all items for a given sales order ID - Supports pagination with configurable max results - Returns structured item data with id, external_id, quantity, amounts - Includes helpful summary with item count and order ID 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughIntroduces a new Returnless action to list sales order items with cursor-based pagination and updates the Returnless component package version from 0.1.0 to 0.1.1. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant A as Pipedream Action<br/>(returnless-list-sales-order-items)
participant R as Returnless API
U->>A: Run action with orderId, maxResults
rect rgba(200,230,255,0.25)
note right of A: Cursor-based pagination
loop until no next cursor or maxResults reached
A->>R: listSalesOrderItems(orderId, cursor?)
R-->>A: items[], nextCursor?
A->>A: Accumulate items, advance cursor
end
end
A-->>U: Return aggregated items
note over A,U: Exports summary "Retrieved N sales order item(s) from order <orderId>"
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (3)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
.claude/zendesk-assignee-learnings.md (1)
1-165: Scope: consider excluding or relocating this Zendesk learnings doc from a Returnless PR.Optional: move to a docs/ or .notes/ directory in a separate PR to keep changes focused.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.claude/zendesk-assignee-learnings.md(1 hunks)components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs(1 hunks)components/returnless/package.json(1 hunks)
🧰 Additional context used
🪛 LanguageTool
.claude/zendesk-assignee-learnings.md
[grammar] ~3-~3: There might be a mistake here.
Context: ...ementation Learnings ## Project Summary Added assignee support to Zendesk update...
(QB_NEW_EN)
[grammar] ~4-~4: There might be a mistake here.
Context: ... Project Summary Added assignee support to Zendesk update-ticket component allowin...
(QB_NEW_EN)
[grammar] ~8-~8: There might be a mistake here.
Context: ... Details ### 1. Zendesk API Integration - API Fields Used: assignee_id (intege...
(QB_NEW_EN)
[grammar] ~9-~9: There might be a mistake here.
Context: ...nd assignee_email (string, write-only) - API Endpoint: PUT `/tickets/{ticketId}...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ...ng, write-only) - API Endpoint: PUT /tickets/{ticketId} - API Documentation: https://developer.z...
(QB_NEW_EN)
[grammar] ~47-~47: There might be a mistake here.
Context: ...## 3. Pipedream Component Best Practices - Prop Definitions: Centralize in app fi...
(QB_NEW_EN)
[grammar] ~48-~48: There might be a mistake here.
Context: ...n app file, reference in components via propDefinition - Backward Compatibility: Always make ne...
(QB_NEW_EN)
[grammar] ~49-~49: There might be a mistake here.
Context: ...bility**: Always make new props optional - Dynamic Options: Use async options wit...
(QB_NEW_EN)
[grammar] ~50-~50: There might be a mistake here.
Context: ...tions with pagination for large datasets - API Field Mapping: Use exact API field...
(QB_NEW_EN)
[grammar] ~51-~51: There might be a mistake here.
Context: ...PI field names (snake_case vs camelCase) - User Feedback: Enhance summary message...
(QB_NEW_EN)
[grammar] ~86-~86: There might be a mistake here.
Context: ... )" ``` ### Conflict Resolution Pattern - Common Conflict: Merge conflicts in ti...
(QB_NEW_EN)
[grammar] ~87-~87: There might be a mistake here.
Context: ...ge conflicts in ticket data construction - Resolution Strategy: Keep new function...
(QB_NEW_EN)
[grammar] ~88-~88: There might be a mistake here.
Context: ...nality while preserving upstream changes - Testing: Always verify syntax with `no...
(QB_NEW_EN)
[grammar] ~104-~104: There might be a mistake here.
Context: ...onstants ``` ### PropDefinition Pattern 1. Define in zendesk.app.mjs with async o...
(QB_NEW_EN)
[grammar] ~106-~106: There might be a mistake here.
Context: ...ropdowns 2. Reference in components via propDefinition: [app, "propName"] 3. Extract in component's run() method 4....
(QB_NEW_EN)
[grammar] ~130-~130: There might be a mistake here.
Context: ...iples ### 1. Feature Addition Checklist - [ ] Add propDefinitions to app file - [ ...
(QB_NEW_EN)
[grammar] ~131-~131: There might be a mistake here.
Context: ...st - [ ] Add propDefinitions to app file - [ ] Add props to component - [ ] Extract...
(QB_NEW_EN)
[grammar] ~132-~132: There might be a mistake here.
Context: ...to app file - [ ] Add props to component - [ ] Extract props in run() method - [ ...
(QB_NEW_EN)
[grammar] ~133-~133: There might be a mistake here.
Context: ...nent - [ ] Extract props in run() method - [ ] Conditionally include in API payload...
(QB_NEW_EN)
[grammar] ~134-~134: There might be a mistake here.
Context: ...[ ] Conditionally include in API payload - [ ] Update summary messages - [ ] Test s...
(QB_NEW_EN)
[grammar] ~135-~135: There might be a mistake here.
Context: ...PI payload - [ ] Update summary messages - [ ] Test syntax validation - [ ] Verify ...
(QB_NEW_EN)
[grammar] ~136-~136: There might be a mistake here.
Context: ...ry messages - [ ] Test syntax validation - [ ] Verify backward compatibility ### 2...
(QB_NEW_EN)
[grammar] ~139-~139: There might be a mistake here.
Context: ...y ### 2. User Experience Considerations - Optional Props: Never break existing w...
(QB_NEW_EN)
[grammar] ~149-~149: There might be a mistake here.
Context: ...: Integer, agent ID to assign ticket to - assignee_email`: String (write-only), agent email for a...
(QB_NEW_EN)
[grammar] ~150-~150: There might be a mistake here.
Context: ...(write-only), agent email for assignment - Both fields are optional and can be used...
(QB_NEW_EN)
[grammar] ~154-~154: There might be a mistake here.
Context: ...issions ### Pipedream Platform Patterns - Use propDefinition for reusable props ...
(QB_NEW_EN)
[grammar] ~160-~160: There might be a mistake here.
Context: ...lds ## Future Enhancement Opportunities 1. Group Assignment: Add group_id suppo...
(QB_NEW_EN)
⏰ 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: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/returnless/package.json (1)
3-3: Semver bump looks good.No dependency changes; safe to publish as 0.1.1.
components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs (4)
1-1: Import path looks correct relative to the action directory.
4-9: Action metadata aligns with existing conventions.Key/name/description/version/type all look consistent.
34-37: Nice summary and pluralization.Clear UX; includes orderId and item count.
24-33: getPaginatedResources usage is correct. It accepts{ fn, args, max }andlistSalesOrderItemsreturns the expected{ data, meta }shape for pagination.
components/returnless/actions/list-sales-order-items/list-sales-order-items.mjs
Show resolved
Hide resolved
- Add missing newline at end of list-sales-order-items.mjs - Resolves 'Newline required at end of file but not found' lint error
- Remove .claude/zendesk-assignee-learnings.md that was accidentally included - Keep only returnless-related changes in this PR
|
@michelle0927 can I also request a review here :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! LGTM! Ready for QA.
|
Hi everyone, all test cases are passed! Ready for release! |
Summary
Changes Made
New Component:
list-sales-order-itemsreturnless-list-sales-order-itemsorderIdandmaxResultspropDefinitionslistSalesOrderItemsmethod from app filegetPaginatedResourceshelperPackage Update
0.1.0→0.1.1Features
✅ Cursor-based pagination - Efficiently handles large result sets
✅ Proper prop definitions - Reuses existing orderId dropdown and maxResults
✅ Error handling - Inherits robust error handling from app infrastructure
✅ Consistent patterns - Follows same structure as
list-sales-ordersaction✅ API compliant - Uses documented Returnless API endpoint
API Integration
GET /sales-orders/{orderId}/itemsUsage Example
Users can now:
Summary by CodeRabbit
New Features
Chores