-
Notifications
You must be signed in to change notification settings - Fork 187
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
[SUPPORTENG-394] docs(cli): Add information about how to return line items #620
[SUPPORTENG-394] docs(cli): Add information about how to return line items #620
Conversation
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.
Note: I just reviewed one pair of documents. I'm assuming the other two are necessary duplicates.
The only change I'd ask you to consider, @armchairlinguist, is the one about the "for examples", but I won't be opposed if you decide not to include that.
Feel free to send another review request if you include it, and I'll approve it quickly.
| Trigger | Array | 0 or more objects; passed to the [deduper](https://platform.zapier.com/docs/dedupe/) if polling | | ||
| Search | Array | 0 or more objects. Only the first object will be returned, so if len > 1, put the best match first | | ||
| Action | Object | Return values are evaluated by [`isPlainObject`](https://lodash.com/docs#isPlainObject) | | ||
| Create | Object | Return values are evaluated by [`isPlainObject`](https://lodash.com/docs#isPlainObject) | |
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.
Nice catches!
users: [ | ||
{ name: 'Zap Zaplar', age: 12, city: 'Columbia', region: 'Missouri' }, | ||
{ name: 'Orange Crush', age: 28, city: 'West Ocean City', region: 'Maryland' }, | ||
{ name: 'Lego Brick', age: 91, city: 'Billund', region: 'Denmark' }, |
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.
_
[_]
/; :\
()'---' C
| | |
[=|=]
|
||
A standard search would return just the inner array of users, and only the first user would be provided as a final result. Returning line items instead means that the "first result" return is the object containing all the user details within it. | ||
|
||
Using the standard approach is recommended, because not all Zapier integrations support line items directly, so users may need to take additional actions to reformat this data for use in their Zaps. More detail on that at [Use line items in Zaps](https://zapier.com/help/create/basics/use-line-items-in-zaps). However, there are use cases where returning multiple results is helpful enough to outweigh that additional effort. |
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.
I like that link!
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.
Thanks! I'll leave it open til Monday in case anyone on the eng team has feedback, as well. |
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.
Happened to see a reference of an old platform version. It's unrelated to your changes, but it'd be nice to remove it too. Otherwise, this PR looks good to me, thanks!
3ebfda9
Co-authored-by: Chang-Hung Liang <[email protected]>
The question of how to correctly return line items comes up periodically, to the point where we maintain an internal reference. This addition will allow developers curious about how to return line items to better self-serve.