• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $149 (🏆Lifetime Access) - View offer

Send order to Detrack - number/string issue

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.
image.png


In this case, our team would advise to stringy the do_number properly =>
image.png


i.e. \"SO-00000022\"
 

Attachments

  • Screenshot 2023-11-01 113735.png
    Screenshot 2023-11-01 113735.png
    616.7 KB · Views: 38
  • Screenshot 2023-11-01 114001.png
    Screenshot 2023-11-01 114001.png
    87.9 KB · Views: 41
Last edited:
I've had some success by splitting the Order Number on the hyphen and converting the latter part to a number:
"SO-0000022" becomes "0000022" which is converted to an integer 22. This works to give Detrack a legit DO Number which creates the job, so we can work around this.

The Zapier Detrack module correctly loops through each Job Item matching the Order Number, and adds each item to the delivery job. One delivery order, with multiple delivery items - perfect!

But it seems the Pabbly Detrack module, does not loop over the items, instead creating one delivery order, with only one delivery item.

Really do hope these are just simple bugs Pabbly can fix, otherwise it's back to Zapier we go. :(
 
Last edited:

Supreme

Well-known member
Staff member
We've made a minor adjustment and kindly suggest that you reconnect the action step before giving it another try.

And you can now execute the failed task to rerun the failed tasks.
 
We've made a minor adjustment and kindly suggest that you reconnect the action step before giving it another try.

And you can now execute the failed task to rerun the failed tasks.
Thank you so much! Pabbly is sending the delivery reference to Detrack correctly now, we've been able to create the job using the customer's Order Number.

1698889469144.png


Howver, we are still not getting all Job Items logged with the delivery job. Only 1 item is included when there should be multiple.

Current example from a Pabbly workflow:

1698889548615.png


There should be 5 items in delivery job SO-00000022

1698889712550.png
 
Last edited:
As a comparison, here are the two automations...

Zapier:

1698889880951.png


Pabbly (steps 4 and 5 can probably be eliminated now that the Detrack module sends the DO Number as a string):

1698889972830.png



Here's an example of a correctly logged Delivery Job with multiple Job Items:

1698890062629.png


All 5 job items were correctly attached to Job SO-00000017 using the Zapier Detrack module - Pabbly Detrack module does not iterate over the line items:

1698890156745.png


Unfortuantely, re-executing the workflow does not add additional job items to the delivery job, and fails because the Delivery Number already exists. This error does not occur in Zapier - the zap adds all Job Items to the Delivery Job correctly.
 
Last edited:

Supreme

Well-known member
Staff member
Hey @marketingEGA

For your workflow, if you intend to process multiple orders sequentially, it is advisable to employ the Iterator action step instead of the JSON extractor action step.

Please give it a try and let us know.

 
Top