marketingEGA
Member
We have a working example of this automation in Zapier, and are trying to replicate it in Pabbly.
We email a CSV file to our Mailparser mailbox which then extracts the data from the CSV and sends the data to a Google Sheet with two pages in it - Jobs and Job Items. The Jobs sheet gets the order number and delivery address, the Job Items gets all the components in the order.
Now our Zap kicks in, sees new rows in Google Sheets, and sends the data over to Detrack, where the DO_Number (required to create a delivery) is set as the customer's Order Number - e.g. SO-0000022. Zapier sends this as a string, and Detrack happily accepts it, and our delivery job is created, along with the line items that make up the components for the order. All is good!
Now, we have duplicated this Zap as a Pabbly Workflow - however, the last step, Create Order in Detrack, is failing becuase our Order Number (SO-0000022) is being interpreted as a number and not a string. We really want to be using the Order Number as the DO Number (Delivery Job Number) as this makes it easy to match the delivery with its correspnding order from our B2B portal.
We have tried the Text Formatter but this make no difference - it would appear the problem lies in the Pabbly Detrack module which assumes the DO Number is an actual number and sends it as such. This is not great as it breaks our workflow and no jobs are created - what can be done to ensure our data is sent as a string?
You'll see in the payload below, it is only the do_number that is not interpreted as a string, with no escaped quotes wrapping it.
------------------------------------------------------------------------------------------------------------------------------------------------
Data In - Success:
The request sent to the Detrack app is shown below:
Request
"{ \"data\": { \"type\": \"Delivery\", \"do_number\": SO-00000022, \"date\": \"2023-11-05\", \"address\": \"6 Wanneroo Rd Yokine WA 6060 Australia\", \"open_to_marketplace\": true, \"start_date\": \"\", \"status\": \"\", \"job_time\": null, \"job_release_time\": null, \"time_window\": null, \"job_received_date\": null, \"tracking_number\": null, \"order_number\": null, \"job_type\": null, \"job_sequence\": null, \"job_fee\": null, \"address_lat\": null, \"address_lng\": null, \"company_name\": null, \"address_1\": null, \"address_2\": null, \"address_3\": null, \"postal_code\": null, \"city\": null, \"state\": null, \"country\": null, \"billing_address\": null, \"deliver_to_collect_from\": \"\", \"last_name\": null, \"phone_number\": \"413516414\", \"sender_phone_number\": null, \"fax_number\": \"\", \"instructions\": \"this is Dog Swamp SC\", \"assign_to\": null, \"notify_email\": null, \"webhook_url\": null, \"zone\": null, \"customer\": \"Bob's Baths & Plumbing\", \"job_owner\": null, \"invoice_number\": null, \"invoice_amount\": null, \"payment_mode\": null, \"payment_amount\": null, \"group_id\": null, \"group_name\": null, \"source\": null, \"weight\": null, \"parcel_width\": null, \"parcel_length\": null, \"parcel_height\": null, \"boxes\": null, \"cartons\": null, \"pieces\": null, \"envelopes\": null, \"pallets\": null, \"bins\": null, \"trays\": null, \"bundles\": null, \"number_of_shipping_labels\": null, \"attachment_url\": null, \"carrier\": null, \"auto_reschedule\": null, \"eta_time\": null, \"depot\": null, \"depot_contact\": null, \"department\": null, \"sales_person\": null, \"identification_number\": null, \"bank_prefix\": null, \"run_number\": null, \"pick_up_from\": null, \"pick_up_time\": null, \"pick_up_lat\": null, \"pick_up_lng\": null, \"pick_up_address\": null, \"pick_up_address_1\": null, \"pick_up_address_2\": null, \"pick_up_address_3\": null, \"pick_up_city\": null, \"pick_up_state\": null, \"pick_up_country\": null, \"pick_up_postal_code\": null, \"job_price\": null, \"insurance_price\": null, \"insurance_coverage\": true, \"total_price\": null, \"payer_type\": null, \"remarks\": null, \"service_type\": null, \"warehouse_address\": null, \"destination_time_window\": null, \"door\": null, \"pod_time\": null, \"items\": [ { \"sku\": \"MSZEF35VEWKIT\", \"quantity\": 1, \"description\": \"Signature series wall split White - R32 3.5\/4\", \"comments\": null } ]} }"
Data Out - Failed:
The response received from the Detrack app is shown below:
Code: invalid_data
Message: Data is missing
------------------------------------------------------------------------------------------------------------------------------------------------
From Detrack's support team:
Thank you for your patience.
Our Technical team has checked and can see that the payload contains an error.
In this case, our team would advise to stringy the do_number properly =>
i.e. \"SO-00000022\"
We email a CSV file to our Mailparser mailbox which then extracts the data from the CSV and sends the data to a Google Sheet with two pages in it - Jobs and Job Items. The Jobs sheet gets the order number and delivery address, the Job Items gets all the components in the order.
Now our Zap kicks in, sees new rows in Google Sheets, and sends the data over to Detrack, where the DO_Number (required to create a delivery) is set as the customer's Order Number - e.g. SO-0000022. Zapier sends this as a string, and Detrack happily accepts it, and our delivery job is created, along with the line items that make up the components for the order. All is good!
Now, we have duplicated this Zap as a Pabbly Workflow - however, the last step, Create Order in Detrack, is failing becuase our Order Number (SO-0000022) is being interpreted as a number and not a string. We really want to be using the Order Number as the DO Number (Delivery Job Number) as this makes it easy to match the delivery with its correspnding order from our B2B portal.
We have tried the Text Formatter but this make no difference - it would appear the problem lies in the Pabbly Detrack module which assumes the DO Number is an actual number and sends it as such. This is not great as it breaks our workflow and no jobs are created - what can be done to ensure our data is sent as a string?
You'll see in the payload below, it is only the do_number that is not interpreted as a string, with no escaped quotes wrapping it.
------------------------------------------------------------------------------------------------------------------------------------------------
Data In - Success:
The request sent to the Detrack app is shown below:
Request
"{ \"data\": { \"type\": \"Delivery\", \"do_number\": SO-00000022, \"date\": \"2023-11-05\", \"address\": \"6 Wanneroo Rd Yokine WA 6060 Australia\", \"open_to_marketplace\": true, \"start_date\": \"\", \"status\": \"\", \"job_time\": null, \"job_release_time\": null, \"time_window\": null, \"job_received_date\": null, \"tracking_number\": null, \"order_number\": null, \"job_type\": null, \"job_sequence\": null, \"job_fee\": null, \"address_lat\": null, \"address_lng\": null, \"company_name\": null, \"address_1\": null, \"address_2\": null, \"address_3\": null, \"postal_code\": null, \"city\": null, \"state\": null, \"country\": null, \"billing_address\": null, \"deliver_to_collect_from\": \"\", \"last_name\": null, \"phone_number\": \"413516414\", \"sender_phone_number\": null, \"fax_number\": \"\", \"instructions\": \"this is Dog Swamp SC\", \"assign_to\": null, \"notify_email\": null, \"webhook_url\": null, \"zone\": null, \"customer\": \"Bob's Baths & Plumbing\", \"job_owner\": null, \"invoice_number\": null, \"invoice_amount\": null, \"payment_mode\": null, \"payment_amount\": null, \"group_id\": null, \"group_name\": null, \"source\": null, \"weight\": null, \"parcel_width\": null, \"parcel_length\": null, \"parcel_height\": null, \"boxes\": null, \"cartons\": null, \"pieces\": null, \"envelopes\": null, \"pallets\": null, \"bins\": null, \"trays\": null, \"bundles\": null, \"number_of_shipping_labels\": null, \"attachment_url\": null, \"carrier\": null, \"auto_reschedule\": null, \"eta_time\": null, \"depot\": null, \"depot_contact\": null, \"department\": null, \"sales_person\": null, \"identification_number\": null, \"bank_prefix\": null, \"run_number\": null, \"pick_up_from\": null, \"pick_up_time\": null, \"pick_up_lat\": null, \"pick_up_lng\": null, \"pick_up_address\": null, \"pick_up_address_1\": null, \"pick_up_address_2\": null, \"pick_up_address_3\": null, \"pick_up_city\": null, \"pick_up_state\": null, \"pick_up_country\": null, \"pick_up_postal_code\": null, \"job_price\": null, \"insurance_price\": null, \"insurance_coverage\": true, \"total_price\": null, \"payer_type\": null, \"remarks\": null, \"service_type\": null, \"warehouse_address\": null, \"destination_time_window\": null, \"door\": null, \"pod_time\": null, \"items\": [ { \"sku\": \"MSZEF35VEWKIT\", \"quantity\": 1, \"description\": \"Signature series wall split White - R32 3.5\/4\", \"comments\": null } ]} }"
Data Out - Failed:
The response received from the Detrack app is shown below:
Code: invalid_data
Message: Data is missing
------------------------------------------------------------------------------------------------------------------------------------------------
From Detrack's support team:
Thank you for your patience.
Our Technical team has checked and can see that the payload contains an error.
In this case, our team would advise to stringy the do_number properly =>
i.e. \"SO-00000022\"
Attachments
Last edited: