Skip to main content
Question

The app returned "Invalid Reference Id : Line.SalesItemLineDetail.ItemRef".


I want to create an invoice in the QuickBooks portal via Zapier. To achieve this, we have set up 3 events in one Zap.

  1. First Event: WPForms, which will pass data from our WordPress website to Zapier.
  2. Second Event: Find Customer. Here, I have mapped the WPForms fields to the Find Customer event. This event attempts to find the customer based on their email address. If the customer is not found, it creates a new customer in QuickBooks.
  3. Third Event: Create Invoice in QuickBooks. This uses the customer ID retrieved or created in the second event to generate the invoice.

However, I am encountering the following error:
"The app returned 'Invalid Reference Id: Line.SalesItemLineDetail.ItemRef.'"

How can I resolve this so that both the customer and invoice are successfully created in QuickBooks?
 

 

Did this topic help you find an answer to your question?

3 replies

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7304 replies
  • January 22, 2025

Hi ​@Aarnf, welcome to the Community! 🎉

I can see you’ve also reached out to the Support team about this and they had a suggestion for you. Not sure if you’ve had a chance to see their reply yet but I’ll share it here in case it’s useful to you or anyone else that might come across this thread in the future:

“I understand you're facing an issue with creating an invoice in QuickBooks using your Zap, specifically the error "Invalid Reference Id: Line.SalesItemLineDetail.ItemRef." This typically relates to the Product/Service field in the "Create Invoice" step. I noticed you have 2 Zaps on your account. I've reviewed both and believe the one you're writing about is this one: AARBF Donation Form - Production, Is that right? If I have the wrong Zap please let me know. 
 
With that in mind, It appears that this field currently doesn't have a product or service mapped or selected.
 
Here’s how you can resolve this:
 
1. Select a Product/Service: Check the Product/Service field in the "Create Invoice" step of your Zap. You'll need to select a product or service from the dropdown options available.
 
2. Use a Dynamic Field: If the product or service should change based on the details that trigger the Zap, consider adding a "Find Product" step in QuickBooks Online to your Zap. This step will return the ID of the product/service to be used dynamically.
 
Regarding the Customer, the Find/Create step you've implemented should ensure the customer is created if not found.”

Hope that helps. Feel free to reply directly to Support’s email to continue the conversation with them after giving it a try or reach out here and we’ll be happy to help further! 🙂


  • New
  • 1 reply
  • January 22, 2025

I am getting the same error message and I have the right find steps in between each one. 

Any advice?

 

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7304 replies
  • January 23, 2025

Hi @LMLWH! 👋

Sorry to hear you’re running into that error as well. It looks like the product ID value in the Product/Service field is coming from a Salesforce action:

9779e4c95f8b347ed7ba9afd63597754.png
 

So I’m wondering if the issue might be that the ID is Salesforce’s ID for the product, instead of the ID that QuickBooks has for the product. 🤔 Do you think that could be the case?

If so, then you might need to use a Find Product (Quickbooks Online) action instead of that Salesforce action, to obtain the necessary product ID that needs to be used to the Create Invoice action.

Looking forward to hearing from you!