Skip to main content

Givebutter applies the discount to each item times quantity. I have create a spreadsheet style formatter to add the line items into a total discount amount but when there is no discount, it’s not recognizing the 0 amount in discount. What’s the best way to accomplish this? The goal is to get a total discount amount of all line items to apply to one field in Create a Sales Receipt field of QuickBooks.

 

 

Hi ​@Blue Water Surrender Inc,

 

Welcome to the Community.

In order to calculate total discounts accurately in Zapier when using Givebutter and QuickBooks, ensure each line item includes a discount field, even if it's zero. Use Zapier's Formatter tool with the "Numbers" action to sum all discounts, accounting for zero or missing values by replacing them with zero if needed. Once calculated, map the total discount to the appropriate field in QuickBooks to ensure accurate sales receipts.

If you have any further questions or need more detailed guidance, feel free to ask. We're here to help.


Hi there, ​@Blue Water Surrender Inc 👋 

Just came across this and wanted to check in—were you able to get things sorted?

If not, you mentioned that “it’s not recognizing the 0 amount in discount” so I’m wondering if it might just appear that way because multiplying any value by 0 will always return 0. So even if the quantities vary, if the discount is 0 for each line item, the result will still be 0 + the amount.

Which would mean that your formula is working as expected. To get the total discount across all line items output, you’ll want to take the output of your existing Formatter action and convert them into a list separated by + using a Formatter (Utilities > Line-item to Text) action. For example:

c7a025cc375c5b4ae4641222c4b591a7.png
 

Then, use a Formatter (Numbers > Spreadsheet-Style Formula) action to add them all together:

1eb24d34a626ac66eb136850473bc190.png
Which should give you the total:

cc9a12b9189ffedcf8ad8308e28b6716.png
 

Let us know how you get on—keen to make sure you’re all set! 🙂