Best answer

Creating an Invoice in QBO with line items when a Salescorce opportunity has changed to close won is not working to create the line items.

  • 20 October 2020
  • 13 replies

Userlevel 1

I am attempting a zap that is triggered by an opportunity that changes to closed won. First action will look for a customer in QBO and create one if it is missing.  Then another action use that contact to create an invoice with line items.

2 things are happening: 1 zapier does not find a changed opportunity when the stage changes to closed won, 2 the line are not being created with the invoice in QBO. 


Please help... I can't find any information on this scenario! 


Best answer by nicksimard 28 October 2020, 01:35

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

13 replies

Userlevel 4
Badge +4

Hi @Alaric, here are the only Salesforce triggers for your scenario in Zapier:


Which one of the above are you using?

Userlevel 1

Updated Field on Record

Field = Stage

Value = Closed Won


Userlevel 4
Badge +4

@Alaric is the Zap on currently? If so, are there any entries in the task history?

Userlevel 1

The task history has nothing because when the Zap is on as it is now, changing an opportunity from stage = new to stage = closed won does not trigger anything .


Running it manually gives me (excuse the name of my zap, I have been fighting with this for a while.)


The very first time it worked running it manually but it did not create the line items in QB.

Userlevel 4
Badge +4

@Alaric it should work unless the number of records you have in SF for Opportunities is over 22K or your account is Marketing Cloud.

As for the multiple lines problem, I would have to see a sample of the data coming from your opportunity to advise you best. Typically, you’ll need to convert the products into line items using Zapier formatter if they aren’t already coming into Zapier as line items. You will also need to add a QBO product search step to get the product ids for each product returned as line items, in order to use them in the product field in the line items section on the invoice.

Step 1: Formatter: Utilities - Text to Line-item

Step 2: QBO: Find Product(s)

Step 3: QBO: Create Invoice with Line items

Userlevel 1

This is a new instance so we are definitely under 22k records.  Marketing Cloud is not being used but a part of it is which is Advertising Studio.  Would that cause an issue?

As for the line items, I am not doing any Zapier formatter type activity.

The one time the Zap worked, the invoice created but with only listed one of the 2 line items.  I also had troubles knowing what to map to the line item required field of amount, so I used “amount” of the opportunity to continue testing. Which worked but if course was not right.


The Opportunity is just out of the box configuration, the trigger test find an updated record, but it fails when running the zap.

 Other than that it has 2 opportunity line items.

I think I need clear direction how to use line items, I have not found anything useful so far.  I only found things that said it was not possible.  That Salesforce did not support line items in Zapier.




Userlevel 1

These are my current steps



Where do your steps 1,2,3 fit in?

Userlevel 4
Badge +4

They would go after the find or create customer in QBO step.

Can you scroll to the product items section of the Salesforce trigger data and send a screenshot please?

Userlevel 1

I believe this is the root of my issue..



I don’t have a product items option.

Userlevel 4
Badge +4

I’m looking for the data in this section:


You’ll need to scroll through the above data to find the products. If they aren’t there then you’ll have to retrieve it from Salesforce using a record search for Opportunity products or the API.

Userlevel 1

There is nothing in that area but the opportunity fields themselves.


these are the only line item references,


Userlevel 4
Badge +4

@Alaric it Looks like we’ll need to retrieve the products from the opportunity before we search in QBO. However, I’d have to see it in person to advice you on the best course of action because figuring out the correct object to search and the id for that object is quite complicated. Send me a direct message to book some time on my calendar if you’d like me to take a look.

Userlevel 7
Badge +11

Hi @Alaric!

I’m no Salesforce expert (and things can vary so much from on instance to another) but if you’re not seeing the product line items in the trigger data, it’s likely what @CraigNet3 has suggested. Something along the lines of this would be what you’re looking for:

I don’t know if it will be exactly that, but it’s likely something along those lines, where you have to use the Opportunity ID to retrieve the associated product line items. Hope that helps point you in the right direction!