• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

  • Due to Holi celebrations, our team will have limited availability. While we’ll continue to monitor threads, responses may be slightly delayed.

handling null values

Your Workflow URL
https://connect.pabbly.com/workflow/mapping/IjU3NjcwNTZhMDYzNzA0MzU1MjZjNTUzMCI_3D_pc
Your Task History ID
IjU3NjcwNTZhMDYzNzA0MzU1MjZjNTUzMCI_3D_pc#
Consent to Access & Modify
I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
I am facing a problem in using null values in my workflow. I have created a step no 3 in the workflow to check if a customer has ordered for a second product at the time of placing the order. The field I have used is 'items 1 id' which is only available if there is a second item in the order. If there is no second item, this field does not appear in the response received by pabbly and the result of set no 3 should be '0'. However, insted of returning '0' step no 3 returns the value from the last succesfully run , i.e, 'multiple'
So my requirement is that if there is no second order, the result of step 3 should be '0' and if there is a second order the result should be 'multiple'
How do I solve this?
 

Hrishabh.pabbly

Member
Staff member
Hi @virsingh77 ,

Thank you for sharing the webhook response format.

Since your data is coming in a flattened structure (e.g., Items 0 Id, Items 1 Id, etc.), the correct way to handle this is by using a Router instead of directly checking the field in a Set step.

Please follow these steps:

  1. Add a Router after the webhook trigger.
  2. Create Path 1 with the condition:
    Items 1 Id → Exists
    → In this path, set the value as "multiple".
  3. Keep the Default Path (no condition).
    → In this path, set the value as "0".
This way:

  • If a second product exists, it will return "multiple".
  • If there is only one product and Items 1 Id is not present, it will correctly return "0".
This approach prevents from reusing the previous execution value.
 
But if Items 1 Id does not exist for an order, in path 1 the 'select label' field resets to blank. Next order if Items 1 id is there, the filter doesn't work because the 'select label' field was rest to blank in the previous order.
My requirement is:
if the customer orders for more than 1 product i need to tag it as 'multiple'
the way to identify if the customer has placed order for more than 1 product is if the field 'Items 1 Id' gets created
if the field 'Items 1 Id' is not created that means its a single product order
How do I accomplish this?

My workflow url is https://connect.pabbly.com/workflow/mapping/IjU3NjcwNTZhMDYzNzA0MzU1MjZjNTUzMCI_3D_pc
 
Top