Skip to main content
Version: 5.0.0

Accounts Payable

In this guide, we'll take a look at how to use Alloy to configure Accounts Payable workflows with popular Accounting and ERP systems.

Use Case Overview

When developing features for small businesses, it's crucial to quickly assess their financial position. Implementing workflows to retrieve a merchant's accounts payable data can help you automate services such as cash advances and business loans.

Define the Payload

To get started, create a workflow with a Custom Event and select the Accounting System of your choosing. You will need to define the schema you'll be sending over to Alloy in your Custom Event payload.

Next, select the Accounting System of choice. For our demo, we'll use Quickbooks.

Lookup a Vendor by Email

Next, we'll check if the Vendor exists in the Accounting System. To do so, we can look them up by email. If the Vendor exists, we'll use the Vendor Id when we create a Bill.

Add a conditional

Next, we'll introduce a conditional that checks if the Vendor exists. If the Vendor exists, we'll create a Bil. Ilf the Vendor does not exist, we'll first create a Vendor record and then Create the Bill after the Vendor record has been saved. We need to associate Vendors with Bills.

Create a Customer

If the Customer does not already exist within the Accounting System, we'll need to first create a Customer record. Creating a customer is necessary in order to properly associate a Customer to an Invoice record. Select the Create Customer action and map the relevant fields accordingly.

Create Bill

Now that we've created a Vendor, we can associate the Vendor with a Bill and create the Bill accordingly.

Wrapping Up

By now, your workflow should look like the below. To recap, let's walk through how this flow functions:

  1. Everything starts with a Custom Event. The Custom Event defines the payload your app will send over.
  2. Next, we attempt to look up a Vendor record in the Accounting System. You must have a Vendor record created in order to create an Invoice.
  3. We then introduce a conditional to check if the Vendor record exists or not. If the customer record exists, we create the Bill.
  4. If the Vendor record does not exist, the we first create a new Vendor record. Once the Vendor record is created, we then create an Bill accordingly.

A more detailed visual of this workflow can be found below.