AI Agents
Mercoa currently offers AI agent support for accounts receivable with our Invoicing Agent, MAi. MAi can:
- Read and understand complex B2B contracts
- Contact customers to collect overdue payments
- Contact vendors to send upcoming invoices on time
- Edit invoices and billing schedules with natural language
To make our agentic workflows fully embeddable, we expose API endpoints you can use to control and respond to these behaviors from within your platform.
Contract Understanding
MAi actions upon B2B contracts by breaking each contract down into contract details and payment schedules.
To start using MAi, you can pass a contract PDF to our Generate Contract endpoint as a Base64 encoded string:
MAi will respond with a Contract
object with the following structure:
Contract Object
ContractRecurrence Object
You can also create or update a Contract
directly via our CRUD endpoints.
Automated Invoice Creation + Payment Collection
Once contracts have been set up, MAi automatically creates a draft Mercoa Invoice
a week before the invoice should be sent out. You can then edit the created invoice using natural language, and send the invoice out for payment using Mercoa’s Invoice API endpoints or the accounts receivable UI components.
MAi will then continue to monitor the invoice until it is paid, and will automatically send collection emails to the customer if the invoice is overdue.
Natural Language Editing
MAi also supports editing contracts and invoices with natural language.
Contract Editing
Let’s say a user provides a sentence describing a change they would like to make to the Contract
MAi initially generated. You can accomplish this with one API call to the Apply Contract Feedback endpoint:
Invoice Editing
When MAi doesn’t have all the information it needs (e.g. how many units were sold this month), it may create an incomplete or incorrect Invoice
object. When this happens, you can complete the Invoice
object with the Apply Invoice Feedback endpoint: