Just getting into Flow / Deluge and am making progress but am now stuck and hoping this is a really simple thing.
I have a webhook coming in from Quotient. The payload contains sub items I need to for each on, so I can add monthly revenue and One Off. I cannot work out how to use .tojsonList to get this into a list
The data I am after is in selected_items and basically all I want to do is run through the items with a couple of if statements that add the revenue together into one varialble if subscription is not null and another if subscription is null. Once I can get iterating through the data I can do this, it just wont be pretty.
{
discount_amount_includes_tax: 0,
overall_discount: 0,
quote_number: 558,
quote_for: {
name_first: "GILESINT",
address: {
zip: "",
country: "",
city: "",
street: "",
state: "",
type: ""
},
phone: {
type: "",
value: ""
},
company_name: "CTINT",
name_last: "Cunningham",
},
discount_amount_excludes_tax: 0,
for: "CTINT",
quote_status: "Awaiting Acceptance",
title: "Tittle of quote",
first_sent: "2020-04-24T13:34:44+00:00",
total_excludes_tax: 3,
amounts_are: "Tax Exclusive (Inclusive Total)",
valid_until: "2020-05-24T13:34:00+00:00",
is_archived: false,
selected_items: [
{
item_code: "",
quantity: 2,
heading: "m",
sales_category: "Sales",
description: "",
discount: 0,
item_total: 2,
tax_description: "20% VAT",
subscription: "Month, 1, 12",
unit_price: 1,
tax_rate: 20,
cost_price: 0
},
{
item_code: "",
quantity: 1,
heading: "o",
sales_category: "Sales",
description: "",
discount: 0,
item_total: 1,
tax_description: "20% VAT",
subscription: "",
unit_price: 1,
tax_rate: 20,
cost_price: 0
}
],
item_headings: "m\no",
event_name: "quote_sent",
total_includes_tax: 3.5999999999999996,
currency: "GBP",
from: "Giles Cunningham"
}