I really need some help please!
I have a result set from an API and I am trying to save at least part of it to a collection in a Canvas app via flow.
I have spent 2 whole days on it, and I am getting frustrated, because I am getting nowhere.
The data is basically 3 orders including orderlines, and it is the orderlines including the ordernumber that I need to store.
I have attached a "Compose"-input to make it easier for you guys to test/debug/solve my issue.
Compose data: (All data have been anonymized before I posted it here since it contained email and names)
What I want is to store the object called "OrderItems" to a collation. Its is fine if "OrderItemNameValues" gets stored as a table inside the OrderItems collection. (I can travese it later )
I am using Response to store the data in the collation, but depending on how I format my schema, I get either collations with the correct amount of records (3), and the right field names, but all fields are empty!
The other situation is when my canvas app plainly refuses to import the flow, which is also due to the schema.
I have tried to do a HTTP, ParseJson and then Select where I select "OrderItems", and that looks like what I need, but I can not succesfully store it in a container from within a canvasapp with fx ClearCollect(FlowCollection,API_Flow.Run()); The data is blank but the amount of records is correct.
Can somebody please help me out with a valid schema so I can store the "OrderItems"-part to a collation? I would be immensely greateful!
[
{
"Channel": {
"Name": "Shopify",
"Description": null,
"Active": true,
"Logo": "Shopify",
"ClientId": 0,
"ID": 12,
"LastUpdated": "2018-05-25T10:26:54.293625",
"LastUpdatedByUser": "super"
},
"Country": {
"Name": "DENMARK",
"Code": "DK",
"Code3": "DNK",
"ID": 365,
"LastUpdated": "2012-05-05T22:16:35.487",
"LastUpdatedByUser": "GROVESLU"
},
"Currency": {
"Name": "Euro Member Countries",
"Code": "EUR",
"Symbol": "€",
"ID": 3,
"LastUpdated": "2016-05-11T22:20:33.853",
"LastUpdatedByUser": "SYSTEM"
},
"OrderNameValues": [
{
"OrderId": 4207,
"Name": "SourceCourierServiceName",
"Value": "Santa",
"ID": 4573,
"LastUpdated": "2022-07-14T17:37:42.2344988",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"ClientId": 3,
"CLIENT_CODE": null,
"OrderNumber": "3722",
"ExternalOrderReference": "#3722",
"OrderDate": "2022-07-14T17:37:42.2344988",
"DespatchDate": null,
"RequiredDespatchDate": null,
"RequiredDeliveryDate": null,
"Title": null,
"FirstName": "",
"LastName": "",
"CompanyName": "",
"Address1": "",
"Address2": "",
"Address3": null,
"Town": "",
"County": null,
"PostCode": "",
"Phone": "",
"Mobile": null,
"Email": "",
"CountryId": 365,
"Source": "Shopify",
"Comments": null,
"GiftMessages": null,
"DeliveryNotes": null,
"VATNumber": null,
"EORINumber": null,
"PIDNumber": null,
"OrderStatusId": 9,
"NumberOfParcels": 1,
"TotalItems": 1,
"TotalWeight": 0,
"OrderValue": 13.99,
"Part": 1,
"NumberOfParts": 1,
"CourierServiceTypeId": 8,
"CourierServiceId": 995,
"CourierServiceName": "Delivery",
"TrackingNumber": null,
"TrackingURL": "",
"ShippingTotalExVat": 0,
"ShippingTotalVat": 0,
"DiscountTotalExVat": 0,
"DiscountTotalVat": 0,
"TotalVat": 2.13,
"ShippingNet": 0,
"ShippingTax": 0,
"ShippingGross": 0,
"DiscountNet": 0,
"DiscountTax": 0,
"TotalOrderNet": null,
"TotalOrderTax": 2.13,
"TotalOrderGross": 13.99,
"DiscountGross": 0,
"WarehouseId": 3,
"WAREHOUSE_CODE": null,
"ChannelId": 12,
"CurrencyId": 3,
"DespatchedByUser": null,
"OrderItems": [
{
"OrderItemNameValues": [
{
"Name": "Shopify-OrderItemId",
"Value": "1124398997",
"Internal": true,
"ID": 17336,
"LastUpdated": "2022-07-14T17:37:42.063",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
},
{
"Name": "Shopify-OrderId",
"Value": "450211733",
"Internal": true,
"ID": 17337,
"LastUpdated": "2022-07-14T17:37:42.063",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderId": 4207,
"ProductId": 110916,
"Quantity": 1,
"Allocated": 0,
"Commited": 0,
"OnBackOrder": 1,
"SourceLineSubTotal": null,
"SourceLineTotalTax": null,
"SourceLineTotalDiscount": null,
"SourceLineTotal": null,
"Price": 11.86,
"Vat": 2.13,
"Discount": 0,
"PriceNet": 11.86,
"Tax": 2.13,
"DiscountGross": 0,
"TaxRate": null,
"DiscountNet": null,
"DiscountTax": null,
"NetPaid": 11.86,
"TaxPaid": 11.86,
"TotalTax": 12.86,
"Details": null,
"SKU": "10156109",
"ID": 10081,
"LastUpdated": "2022-07-14T17:37:42.877",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderLock": false,
"Tags": "Pickup Order",
"SourceOrderDate": "2022-07-14T16:03:10",
"ID": 4207,
"LastUpdated": "2022-07-14T17:37:43.0782882",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
},
{
"Channel": {
"Name": "Shopify",
"Description": null,
"Active": true,
"Logo": "Shopify",
"ClientId": 0,
"ID": 12,
"LastUpdated": "2018-05-25T10:26:54.293625",
"LastUpdatedByUser": "super"
},
"Country": {
"Name": "DENMARK",
"Code": "DK",
"Code3": "DNK",
"ID": 365,
"LastUpdated": "2012-05-05T22:16:35.487",
"LastUpdatedByUser": "GROVESLU"
},
"Currency": {
"Name": "Euro Member Countries",
"Code": "EUR",
"Symbol": "€",
"ID": 3,
"LastUpdated": "2016-05-11T22:20:33.853",
"LastUpdatedByUser": "SYSTEM"
},
"OrderNameValues": [
{
"OrderId": 4206,
"Name": "SourceCourierServiceName",
"Value": "Santa",
"ID": 4572,
"LastUpdated": "2022-07-14T17:37:37.8612105",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"ClientId": 3,
"CLIENT_CODE": null,
"OrderNumber": "3720",
"ExternalOrderReference": "#3720",
"OrderDate": "2022-07-14T17:37:37.8612105",
"DespatchDate": null,
"RequiredDespatchDate": null,
"RequiredDeliveryDate": null,
"Title": null,
"FirstName": "",
"LastName": "",
"CompanyName": "",
"Address1": "",
"Address2": "",
"Address3": null,
"Town": "",
"County": null,
"PostCode": "",
"Phone": "",
"Mobile": null,
"Email": "",
"CountryId": 365,
"Source": "Shopify",
"Comments": null,
"GiftMessages": null,
"DeliveryNotes": null,
"VATNumber": null,
"EORINumber": null,
"PIDNumber": null,
"OrderStatusId": 1,
"NumberOfParcels": 1,
"TotalItems": 1,
"TotalWeight": 0,
"OrderValue": 113.99,
"Part": 1,
"NumberOfParts": 1,
"CourierServiceTypeId": 8,
"CourierServiceId": 995,
"CourierServiceName": "Delivery",
"TrackingNumber": null,
"TrackingURL": "",
"ShippingTotalExVat": 0,
"ShippingTotalVat": 0,
"DiscountTotalExVat": 0,
"DiscountTotalVat": 0,
"TotalVat": 17.39,
"ShippingNet": 0,
"ShippingTax": 0,
"ShippingGross": 0,
"DiscountNet": 0,
"DiscountTax": 0,
"TotalOrderNet": null,
"TotalOrderTax": 17.39,
"TotalOrderGross": 113.99,
"DiscountGross": 0,
"WarehouseId": 3,
"WAREHOUSE_CODE": null,
"ChannelId": 12,
"CurrencyId": 3,
"DespatchedByUser": null,
"OrderItems": [
{
"OrderItemNameValues": [
{
"Name": "Shopify-OrderItemId",
"Value": "1186584725",
"Internal": true,
"ID": 17334,
"LastUpdated": "2022-07-14T17:37:37.767",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
},
{
"Name": "Shopify-OrderId",
"Value": "451173525",
"Internal": true,
"ID": 17335,
"LastUpdated": "2022-07-14T17:37:37.767",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderId": 4206,
"ProductId": 97748,
"Quantity": 1,
"Allocated": 1,
"Commited": 0,
"OnBackOrder": 0,
"SourceLineSubTotal": null,
"SourceLineTotalTax": null,
"SourceLineTotalDiscount": null,
"SourceLineTotal": null,
"Price": 96.6,
"Vat": 17.39,
"Discount": 0,
"PriceNet": 96.6,
"Tax": 17.39,
"DiscountGross": 0,
"TaxRate": null,
"DiscountNet": null,
"DiscountTax": null,
"NetPaid": 96.6,
"TaxPaid": 96.6,
"TotalTax": 97.6,
"Details": null,
"SKU": "",
"ID": 10080,
"LastUpdated": "2022-07-14T17:37:38.067",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderLock": false,
"Tags": "",
"SourceOrderDate": "2022-07-14T15:45:16",
"ID": 4206,
"LastUpdated": "2022-07-14T17:37:37.9844866",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
},
{
"Channel": {
"Name": "Shopify",
"Description": null,
"Active": true,
"Logo": "Shopify",
"ClientId": 0,
"ID": 12,
"LastUpdated": "2018-05-25T10:26:54.293625",
"LastUpdatedByUser": "super"
},
"Country": {
"Name": "DENMARK",
"Code": "DK",
"Code3": "DNK",
"ID": 365,
"LastUpdated": "2012-05-05T22:16:35.487",
"LastUpdatedByUser": "GROVESLU"
},
"Currency": {
"Name": "Euro Member Countries",
"Code": "EUR",
"Symbol": "€",
"ID": 3,
"LastUpdated": "2016-05-11T22:20:33.853",
"LastUpdatedByUser": "SYSTEM"
},
"OrderNameValues": [
{
"OrderId": 4205,
"Name": "SourceCourierServiceName",
"Value": "Santa",
"ID": 4571,
"LastUpdated": "2022-07-14T17:37:34.5355169",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"ClientId": 3,
"CLIENT_CODE": null,
"OrderNumber": "3719",
"ExternalOrderReference": "#3719",
"OrderDate": "2022-07-14T17:37:34.5355169",
"DespatchDate": null,
"RequiredDespatchDate": null,
"RequiredDeliveryDate": null,
"Title": null,
"FirstName": "",
"LastName": "",
"CompanyName": "",
"Address1": "",
"Address2": "",
"Address3": null,
"Town": "",
"County": null,
"PostCode": "",
"Phone": "",
"Mobile": null,
"Email": "",
"CountryId": 365,
"Source": "Shopify",
"Comments": null,
"GiftMessages": null,
"DeliveryNotes": null,
"VATNumber": null,
"EORINumber": null,
"PIDNumber": null,
"OrderStatusId": 9,
"NumberOfParcels": 1,
"TotalItems": 1,
"TotalWeight": 0,
"OrderValue": 28.99,
"Part": 1,
"NumberOfParts": 1,
"CourierServiceTypeId": 8,
"CourierServiceId": 995,
"CourierServiceName": "Delivery",
"TrackingNumber": null,
"TrackingURL": "",
"ShippingTotalExVat": 0,
"ShippingTotalVat": 0,
"DiscountTotalExVat": 0,
"DiscountTotalVat": 0,
"TotalVat": 4.42,
"ShippingNet": 0,
"ShippingTax": 0,
"ShippingGross": 0,
"DiscountNet": 0,
"DiscountTax": 0,
"TotalOrderNet": null,
"TotalOrderTax": 4.42,
"TotalOrderGross": 28.99,
"DiscountGross": 0,
"WarehouseId": 3,
"WAREHOUSE_CODE": null,
"ChannelId": 12,
"CurrencyId": 3,
"DespatchedByUser": null,
"OrderItems": [
{
"OrderItemNameValues": [
{
"Name": "Shopify-OrderItemId",
"Value": "1181571221",
"Internal": true,
"ID": 17332,
"LastUpdated": "2022-07-14T17:37:34.423",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
},
{
"Name": "Shopify-OrderId",
"Value": "458617621",
"Internal": true,
"ID": 17333,
"LastUpdated": "2022-07-14T17:37:34.423",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderId": 4205,
"ProductId": 97505,
"Quantity": 1,
"Allocated": 0,
"Commited": 0,
"OnBackOrder": 1,
"SourceLineSubTotal": null,
"SourceLineTotalTax": null,
"SourceLineTotalDiscount": null,
"SourceLineTotal": null,
"Price": 24.57,
"Vat": 4.42,
"Discount": 0,
"PriceNet": 24.57,
"Tax": 4.42,
"DiscountGross": 0,
"TaxRate": null,
"DiscountNet": null,
"DiscountTax": null,
"NetPaid": 24.57,
"TaxPaid": 24.57,
"TotalTax": 25.57,
"Details": null,
"SKU": "40411108",
"ID": 10079,
"LastUpdated": "2022-07-14T17:37:36.343",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
],
"OrderLock": false,
"Tags": "Pickup Order",
"SourceOrderDate": "2022-07-14T15:42:47",
"ID": 4205,
"LastUpdated": "2022-07-14T17:37:36.5157339",
"LastUpdatedByUser": "SYSTEM-SHOPIFY"
}
]