Best answer

HubSpot to Square Zap Issue: Creating deals from invoices without duplicates.

  • 16 September 2023
  • 4 replies

We create New Deals in HubSpot when a New Completed Order is created in Square.

Most of our orders are entered into Square with credit card payment, so the order date and payment/transaction date are the same.

PROBLEM: Some of our orders are invoiced, and the New Order zap doesn’t trigger until payment, which can be weeks or months later. This skews our order history info in HubSpot.

Zapier/Square Trigger Options in question: NEW ORDER, NEW INVOICE, NEW PAYMENT

DESIRED SOLUTION: I want to create a Deal when a New Invoice is created, but then NOT duplicate it when that invoice is paid. Creating the deal is the easy part, but not duplicating is an issue.

The only field that appears to connect NEW ORDER (i.e., payment transactions) to the Invoice, is through NEW PAYMENT.  New Order [id] = New Payment [order_id] field.

The only way I see to filter the existing New Order zap is to FIND NEW PAYMENT where the New Order [id] = New Payment [order_id] field. I checked an existing invoice payment to ensure these were matching fields. Then FILTER if the found New Payment [square_product] = INVOICES.

But I can’t figure out a way to Find New Payment based on the New Order ID from the initial zap trigger.


Best answer by shalgrim 19 September 2023, 00:06

View original

4 replies

Userlevel 7
Badge +14

Hi @HilltopBio 

Good question.

Perhaps try using a different approach: HubSpot - Find/Create Deal


Userlevel 6
Badge +8

Troy’s suggestion around searching HubSpot is a good one.

If that doesn’t work, there’s also Storage by Zapier where you could enter in an ID in the New Order Zap and then in the New Payment Zap you could search to see if that ID exists before continuing on.

Thanks for your suggestions, but I think I may not have properly explained our process or what I’m looking for.

All of our sales orders are done through Square. Then, in order to use several of the reporting features in HubSpot, we use Zapier to Create a New Deal in HubSpot that extracts details from the Square New Order and links it to the correct Contact in HubSpot. It looks like this:

Trigger: New Order in Square → Step Details: Location (main store), Order Status (COMPLETED)

Action: Create Deal in HubSpot 

  • Deal Amount = Square Net Amounts Total Money
  • Deal Close Date = Square Created At (date / time)
  • Deal Description = Square Line Items Name, Line Items Quantity

This all works really well for us EXCEPT when an order in Square is put in as invoiced instead of with immediate Credit Card payment.

In Zapier, the triggers associated with Square are New Order, OR New Payment, OR New Invoice. The only thing that qualifies as a New Order is anything where payment is included, so this excludes invoiced orders. New Payment can apply to any payment received, whether for an order that was entered with immediate credit card payment, or for an invoiced order when payment is eventually recorded. New Invoice is as it says, an order that has been entered but no payment received yet.

I would like to create a HubSpot Deal at the time of a New Invoice, but then NOT duplicate it when the invoice is paid which will trigger both a New Payment AND a New Order record in Zapier.

As I stated above, the only way to do this (that I can see) is to add a filter to my existing New Order zap to FIND New Payment where the Trigger New Order [id] = Found New Payment [order_id] field. ← THIS is the filter I’m having trouble creating

Userlevel 6
Badge +8

Thanks for detailing all of this out, @HilltopBio,

I’ll reciprocate by expanding on Troy’s suggestion (assuming I understand it) and mine.

What we’re both suggesting, in slightly different ways, is that you need to go about it in a fundamentally different way. The reason you’re having trouble finding a New Payment is because you can’t search on that.

So what we’re suggesting is that you create some ID in another system that you can search for. Troy’s suggesting you search for it in HubSpot. This will work if you know that the New Order → Hubspot Zap will add a field called order_id and that that field will also come through with the New Invoice → Hubspot Zap.

So in that case your Zaps would look like this:

  1. New Order → Hubspot (as you have it)
  2. New Invoice → Find Deal in Hubspot using order_id to search → Filter on whether or not deal was found → Hubspot (if deal was not found because this is the first time we’ve seen this order)

My suggestion would work if the Find Deal in Hubspot part doesn’t work. In that case, your Zaps would look like this:

  1. New Order → Storage By Zapier (Add some ID you know will come through again with New Invoice) → Hubspot
  2. New Invoice → Search Storage By Zapier for that known ID → Filter on whether or not the ID was found → Hubspot (if ID was not found because this is the first time we’ve seen this order)

Hopefully that makes sense, but let me know if you have more questions