Skip to content

Combine Both

Combine both options with a Decision element. The flow looks for a Xero Contact matched to the Account and uses it if one is found. If not, it creates the contact in Xero and raises the invoice against it.

Below Get Xero Tenant, add the Get Xero Contact element described in Invoice an Existing Contact.

Add a Decision element below Get Xero Contact:

  • Label — Xero Contact Found?.
  • Outcome — label it Found, with the condition Xero Contact from Get Xero Contact Is Null False.
  • Default Outcome — rename it Not Found.

The Xero Contact Found? decision with a Found outcome where Xero Contact from Get Xero Contact Is Null False, and a Not Found default outcome

On each branch, add the elements from the matching option:

The finished flow looks like this:

The finished flow with Get Invoice Mapping, Get Xero Tenant, Get Xero Contact and the Xero Contact Found? decision on the Run Asynchronously path, branching to Found and Not Found

Next, activate and test the flow.