Zapier Cli - 有没有办法将行项目从 Shopify 发送到我的 Zapier CLI 应用程序?

Zapier Cli - Is there a way to send line items from Shopify to my Zapier CLI App?

就像 this zap 一样,我如何接受 Shopify 应用中的订单项到我的 Zapier Cli 应用中? inputFields 应该是什么以及我应该如何将它们映射到 Shopify 订单项?

要将您的操作设置为接受订单项,您需要将操作中的 inputFields 之一指定为 "line items" 字段。该字段应该有一个 children 属性 和一个行项目字段数组(使用相同的字段模式)。

例如,假设您的应用有一个 "Create Invoice" 操作。 inputFields 可能看起来像这样:

inputFields: [
    {key: 'customerAccountId', required: true, type: 'string'},
    {key: 'dueDate', required: true, type: 'datetime'},
    {key: 'line_items', children: [
        {key: 'item_name', type: 'string'},
        {key: 'price', type: 'number'},
        {key: 'quantity', type: 'number'}
    ]},
]

字段架构文档中的更多信息:https://zapier.github.io/zapier-platform-schema/build/schema.html#fieldschema

这允许您的操作接受来自任何具有提供订单项的触发器的应用的订单项。触发器描述应该说明它是否支持订单项——您可以在此处查看 Shopify 的一些示例:https://zapier.com/apps/shopify/integrations#triggers-and-actions