Matching Sales summary report

My Job is to match Daily Square sales summary report with the help of orders API. Payments always match most of the time except on the day when daylight saving time starts/ends. However main problem that I am facing is matching of Gross sales/Discounts/Returns etc on a given day. Sometimes square add the sale of line items items on the day when order is closed and sometime on the day when order is created when the order status is COMPLETED. I have no way to determine what logic Square is using here. For OPEN order with tenders, I assume its the day when the order is created.

I know that you don’t have any API to access sales summary report directly but do you any API that gives me accurate picture on what day sale/return of a line item is recognised?

I have seen below scenarios that always cause problem.

  1. Order has only one payment. Payment is captured in the same day as order creation date and order is closed on a different day.
  2. Order has only one payment. Payment is captured in the order closed day.
  3. Order has multiple tenders in different-different dates? It happens in case of advance payment and payment of the remainder case.
  4. Order Object does not return invoice_id. Invoices can’t be filtered by dates to calculate daily summary.
  5. Transaction is created before 4 seconds of location timezone’s 00:00:00 AM and order is created at 00:00:01 AM. It makes difficult to decide in which day we should calculate the gross sales.
  6. Sometimes a return order does not reflect in the sales summary report even though it has correct location id and falls in correct time with a valid tender.

Looking forward to your help.

:wave: Do you have recent examples of these behaviors so we can look into each one?

Thank you so much for the reply Bryan. I am going to post two orders below to start this discussion. These two orders are from two different accounts in Square.

Scenario 1 : Why below order was part of financial summary on March 26th i.e. createdAt date where as next order was not?

{
  "id": "AMFR3xh2X5HGqzX6a0v4ixqeV",
  "locationId": "LMDXC1N7GC990",
  "lineItems": [
   {
    "uid": "7A06CB6F-976E-4609-9D0A-DB4544AB15EB",
    "quantity": "1",
    "itemType": "CUSTOM_AMOUNT",
    "appliedTaxes": [
     {
      "uid": "9713A7C3-B842-4AEA-A3F1-57A0C01FAA13",
      "taxUid": "E872A52A-35A3-4EDC-A051-EC6E40F1812F",
      "appliedMoney": {
       "amount": 42,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 600,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 600,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 600,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 42,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 642,
     "currency": "USD"
    }
   }
  ],
  "taxes": [
   {
    "uid": "E872A52A-35A3-4EDC-A051-EC6E40F1812F",
    "catalogObjectId": "TDGMCR5MGSS7CYX3DDG5AJC6",
    "catalogVersion": 1637686514770,
    "name": "Sales Tax",
    "type": "ADDITIVE",
    "percentage": "7",
    "appliedMoney": {
     "amount": 42,
     "currency": "USD"
    },
    "scope": "LINE_ITEM"
   }
  ],
  "returnAmounts": {
   "totalMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "netAmounts": {
   "totalMoney": {
    "amount": 642,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 42,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "tenders": [
   {
    "id": "vNbcSMqalfshCNfvp23rYkt5vaB",
    "locationId": "LMDXC1N7GC990",
    "transactionId": "AMFR3xh2X5HGqzX6a0v4ixqeV",
    "createdAt": "2022-03-26T23:11:53Z",
    "amountMoney": {
     "amount": 642,
     "currency": "USD"
    },
    "processingFeeMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "type": "CASH",
    "cashDetails": {
     "buyerTenderedMoney": {
      "amount": 2000,
      "currency": "USD"
     },
     "changeBackMoney": {
      "amount": 1358,
      "currency": "USD"
     }
    }
   }
  ],
  "createdAt": "2022-03-26T23:11:53.000Z",
  "updatedAt": "2022-03-27T04:30:54.000Z",
  "closedAt": "2022-03-27T04:30:54.000Z",
  "state": "COMPLETED",
  "totalMoney": {
   "amount": 642,
   "currency": "USD"
  },
  "totalTaxMoney": {
   "amount": 42,
   "currency": "USD"
  },
  "totalDiscountMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalTipMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalServiceChargeMoney": {
   "amount": 0,
   "currency": "USD"
  }
 }

Scenario 2 : Why below order was part of financial summary on Jan 4h?

{
  "id": "F4QOagyvAaezSPQxAPfYZk1eV",
  "locationId": "DCAKJ9KV28K3W",
  "customerId": "SA3G592XXS4RHAPZ0225R6AQ0C",
  "lineItems": [
   {
    "uid": "81ddb218-d0c2-4f43-afa4-3d4e1f501ecd",
    "quantity": "1",
    "note": "Partial Invoice Payment",
    "itemType": "CUSTOM_AMOUNT",
    "basePriceMoney": {
     "amount": 2513,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 2513,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 2513,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 2513,
     "currency": "USD"
    }
   }
  ],
  "returnAmounts": {
   "totalMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "netAmounts": {
   "totalMoney": {
    "amount": 2513,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "tenders": [
   {
    "id": "hqF6tZ7CXFQ294OyhtIFyGvruaB",
    "locationId": "DCAKJ9KV28K3W",
    "transactionId": "F4QOagyvAaezSPQxAPfYZk1eV",
    "createdAt": "2021-12-07T20:09:29Z",
    "amountMoney": {
     "amount": 2513,
     "currency": "USD"
    },
    "tipMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "processingFeeMoney": {
     "amount": 103,
     "currency": "USD"
    },
    "customerId": "8FQVX326P12XQ7Z39PB282KQR4",
    "type": "CARD",
    "cardDetails": {
     "status": "CAPTURED",
     "card": {
      "cardBrand": "VISA",
      "last4": "6815"
     },
     "entryMethod": "KEYED"
    }
   }
  ],
  "createdAt": "2021-12-07T20:09:29.000Z",
  "updatedAt": "2022-01-04T16:21:35.000Z",
  "closedAt": "2022-01-04T16:21:35.000Z",
  "state": "COMPLETED",
  "totalMoney": {
   "amount": 2513,
   "currency": "USD"
  },
  "totalTaxMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalDiscountMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalTipMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalServiceChargeMoney": {
   "amount": 0,
   "currency": "USD"
  }
 }

The first is a payment was completed on the POS it was created and completed same day. The second is an invoice. It was created and sent out to be paid for. It was paid for on 2022-01-04. :slightly_smiling_face:

Thank you Bryan. Apart from looking at the note as that’s most probably entered by the customer how did you decide that the second order is an invoice order?

You can’t tell with the order but you can with the payment. It includes application_details:

"application_details": {
                "square_product": "INVOICES"
            }

:slightly_smiling_face:

Thank you Bryan :blush: . Your suggestion was really helpful. So far no complaints from customers. I wish this information was included in order. To anyone else reading, you can’t find payment using order id. order.tenders.id seems to be the payment id.

Great, glad that helped. Yes the tender_id is equal to the payment_id that you can use to get the payment. :slightly_smiling_face:

There is another order. It’s line items are being summarised when order is closed but not when it was created. But it’s now showing up as invoice.

{
  "id": "OIjIGReER4fOZG3qXRFnnCdp9CJZY",
  "locationId": "LC66E87HGF20B",
  "source": {},
  "customerId": "HB1ZVZ9A795BK4QW3MRW073V18",
  "lineItems": [
   {
    "uid": "5f11aaab-f9fc-4dac-bd97-515d69a21163",
    "name": "Bud Light",
    "quantity": "3",
    "catalogObjectId": "ADNHJX2YKBMOD4ALOVHXDDGW",
    "catalogVersion": 1644342821733,
    "variationName": "24PK Cans 12oz",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "4e932d6e-ee46-4586-89a8-ae59d79def67",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 289,
       "currency": "USD"
      }
     }
    ],
    "appliedDiscounts": [
     {
      "uid": "6a7a6fd7-a2ee-49dc-abc5-311200ea5ad6",
      "discountUid": "6a7a6fd7-a2ee-49dc-abc5-311200ea5ad6",
      "appliedMoney": {
       "amount": 900,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2049,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 6147,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 6147,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 289,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 900,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 5536,
     "currency": "USD"
    }
   },
   {
    "uid": "29b8094c-8bcf-44dd-b78e-e0fa5354198f",
    "name": "Bud Light Flavors",
    "quantity": "1",
    "catalogObjectId": "VJBWZW73GQ5YVJSZHFQESNU7",
    "catalogVersion": 1644342352626,
    "variationName": "Lime 6PK Bottles",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "9fe79387-f72c-4812-ba15-d50d96b32ed2",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 45,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 819,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 819,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 819,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 45,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 864,
     "currency": "USD"
    }
   },
   {
    "uid": "71c2db4a-19b2-4d2e-8e3a-4da5b2125364",
    "name": "Busch Light",
    "quantity": "5",
    "catalogObjectId": "AU4EDEILCH4QPHVUMGBFGJXB",
    "catalogVersion": 1644527980367,
    "variationName": "30PK Cans",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "4e932d6e-ee46-4586-89a8-ae59d79def67",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 550,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2000,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 10000,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 10000,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 550,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 10550,
     "currency": "USD"
    }
   },
   {
    "uid": "858fbdd7-d862-4f46-bfae-9c52b01224c9",
    "name": "Captain Morgan",
    "quantity": "4",
    "catalogObjectId": "343KCSEWGXSFVF2ZO3IVWPTA",
    "catalogVersion": 1646504181895,
    "variationName": "Spiced Plastic 1.75L",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "1323ef49-a037-4abe-8192-256a92cfe96e",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 605,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2749,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 10996,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 10996,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 605,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 11601,
     "currency": "USD"
    }
   },
   {
    "uid": "d7981b5d-a0f8-40fc-b325-d55f23e43dae",
    "name": "Coca Cola Soda 2L",
    "quantity": "3",
    "catalogObjectId": "ZVM4XKEBFNEUOHHZT5U5NLWC",
    "catalogVersion": 1643225706362,
    "variationName": "Coke Classic",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 44,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 269,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 807,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 807,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 44,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 851,
     "currency": "USD"
    }
   },
   {
    "uid": "2ffd42ae-90b2-4c94-b6dc-ec2d8b761d15",
    "name": "Coors Light",
    "quantity": "2",
    "catalogObjectId": "MOBHEZ2PWYLQQRURN3OU6GB4",
    "catalogVersion": 1643729401423,
    "variationName": "24PK 12oz Cans",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "4e932d6e-ee46-4586-89a8-ae59d79def67",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 225,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2049,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 4098,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 4098,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 225,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 4323,
     "currency": "USD"
    }
   },
   {
    "uid": "6389b5d8-5044-4278-9528-17f28f5cabd2",
    "name": "Dr. Pepper/7UP 2L Bottles",
    "quantity": "1",
    "catalogObjectId": "YB25GAF7QI25SWAQI4MTI65Q",
    "catalogVersion": 1643853105485,
    "variationName": "7up",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 11,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 199,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 199,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 199,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 11,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 210,
     "currency": "USD"
    }
   },
   {
    "uid": "e1579016-fdf7-4ee8-b24d-0f202cab62d3",
    "name": "Ice",
    "quantity": "2",
    "catalogObjectId": "52LG5DBZO5TQIR4GB53QUMVM",
    "catalogVersion": 1646253877658,
    "variationName": "20LB Bag",
    "itemType": "ITEM",
    "basePriceMoney": {
     "amount": 400,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 800,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 800,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 800,
     "currency": "USD"
    }
   },
   {
    "uid": "c438578f-c576-4e6a-8394-c10dae87c6b6",
    "name": "Miller Lite",
    "quantity": "1",
    "catalogObjectId": "LPZB3JAYNHCRACT44EYNZEHX",
    "catalogVersion": 1643729375658,
    "variationName": "24PK 16oz Cans",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 108,
       "currency": "USD"
      }
     }
    ],
    "appliedDiscounts": [
     {
      "uid": "ce4f8078-0805-4781-ac37-2604798cc483",
      "discountUid": "ce4f8078-0805-4781-ac37-2604798cc483",
      "appliedMoney": {
       "amount": 300,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2259,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 2259,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 2259,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 108,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 300,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 2067,
     "currency": "USD"
    }
   },
   {
    "uid": "b5475c4e-b2e9-45e9-bbb9-d2d013aa7b8d",
    "name": "Pepsi Cola 12PK",
    "quantity": "2",
    "catalogObjectId": "OJY6LY4NT7NUKMC4IZNDJQWZ",
    "catalogVersion": 1643385098630,
    "variationName": "Mountain Dew",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "caa3c01a-69e5-4e88-ab8d-de01130c06b6",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 88,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 799,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 1598,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 1598,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 88,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 1686,
     "currency": "USD"
    }
   },
   {
    "uid": "480d7094-9669-4332-b06c-ab96d7109b1b",
    "name": "Seagrams 7 Crown 1.75 lt",
    "quantity": "1",
    "catalogObjectId": "VVEADLURIGIXBETQMJGGTV7Q",
    "catalogVersion": 1611681294157,
    "variationName": "",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "522a98b0-2398-4480-8ee4-3eee0633a693",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 115,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 2099,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 2099,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 2099,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 115,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 2214,
     "currency": "USD"
    }
   },
   {
    "uid": "eabac200-7436-49f7-8e26-1e2c24b6472b",
    "name": "Titos Vodka",
    "quantity": "1",
    "catalogObjectId": "OUO2EFET6KR4LF2QBVNQLM4Z",
    "catalogVersion": 1643062313946,
    "variationName": "1.75L",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 179,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 3249,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 3249,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 3249,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 179,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 3428,
     "currency": "USD"
    }
   },
   {
    "uid": "98f13390-8ce9-4555-b39b-251bbc19ffaa",
    "name": "White Claw",
    "quantity": "1",
    "catalogObjectId": "WFZ6IREHCGA2MXNM67JVNWOD",
    "catalogVersion": 1647441631886,
    "variationName": "Variety #3 12PK",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "4e932d6e-ee46-4586-89a8-ae59d79def67",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 102,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 1849,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 1849,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 1849,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 102,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 1951,
     "currency": "USD"
    }
   },
   {
    "uid": "51fdae98-f028-47fa-9d37-5a5684ee1c63",
    "name": "White Claw",
    "quantity": "3",
    "catalogObjectId": "PBUMFRVVX6F2SG5CHUZULFIX",
    "catalogVersion": 1647441631886,
    "variationName": "Variety #1 12PK",
    "itemType": "ITEM",
    "appliedTaxes": [
     {
      "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "taxUid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
      "appliedMoney": {
       "amount": 305,
       "currency": "USD"
      }
     }
    ],
    "basePriceMoney": {
     "amount": 1849,
     "currency": "USD"
    },
    "variationTotalPriceMoney": {
     "amount": 5547,
     "currency": "USD"
    },
    "grossSalesMoney": {
     "amount": 5547,
     "currency": "USD"
    },
    "totalTaxMoney": {
     "amount": 305,
     "currency": "USD"
    },
    "totalDiscountMoney": {
     "amount": 0,
     "currency": "USD"
    },
    "totalMoney": {
     "amount": 5852,
     "currency": "USD"
    }
   }
  ],
  "taxes": [
   {
    "uid": "85f3abf1-76e5-4195-b167-fe1768608d6f",
    "catalogObjectId": "6WGQK4G4PJVW5UILZ33USHGU",
    "catalogVersion": 1607272114955,
    "name": "WI Tax",
    "type": "ADDITIVE",
    "percentage": "5.5",
    "appliedMoney": {
     "amount": 2666,
     "currency": "USD"
    },
    "scope": "LINE_ITEM"
   }
  ],
  "discounts": [
   {
    "uid": "ce4f8078-0805-4781-ac37-2604798cc483",
    "catalogObjectId": "35ZSEIFAH5NSAZJJKTVARIQ5",
    "catalogVersion": 1652728099150,
    "name": "Miller Lite $3 Off 24/30PKS",
    "type": "FIXED_AMOUNT",
    "amountMoney": {
     "amount": 300,
     "currency": "USD"
    },
    "appliedMoney": {
     "amount": 300,
     "currency": "USD"
    },
    "scope": "LINE_ITEM"
   },
   {
    "uid": "6a7a6fd7-a2ee-49dc-abc5-311200ea5ad6",
    "catalogObjectId": "64IJQCLQUPZLQDHWNGFTKIDV",
    "catalogVersion": 1648491390379,
    "name": "Bud Family $3 Off 24PKS",
    "type": "FIXED_AMOUNT",
    "amountMoney": {
     "amount": 300,
     "currency": "USD"
    },
    "appliedMoney": {
     "amount": 900,
     "currency": "USD"
    },
    "scope": "LINE_ITEM"
   }
  ],
  "returnAmounts": {
   "totalMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "netAmounts": {
   "totalMoney": {
    "amount": 51933,
    "currency": "USD"
   },
   "taxMoney": {
    "amount": 2666,
    "currency": "USD"
   },
   "discountMoney": {
    "amount": 1200,
    "currency": "USD"
   },
   "tipMoney": {
    "amount": 0,
    "currency": "USD"
   },
   "serviceChargeMoney": {
    "amount": 0,
    "currency": "USD"
   }
  },
  "tenders": [
   {
    "id": "1M5GZRdfyxUjEsu7j0QsHWoGvaB",
    "locationId": "LC66E87HGF20B",
    "transactionId": "OIjIGReER4fOZG3qXRFnnCdp9CJZY",
    "createdAt": "2022-05-20T16:52:53Z",
    "amountMoney": {
     "amount": 51933,
     "currency": "USD"
    },
    "type": "CASH",
    "cashDetails": {
     "buyerTenderedMoney": {
      "amount": 51933,
      "currency": "USD"
     },
     "changeBackMoney": {
      "amount": 0,
      "currency": "USD"
     }
    },
    "payment": {
     "id": "1M5GZRdfyxUjEsu7j0QsHWoGvaB",
     "createdAt": "2022-05-20T16:52:57.088Z",
     "amountMoney": {
      "amount": 51933,
      "currency": "USD"
     },
     "totalMoney": {
      "amount": 51933,
      "currency": "USD"
     },
     "status": "COMPLETED",
     "sourceType": "CASH",
     "cashDetails": {
      "buyerSuppliedMoney": {
       "amount": 51933,
       "currency": "USD"
      },
      "changeBackMoney": {
       "amount": 0,
       "currency": "USD"
      }
     },
     "locationId": "LC66E87HGF20B",
     "orderId": "OIjIGReER4fOZG3qXRFnnCdp9CJZY",
     "employeeId": "TMLnAbTA4JW0NQqt",
     "teamMemberId": "TMLnAbTA4JW0NQqt",
     "receiptNumber": "1M5G",
     "receiptUrl": "https://squareup.com/receipt/preview/1M5GZRdfyxUjEsu7j0QsHWoGvaB",
     "deviceDetails": {
      "deviceId": "042CS079A5000483",
      "deviceInstallationId": "a3a04777-e6b9-4bdb-adfc-675f31035ab7",
      "deviceName": "Register 1"
     },
     "applicationDetails": {
      "squareProduct": "OTHER"
     },
     "versionToken": "D7xFD5Y5k1krMNMW1EPvyPehPdO5nOnNNGnqJDGxqvj6o"
    }
   }
  ],
  "createdAt": "2022-05-11T13:14:45.633Z",
  "updatedAt": "2022-05-20T16:52:58.000Z",
  "closedAt": "2022-05-20T16:53:03.839Z",
  "state": "COMPLETED",
  "version": 7,
  "totalMoney": {
   "amount": 51933,
   "currency": "USD"
  },
  "totalTaxMoney": {
   "amount": 2666,
   "currency": "USD"
  },
  "totalDiscountMoney": {
   "amount": 1200,
   "currency": "USD"
  },
  "totalTipMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "totalServiceChargeMoney": {
   "amount": 0,
   "currency": "USD"
  },
  "square_product": [
   "OTHER"
  ]
 }

Right, this is an invoice that was paid for in cash at the register. :slightly_smiling_face:

We have encountered the Square sales summary report considering invoice orders which have a state of OPEN as gross sales. I was curious why this is occurring as generally my understanding isall OPEN orders are not considered at gross sales for the sales summary reporting. Example order below:

{
    "order": {
        "id": "06LMqVeVa0MyfOkEynL0e1bRErIZY",
        "location_id": "LHAFZN7TXSEYZ",
        "line_items": [
            {
                "uid": "c111478d-b370-43f1-9469-e9b4fea3daac",
                "catalog_object_id": "A4B3FIMGGLU46HQX7OUB5RMH",
                "catalog_version": 1697572490419,
                "quantity": "2",
                "name": "WHOLESALE",
                "variation_name": "OMITTED",
                "base_price_money": {
                    "amount": 926,
                    "currency": "USD"
                },
                "gross_sales_money": {
                    "amount": 1852,
                    "currency": "USD"
                },
                "total_tax_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_discount_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_money": {
                    "amount": 1852,
                    "currency": "USD"
                },
                "variation_total_price_money": {
                    "amount": 1852,
                    "currency": "USD"
                },
                "item_type": "ITEM",
                "total_service_charge_money": {
                    "amount": 0,
                    "currency": "USD"
                }
            },
            {
                "uid": "a1c5566a-2eca-470c-a5a9-e3b23ec89be3",
                "catalog_object_id": "4C4WNEFT7REETZ4OJKA2NMSB",
                "catalog_version": 1697572490419,
                "quantity": "3",
                "name": "WHOLESALE",
                "variation_name": "OMITTED",
                "base_price_money": {
                    "amount": 904,
                    "currency": "USD"
                },
                "gross_sales_money": {
                    "amount": 2712,
                    "currency": "USD"
                },
                "total_tax_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_discount_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_money": {
                    "amount": 2712,
                    "currency": "USD"
                },
                "variation_total_price_money": {
                    "amount": 2712,
                    "currency": "USD"
                },
                "item_type": "ITEM",
                "total_service_charge_money": {
                    "amount": 0,
                    "currency": "USD"
                }
            }
        ],
        "fulfillments": [
            {
                "uid": "j7nfrlu2Cnlw2J75iBzG3D",
                "type": "SHIPMENT",
                "state": "PROPOSED",
                "shipment_details": {
                    "recipient": {
                        "display_name": "OMITTED",
                        "email_address": "OMITTED"
                    },
                    "placed_at": "2023-12-15T20:50:31.003Z"
                }
            }
        ],
        "created_at": "2023-11-13T16:04:58.674Z",
        "updated_at": "2023-12-15T20:50:32.000Z",
        "state": "OPEN",
        "version": 11,
        "total_tax_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_discount_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_tip_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_money": {
            "amount": 4564,
            "currency": "USD"
        },
        "tenders": [
            {
                "id": "HFpS7ufs4NLMLmJJg0KrfFriiaQZY",
                "location_id": "LHAFZN7TXSEYZ",
                "transaction_id": "06LMqVeVa0MyfOkEynL0e1bRErIZY",
                "created_at": "2023-12-15T20:50:30Z",
                "note": "",
                "amount_money": {
                    "amount": 4564,
                    "currency": "USD"
                },
                "processing_fee_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "type": "OTHER",
                "tip_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "payment_id": "HFpS7ufs4NLMLmJJg0KrfFriiaQZY"
            }
        ],
        "total_service_charge_money": {
            "amount": 0,
            "currency": "USD"
        },
        "net_amounts": {
            "total_money": {
                "amount": 4564,
                "currency": "USD"
            },
            "tax_money": {
                "amount": 0,
                "currency": "USD"
            },
            "discount_money": {
                "amount": 0,
                "currency": "USD"
            },
            "tip_money": {
                "amount": 0,
                "currency": "USD"
            },
            "service_charge_money": {
                "amount": 0,
                "currency": "USD"
            }
        },
        "source": {
            "name": "Invoices"
        },
        "customer_id": "TRPXPHCQGB8STGABCR0C697KRW",
        "net_amount_due_money": {
            "amount": 0,
            "currency": "USD"
        }
    }
}

With Square OPEN orders do count to the gross sales because orders can have multiple states of fulfillment. :slightly_smiling_face:

What then drives an order to be recognized as gross sales in the sales summary report? e.g. in the order above, what drove the recognition of it in the sales summary report since the order is OPEN?

The tenders because the order is paid for. :slightly_smiling_face:

Since the order is OPEN, couldn’t an item then be added to this order and then the tender total does not match the line item total indicating the order is not completely paid?

With Square orders if they’re OPEN and fully paid for then no additional items can be added to the order. The fulfillment state will need to be updated to COMPLETED for the order to then be updated to COMPLETED. :slightly_smiling_face: