If - Then - Else with an action in between

Consent to Access & Modify
I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
I wanted to create an if-then-else workflow. But cannot find how it works. I am new to Pabbly, so i am trying to learn

This is what i want to do.

I have a bookkeeping web app called Moneybird. And a WooCommerce website. When an order is created, I want to trigger the action to create the order via the Pabbly WooCommerce action.
Then the moneybird action needs to check if the customer exists. If the customer exists in Moneybird, then create the invoice. If the customer does not exist, create the customer first, then create the invoice.



How can I do that with Pabbly?


so:
Action: woocommerce order created
Check if the customer exists in Moneybird, If yes, create an invoice
If no, create the customer first, then create an invoice
 

ArshilAhmad

Well-known member
Staff member
Hi @GuillaumeGroen,

The use case you are describing is possible. Please follow the steps shown in the video below to set up WooCommerce as your trigger step and capture new orders.

Once you have done so, please share the workflow with us and we will guide you through the next steps.

Thanks & Regards,
Arshil Ahmad
Customer Support Associate
🌐 Pabbly.com
👉Rate your support
 
Thank you,

But this is only 3 steps. My third step can only commence if step 2 is done.
I probably have to create a router, and after that, add 2 steps that do almost the same thing? I cannot do an extra step in between.

-----------------------------------------------
Option 1(preferred option)
--> If no, Create a customer with order details |
| |
Order received -> check payment -> check if customer exists -> if yes, -> create invoice with received data.

Can I not make it like this?
------------------------------------------------
Option 2:
I probably have to create a router with 2 different extra checks: 1. If a customer exists, create an invoice, and 2. If a customer does not exist, create a customer and then create an invoice.

I then have to create the create invoice step twice, and if I need to change something in the last steps, I have to do that twice. (in step 1 and step 2)
------------------------------------------------
Can I create option 1? And if not, the new interface suits those types of workflows excellently.

Thank you,
 

ArshilAhmad

Well-known member
Staff member
Step 1: Capture a new order from WooCommerce using the ‘New Order Created’ trigger step.
Step 2: Use the ‘Moneybird: Search a Contact’ action step to check whether a contact exists in your Moneybird account.
Step 3: Router
• Route 1 – This will be used to create a contact and an invoice when the contact does not already exist in your Moneybird account.
• Route 2 – This will be used to create an invoice if the contact already exists in your Moneybird account


1764443833091.png


1764444071436.png


1764444126640.png
 
Ah, thank you. This is what I thought, too. I hoped to put in a middle step. Now I have to build the Create sales invoice twice. This can create errors because they need to be the same. If I could create just one, that would be great.
I would need a reverse router, or maybe a combinator that combines two routes into one.
Where can I request a feature for the future?

This would help to simplify workflows because I only have to create the sale invoice once. Now I have to create it twice. This workflow is not that complex. But if they become more complex, simplifying them would be in troubleshooting and maintenance.
 

Soumya Tripathi

Member
Staff member
Hello @GuillaumeGroen
You don’t need to worry — the workflow will not create the sales invoice twice.

Even though you are adding the “Create Sales Invoice” action inside both routes of the Router, only one route will execute at a time based on the condition:

  • If the customer exists → Only Route 2 runs → Invoice created once
  • If the customer does NOT exist → Only Route 1 runs → Customer created → Invoice created once
Pabbly Connect never executes multiple routes simultaneously.
Only the matching route continues, so the invoice is generated only one time, not twice.
 
Great!
Is there a way to choose one of the invoice layouts that I have configured in Moneybird?

And how to proceed if there are more lines in the order? i can add only 1 line item.

And how do i arrange sending of the order? it stays as a concept
 

Preeti Paryani

Well-known member
Staff member
Hello @GuillaumeGroen,

Regarding selecting one of your predefined invoice layouts in Moneybird — currently, this is not supported while creating a Sales Invoice in Pabbly Connect. However, you may add this as a feature request on our roadmap. Once added, please share the link with us so we can keep track of it:
https://roadmap.pabbly.com/b/Update-Existing-Application

For adding multiple line items, please refer to the below tutorial. It explains how to capture multi-line order data, convert it into comma-separated values, and then map those values properly inside the Create Sales Invoice action:
 
Top