Options

How to find which account (RECEIVABLE_INVOICE) corresponds to Invoice

MilanMilan Member Posts: 14

Hi I am trying to create a transaction to mark one of the invoices paid using "Money in Transit" account.

I noticed that there is one RECEIVABLE_INVOICE account for each Invoice created.

I have managed to create the transaction where my anchor account is money in transit account and line item account is RECEIVABLE_INVOICES account.

Is this a right way to do this? If so, how to identify RECEIVABLE_INVOICES account for the invoice I want to mark paid?

Thank you, Milan

Tagged:

Comments

  • Options
    MilanMilan Member Posts: 14

    is anyone able to answer this @PaulC ?

  • Options
    BarsinBarsin Member, Moderator Posts: 2,041 ✭✭✭

    Hey @Milan

    My apologies if I'm a bit confused as to what it is you're trying to bookkeep here. But I wanted to address a few points that I may need some more clarity on:

    Typically there should only be one accounts receivable for your invoices created. Can you send a screenshot of the multiple AR accounts you're seeing? This is not usual behaviour.

    It sounds like you might be trying to bookkeep for undeposited checks that haven't yet cleared. If so check out this article.

    https://support.waveapps.com/hc/en-us/articles/360000389783-Bookkeeping-undeposited-checks

    Also I noticed you posted this in the API thread. Is this in regards to a specific integration?

    Hope this helps but don't hesitate to reach out if you have other questions.

  • Options
    MilanMilan Member Posts: 14

    Hi @Barsin ,

    Just read that article, and yes in principal it is the same. More specifically in the same way when client pays for an invoice in Wave using Wave and the transaction is created 'between' invoice and 'Money in Transit' account;

    I am trying to do the same using API and another payment processor:

    When a transaction is initiated using 3rd party payment system I get notification (via email), I am trying to create transaction (in the similar manner as above) 'between' invoice and my custom 'Money in Transit' account (that I've created for this 3rd party payment system.

    Now I know how to create a transaction using API where I'd use 'Money in transit' account as anchor account but I am not able to identify correct account (in lineItems) so that specific invoice is being marked as payed (check my example at the end)

    I poked around and found that there are as many account's of subtype RECEIVABLE_INVOICES as there are invoices in my system. And when i create a transaction using one of these accounts' ids i got transaction create (similar to the one above). But I can't find a way to 'match' that accountId with invoice I want.

    Or am I doing this wrong completely?
    I am aware that Zappier solves this (is able to identify invoice and create matching transaction) but i am trying to do it using Wave API - which makes me wonder if Zappier integration is using the same API

    As for your question:

    Can you send a screenshot of the multiple AR accounts you're seeing? This is not usual behaviour.

    I executed this query:

    query ($businessId: ID!, $page: Int!, $pageSize: Int!) {
          business(id: $businessId) {
            id
            accounts(page: $page, pageSize: $pageSize, subtypes: [RECEIVABLE_INVOICES], ) {
              pageInfo {
                currentPage
                totalPages
                totalCount
              }
              edges {
                node {
                  id
                  name 
                }
              }
            }
          }
        }
    

    and got all these accounts

    {
      "business": {
        "id": "QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
        "accounts": {
          "pageInfo": {
            "currentPage": 1,
            "totalPages": 3,
            "totalCount": 42
          },
          "edges": [
            {
              "node": {
                "id": "QWNjb3VudDo3MTMzMTIwODcxNzQwMzg0OTY7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3MTMzMzcxNTE1ODgxNTYxMjU7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3MTMzNDIxMjIwMjI5NDU3NDM7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3MTY0MTI4MTU2MTA0OTUzMzI7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3MjY5MDI0NTA4Nzg5NTY0NTc7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3MzUzNjMzNDI1MzI2MjQ4MjQ7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3NTczNDk2MzU2NTUyMjEzNzY7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3Nzc0NzE0NTY0MjEzNjQ2MzY7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3Nzc0OTExMzkwNDg1MjIwMDE7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3ODI2MDc4NTc0OTYzNzYxMzY7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3OTAxMTA4MzU2MDYzMDc3MTM7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3OTQ0ODI0NzUyMDcyNDY0NTE7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3OTU2NDc4OTQxOTAzMDk4NzI7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3OTk0MjA4MDMyODczNjg2NDU7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo3OTk0MjgzMjQ0MTI2Mzc2Njk7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo4MDM5NTYwNTQzNDkwNzEzMzI7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo4MDk2Mzc1MjMwMDQzNDI3MDI7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo4MTI1MTEzNDEwNDU2Mjg5NTk7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo4MTkxODMyNDA0MTY4NzA0NDA7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            },
            {
              "node": {
                "id": "QWNjb3VudDo4MTkyMDAyMTE4Mzc1MzQ5NjQ7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl",
                "name": "Accounts Receivable"
              }
            }
          ]
        }
      }
    }
    

    picking one of these (as I mentioned above) and creating transaction results in correct transaction create in Wave

    Example: executed mutation MoneyTransactionCreate using variable:

    { "inputMoneyTransactionCreate":{
            "businessId": `${businessId}`,
                "externalId":   "MyExternalID_11111111",
                "date": "2020-08-22",
                "description":  "Testing JustWorks",
                "notes":    "blah blah blah",
                "anchor": {
              "accountId":`${accJustworksId}`,
              "amount": 1.99,
              "direction": "DEPOSIT"
            },
              "lineItems":    [{
            "accountId":`QWNjb3VudDo4MTkyMDAyMTE4Mzc1MzQ5NjQ7QnVzaW5lc3M6NzllY2RlNDMtOTFmNi00YTEzLThjMjQtNGU2MDNhMmZjNzFl`,
              "amount": 1.99,
              "customerId":`${customerId}`,
              "balance": "CREDIT"
            }
            ]
            }
        }
    

    and got transaction created as I needed:

    edited September 4, 2020
  • Options
    MilanMilan Member Posts: 14

    @Barsin any thoughts on this?

    edited September 10, 2020
  • Options
    MilanMilan Member Posts: 14

    @Barsin Hi I've responded to your question on Aug 21 - and haven't heard back from you?!?!

  • Options
    PaulCPaulC Member Posts: 186 ✭✭✭

    Hi @Milan,

    Thanks for your patience on this.

    Unfortunately, I don't have a solution for you on matching AR accounts to Invoices. Frankly, this is not the 'intended' way for external users to record invoice payments, and very likely these special-purpose accounts will become hidden from the API going forward.

    I can advise the team is working on a specific Invoice Payment endpoint, that will be the correct and supported approach for recording invoice payments.

    With the above caveats, if you really want to figure this out, the only suggestion I have is to start from zero unpaid invoices, and build your workflows so that each time you create / approve an invoice, you then get Accounts and identify the newly created account. This does, of course, mean you need to maintain a list of Accounts in your connected solution. Also, please note that creation of the AR Account may not be instantaneous with creation of the invoice, so you need to accomodate a little latency.

    Hope that helps.

  • Options
    MilanMilan Member Posts: 14

    Thanks Paul - this sounds like a feasible workaround. hmmm challange ! :smiley:

Sign In or Register to comment.