v0.1.1
Version 0.1.1
03/10/25
Type | Location | Event | Previous Version | Updated Version | Notes |
---|---|---|---|---|---|
parameter | playbook.yaml | N/A | 0.1.0 | 0.1.1 | Updated version parameter |
parameter | playbook.yaml | N/A | N/A | {"order_completed":{"enrichments":[{"outputKey":"total_as_decimal","staticBool":false}],"mappings":[{"inputKey":"input","outputKey":"total","transforms":[{"expression":{"body":"return SUM(MAP(input.properties.products, function (p) return (p.price or 0) 100 (p.quantity or 1) end))","lang":"lua"}}]},{"defaultString":"USD","inputKey":"properties.currency","outputKey":"currency","transforms":[{"modifyString":"uppercase"}]},{"defaultString":"","inputKey":"properties.order_id","outputKey":"order_id","transforms":[{"toScalar":"string"}]},{"defaultString":"","inputKey":"properties.order_id","outputKey":"customer_order_id","transforms":[{"toScalar":"string"}]},{"inputKey":"input","outputKey":"line_items","transforms":[{"expression":{"body":"return MAP(\n input.properties.products,\n function (p)\n local item = {\n identifer = p.product_id or p.sku or '',\n total = (p.price or 0) 100 (p.quantity or 1),\n quantity = p.quantity or 1,\n sku = p.sku or '',\n category = { p.category or '' },\n description = p.name or '',\n attributes = attributes\n }\n local attributes = {}\n if (p.brand) then attributes.brand = p.brand end\n if (p.name) then attributes.name = p.name end\n if (p.variant) then attributes.variant = p.variant end\n if (p.coupon) then attributes.coupon = p.coupon end\n if (p.position) then attributes.position = p.position end\n if (p.url) then attributes.url = p.url end\n if (p.image_url) then attributes.image_url = p.image_url end\n if (next(attributes)) then item.attributes = attributes end\n return item\n end\n)","lang":"lua"}}]}]}} | Added eventSpecific parameter |
parameter | playbook.yaml | N/A | {"order_completed":{"enrichments":[{"outputKey":"total_as_decimal","staticBool":false}],"mappings":[{"inputKey":"input","outputKey":"total","transforms":[{"expression":{"body":"return SUM(MAP(input.properties.products, function (p) return (p.price or 0) 100 (p.quantity or 1) end))","lang":"lua"}}]},{"defaultString":"USD","inputKey":"properties.currency","outputKey":"currency","transforms":[{"modifyString":"uppercase"}]},{"defaultString":"","inputKey":"properties.order_id","outputKey":"order_id","transforms":[{"toScalar":"string"}]},{"defaultString":"","inputKey":"properties.order_id","outputKey":"customer_order_id","transforms":[{"toScalar":"string"}]},{"inputKey":"input","outputKey":"line_items","transforms":[{"expression":{"body":"return MAP(\n input.properties.products,\n function (p)\n local item = {\n identifer = p.product_id or p.sku or '',\n total = (p.price or 0) 100 (p.quantity or 1),\n quantity = p.quantity or 1,\n sku = p.sku or '',\n category = { p.category or '' },\n description = p.name or '',\n attributes = attributes\n }\n local attributes = {}\n if (p.brand) then attributes.brand = p.brand end\n if (p.name) then attributes.name = p.name end\n if (p.variant) then attributes.variant = p.variant end\n if (p.coupon) then attributes.coupon = p.coupon end\n if (p.position) then attributes.position = p.position end\n if (p.url) then attributes.url = p.url end\n if (p.image_url) then attributes.image_url = p.image_url end\n if (next(attributes)) then item.attributes = attributes end\n return item\n end\n)","lang":"lua"}}]}]}} | N/A | Removed event_specific parameter |
Updated about 6 hours ago