ContributionsMost RecentMost LikesSolutionsRe: Processing incoming XML in webhook pipeline Thank you! We've opted for a middle layer to fetch the XML doc and convert it first then forward it to a QB webhook. Either CSV or JSON. However, it seems that CSV is the easiest for QB to digest. ------------------------------ James van der Walt ------------------------------ Processing incoming XML in webhook pipeline Hi I have an XML file that contains stock levels that I want to import into a QB table via a webhook The XML looks something like this: <DSV_WHSInventory> <HEAD> <Message_Id>20230824010117</Message_Id> <Date_Time>20230824010117</Date_Time> <Message_Type>INVRPT</Message_Type> <Message_Version>0200</Message_Version> <Sender_Id>DSV_WMS_RP02</Sender_Id> <Sender_Company>DSV Solutions</Sender_Company> <Recipient_Id>ZAGOSOLR</Recipient_Id> <Recipient_Company>ZAGOSOLR</Recipient_Company> </HEAD> <Inventory> <Dstamp>20230824010117</Dstamp> <InventoryCount> <Client_Id>ZAGOSOLR</Client_Id> <Sku_Id>006</Sku_Id> <Site_Id>ZAGOSOLR</Site_Id> <Condition_Id>OK1</Condition_Id> <Total_Qty>42</Total_Qty> <Total_Alloc>3</Total_Alloc> <Tracking_Level>EACH</Tracking_Level> <Condition_Id_Map>OK1</Condition_Id_Map> </InventoryCount> <InventoryCount> <Client_Id>ZAGOSOLR</Client_Id> <Sku_Id>007</Sku_Id> <Site_Id>ZAGOSOLR</Site_Id> <Condition_Id>OK1</Condition_Id> <Total_Qty>27</Total_Qty> <Total_Alloc>3</Total_Alloc> <Tracking_Level>EACH</Tracking_Level> <Condition_Id_Map>OK1</Condition_Id_Map> </InventoryCount> .... What is the best way to get this XML stock data into a QB table? Thanks for the help ------------------------------ James van der Walt ------------------------------ Re: Search for records created date time 3-4 hours ago Solved it ------------------------------ James van der Walt ------------------------------ Search for records created date time 3-4 hours ago I would like to find all records created 3-4 hours ago. How would I do it? Here's a few examples of what I've tried already ------------------------------ James van der Walt ------------------------------ Search recorrds then send it as json array to API url Using a quickbase pipeline I want to schedule a task that will search for all order records that were updated in the last 24h, then create json object with an array of all the orders in question. This json object should then be sent via a API call to that accepts a list of orders in json form. How would I setup this pipeline in quickbase Steps how I see it Search for the orders I want (filtered) Iterate through the records found and insert them into a json object Step a webhook referencing the external API that takes the json object constructed into the body External API to receive the json array for processing Any idea how I should do this? Thanks for the help ------------------------------ James van der Walt ------------------------------ Re: mixing jinja with to_json pipe Thanks for the quick reply Dwight, Sadly the solution didn't work. First, I see you put quotations around all the variables. If I do that then all of these are just strings in the final output. Second, If I remove the quotation then the body section of the "Make Request" doesn't validate. ------------------------------ James van der Walt ------------------------------ mixing jinja with to_json pipe Hi all I'm trying to get the following json object to be assembled during a pipeline: {{{ "service":"CreateOrder", "site_Acc_id":"gausolar", "order_source":"GoSolr Test", "fname":a.name, "lname":a.surname, "email":a.email, "mobile":a.mobile_number, "wnumber":a.mobile_number, "email":a.email, "unit_id":"", "street_num":"", "street_name":a.premise_address, "region":a.area_of_install, "city":"", "suburb":"", "service_array":[ { "supplier_sku":a.system_size_sku, "roof_type":a.roof_type, "flat_roof":a.is_flat_roof } ], "instl_address":a.premise_address, "postalcode":"", "promocode":"", "sales_stage":"To Be Scheduled", "teamid":0, "coc_certificate":"No", "inst_start_date_time":"", "inst_end_date_time":"", "completion_date1":"", "inst_turnaround":"", "order_no":a.order, "order_size":a.system_size_sku, "prepaid_postpaid": a.prepaid_meter, "elec_provider":a.electricity_provider, "roof_type":a.roof_type, "comment_1":a.scheduling_comment, "inst_size":"", "income":"", "upgrade":"", "panels":"", "battery":"No", "flat_roof":"", "extra":"", "expense":"", "profit":"", "o_m_fee":"65.00", "xtra_battery":"", "has_flat_roof":a.is_flat_roof, "own_or_rent":"", "meter_type":"", "mnth_elec_bill":"", "elec_phases":{% if a.electricity_phase == "Single" %} "Single Phase" {% elif a.electricity_phase == "Three" %} "Three Phase" {% else %} "I Dont Know" {% endif %} , "owner_insurance":"", "dwelling_type":"", "gosolr_pass":"" }|to_json }} As you can see I'm piping the whole object to_json at the end, sadly this is causing the jinja if statements to give issues. Looks like you can't blanket parse the whole object if there are jinja statements in between. The main issue is, if I to_json each field independently, then the payload doesn't format correctly and the end point API rejects the call. How to I still use to_json at the end while still allowing jinja if statementsin between? ------------------------------ James van der Walt ------------------------------ Re: Dropdown triggers Thanks Mark. After some trial and error I found a "cheat". I saved the first part of the original order number (string) in a hidden field when I create the copy of the order. Then I used dynamic rules to concatenate the order# to the various order types as the dropdown changed. Here's my dynamic rule to make this happen. ------------------------------ James van der Walt ------------------------------ Re: Create copy record then redirect Perfect! That's what I needed! You're a star, thank you Sent from Mail for Windows Dropdown triggers I have an order number ie. 123123.1. On a QB Form, when I select an order type from a dropdown I want the order number to be updated. E.g. If I select "return" order from the dropdown, the order number field should be upadted to 123123.1.return Is this possible? If so, how Thanks for the help ------------------------------ James van der Walt ------------------------------