> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualentry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Draft Accruals with Copilot and a Scheduled Agent

> Have a scheduled agent find the liabilities missing from an open period, then use Copilot to size each accrual and draft the entry you post.

Use this guide when the close is open and you are trying to work out what is missing from it: the recurring vendor bill that has not arrived, the service you consumed and have not been invoiced for, the charge that usually lands on the fifth of the month and has not appeared by the twelfth. A scheduled agent produces that list every month on its own, and Copilot sizes each accrual from your own posting history and drafts the entry.

The split matters and it is enforced rather than left to discipline. A scheduled agent reads and reports; it cannot post to the ledger. Copilot proposes an entry in a preview; nothing reaches the General Ledger until you post it yourself. For the mechanics of the entry itself, see [how to post and reverse month-end accruals](../core-financials/general-ledger/post-and-reverse-accruals).

## Before you start

Confirm all of these before you start. Check entity scope and agent ownership rather than assuming them: both decide which figures a run returns, and a wrong setting shows up as a plausible number rather than an error.

* A role that can read the accounts and vendors involved and post journal entries. Copilot inherits your [role-based permissions](../platform-configuration/user-roles-and-permissions) and cannot surface a record you could not open yourself.
* Organization admin rights to create the scheduled agent, or someone who has them. Anyone with Copilot access can see that an agent exists and when it runs, but creating, editing, pausing, and deleting one is admin only.
* A decision about who owns the agent. Every run uses the owner's role scope, so an agent owned by someone who cannot see a company returns nothing for it.
* The entity and the accounting basis the accruals belong to, decided before you create anything rather than taken from whatever the composer is set to.
* An accrued liability account in your [chart of accounts](../core-financials/general-ledger/chart-of-accounts), and an open period to post into.
* At least a few months of posting history for the vendors you want watched. An estimate from a trailing average needs something to average.

## How the pieces fit together

Three things combine here, and each has a different boundary. The schedule supplies attention, Copilot supplies the arithmetic and the draft, and you supply the judgment and the posting.

The sequence runs from an unattended monthly sweep to an entry on the books. The agent lists what looks missing from the open period, you decide which items are real accruals, Copilot sizes each one from the ledger and proposes the lines, and you post the entry with its reversal date set. Every turn along the way is written to the [audit trail](../platform-configuration/audit-trail-and-compliance).

Nothing in that chain posts on your behalf. An instruction that asks the schedule to book the accruals produces a report about them instead, because an unattended run has no write path to the ledger at all.

```mermaid theme={null}
flowchart LR
    A[Scheduled agent<br/>monthly sweep] --> B[List of likely<br/>missing liabilities]
    B --> C[You triage<br/>the list]
    C --> D[Copilot sizes and<br/>drafts the entry]
    D --> E[You post it<br/>with a reversal date]
    A -.logged.-> F[Audit trail]
    D -.logged.-> F
```

## Draft one accrual with Copilot

This walkthrough uses one accrual you already know you need, so you have a real case to work through end to end. Steps 1 through 4 draft and post that single entry; the scheduled version in the next section reuses this same flow for whatever it finds each month.

### Step 1: Scope the conversation before you ask anything

In the [Agents panel](./agents-panel) composer, set the company selector from **All companies** to the entity the accrual belongs to, and set the accounting basis selector to the basis you are closing on.

Both selectors scope the whole conversation rather than one message, and getting them wrong is the most common cause of an answer that looks precise and is not. A consolidated figure is not visibly different from an entity figure in the response text.

### Step 2: Size the accrual from the ledger

Ask for the vendor's posting history before you ask for an entry. The history is what makes the estimate defensible, and it is the thing an auditor asks about.

```text theme={null}
For this entity, show every bill and direct expense posted to Amazon Web Services
in the last 6 months. Include the record number, posting date, accounting period,
amount, and the expense account. Then show the mean of the last 3 months and note
whether anything has posted for the current period.
```

Copilot returns a sortable table with the source records attached, and shows the formula behind any calculation it performs. Open a couple of the source records and confirm the amounts before you use the average for anything.

<Info>
  Questions like this cannot change the ledger, so repeat them as often as you need while you narrow the wording. Nothing in this step commits anything.
</Info>

### Step 3: Ask for the entry, including the reversal date

Give Copilot the amount, the accounts, the date, and the reversal date. Naming the amount explicitly rather than asking Copilot to re-derive it keeps the entry tied to the figure you just checked.

```text theme={null}
Draft a journal entry for this entity accruing $18,000 of AWS hosting expense
for the current period.

Date it the last day of the period and set the reversal date to the first day of
the next period. Debit the cloud hosting expense account, credit accrued
liabilities. Tag the expense line to the Engineering department. Memo: AWS
hosting accrual, estimated from the trailing 3-month average, invoice not
received.
```

Copilot proposes the debit and credit lines in a structured preview, following your chart of accounts and any dimension requirements configured on the target accounts. Where it cannot resolve an account reference, it asks you to clarify rather than guessing at one.

### Step 4: Check the preview, then post

Read the preview as carefully as you would a manual draft, because posting from the preview is what puts the entry on the books.

Confirm four things: the accounts are the ones you meant, the period on the date is the period you are closing, the reversal date is set and falls in an open period, and the classifications required by those accounts are present. Adjust any field directly in the preview.

Post from the panel when the preview reads correctly, then attach the support to the entry on the record itself. The average you used is the support for an estimate, so paste the figures or attach the calculation rather than leaving the memo to carry it alone.

## Schedule the monthly sweep for missing liabilities

With one accrual working, schedule the part that is easy to forget: noticing what is missing. The agent produces the list. You keep Steps 2 through 4 for the items that turn out to be real.

### Step 5: Write an instruction that reports rather than posts

Draft the instruction in the composer first, under the same entity and basis the agent will carry, and keep it to a list a person then acts on.

```text theme={null}
For the current open period, list vendors with a regular posting pattern that
have nothing posted this period. For each one: vendor name, the last 3 amounts
with their posting dates, the usual day of month it posts, the expense account
it normally hits, and the mean of those 3 amounts as a suggested accrual.
Sort by suggested amount, largest first. Report only. Do not create anything.
```

Run it verbatim and check the output against the source records. An instruction that works interactively but asks for a workflow change, an approval, or a bulk reclassification fails on the schedule, because unattended runs are barred from those actions even when the owner holds the permissions.

### Step 6: Create the agent with both scoping fields set

Choose **Scheduled Agents** in the Agents panel and create the agent with the wording you just tested. Set a unique name, paste the instruction, and set:

* **Entity scope**: set it explicitly. An agent left unscoped queries every company the owner can reach and returns consolidated figures on every run, with nobody at the composer to notice.
* **Accounting basis**: set it even where GAAP is what you want.
* **Cadence**: for a close sweep, **End of month** runs on the real last day of each month, and **Monthly** on a chosen day suits a list you want waiting on the morning you start the close.
* **Timezone**: use an IANA zone such as `America/New_York`. The form pre-fills your browser's, which is not necessarily the one the close belongs to.

An agent goes live the moment it is saved. To hold it, save it and then pause it from the agent's actions menu.

<Warning>
  A scheduled agent stops itself after three consecutive failures. Open the agent occasionally and confirm it still reads **Active** with no **Last Error**.
</Warning>

### Step 7: Prove one run before you rely on it

Set a throwaway cadence that fires within minutes, let exactly one run land, then edit the cadence to the schedule you actually want. The shortest interval allowed is five minutes, and a calendar cadence set to a fixed minute can land up to four minutes late because DualEntry spreads those runs across a five-minute window.

Open the agent's conversation to read the result. That conversation is the only place output goes: there is no email digest, no Slack delivery, and no notification of any kind. The owner and organization admins can open it, and anyone else needs the session shared with the organization, so confirm the people expected to act on the list can actually read it. For the full validation path, see [how to test a scheduled agent](./how-to-test-a-scheduled-agent).

### Step 8: Work the list at close

Open the agent's conversation when you start the close. Each run appends one prompt and one response, so a year of runs sits in one place and last month's list is a scroll away rather than a re-query.

Triage before you draft. A vendor with nothing posted this period may be a genuine unrecorded liability, a service that ended, or a bill sitting unapproved in [Accounts Payable](../core-financials/accounts-payable/index). Only the first is an accrual. For each one that is, run Steps 2 through 4 in an ordinary composer session; the agent's conversation is read-only and cannot take a follow-up question.

## Save the wording as a skill

Once the sweep instruction settles, save it as a [skill](./skills) so the wording stays fixed regardless of who runs the close that month.

Choose **Skills** in the Agents panel and create the skill with the instruction body, up to 4096 characters. It is then invoked by typing `/` as the first character of a message, and a scheduled agent invokes the same wording by starting its instructions with `/skill-name`, which keeps the schedule and the wording in one place instead of two.

Put every constraint the output depends on in the skill instructions rather than in the message that invokes it. An unattended run has nobody to correct it, and a constraint typed alongside the slash command is absent on the schedule. Leave the values that change each time, such as a period or a vendor, to the invoking message: a skill that hard-codes them returns the same answer to a different question.

Creating and editing skills is restricted to organization admins, and every skill is visible to the whole organization. Editing one creates a new version, and the audit trail records which version ran, so a list you cannot reproduce later traces back to the wording that produced it.

## What this workflow cannot do

Three requests come up constantly alongside accrual automation, and none of them work the way people expect. Each has a different limit behind it, and knowing them in advance saves a wasted attempt.

**A schedule cannot post the accrual.** Unattended runs have no write path to the ledger, and they cannot approve a record, change a workflow, or apply a bulk reclassification either. Connectors are held to the same line: an unattended run receives only a connector's read-only tools, whatever the connector's **Interactive Tools** permissions say. An instruction to book the entries returns a report about them.

**A rule cannot auto-post a small charge.** Bank feed rules and [automated categorization](./automated-categorization) build a draft record and offer it as a suggestion on the **Auto** tab of the Bank Match page. There is no auto-apply toggle and no confidence threshold that applies a suggestion for you, so a standing instruction to post every Chase fee under \$50 to Bank Fees ends as a suggestion queue you clear, not as posted entries.

**Copilot does not ingest files.** The Agents panel accepts pasted tabular data, which suits a short accrual schedule you want checked against the GL. A payroll export of several hundred lines belongs in [bulk import](../integrations/bulk-import), where validation names the offending row numbers and rows with errors are held back rather than imported.

## Verify

The workflow is working when all of these hold:

* The accrual you posted in Step 4 appears on the **Posted** tab of the Journal Entries list, with its reversal linked on **Related Records**.
* The figures Copilot used trace to source records you opened, not to a number in the response text alone.
* The agent's detail view reads **Active** with no **Last Error**, and its conversation holds one exchange per run.
* Runs appear in the [audit trail](../platform-configuration/audit-trail-and-compliance) attributed to the owner and tagged as scheduled runs.
* Nothing in the agent's instruction asks it to post, approve, reclassify, or send.

## Troubleshooting

Most questions about a scheduled agent come down to scope, cadence, or where the output landed. The table below covers the ones specific to this workflow; for the full set, see [how to test a scheduled agent](./how-to-test-a-scheduled-agent).

| What you see                                                       | What to do                                                                                                                                                                    |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The agent's list is consolidated across companies                  | Entity scope is unset on the definition. Scheduled runs take scope from the definition, not from a selector.                                                                  |
| The agent returned a report when you asked it to post the accruals | Unattended runs cannot write to the ledger. Keep the instruction to a list and post from a composer session.                                                                  |
| The agent ran for a while, then went quiet                         | Three consecutive failures stop the schedule and nobody is notified. Read **Last Error**, fix the instruction, then resume, which clears the failure count.                   |
| A run produced nothing and the agent still looks healthy           | The previous run was still going when this one fired. Overlapping ticks are skipped rather than queued, so lengthen the cadence or narrow the instruction.                    |
| Copilot declines to state an amount                                | It does not guess. Missing or out-of-scope data produces a refusal rather than a number, which is the behavior you want behind a posted estimate.                             |
| The drafted entry uses an account you did not expect               | Copilot resolves accounts against your chart of accounts. Name the account number in the prompt, or correct it in the preview before posting.                                 |
| The preview will not post over a locked period                     | The entry date or the reversal date falls in a locked period. Change the date or unlock the period. See [period locking](../core-financials/close-management/period-locking). |
| The entry went to Draft instead of posting                         | An active [approval workflow](../platform-configuration/approval-workflows) matched it. It posts automatically once every stage approves.                                     |
| Nobody on the team can find the agent's output                     | Output goes to the agent's own conversation and nowhere else. The owner and admins can open it; everyone else needs the session shared with the organization.                 |

## Related reading

* [How to Post and Reverse Month-End Accruals](../core-financials/general-ledger/post-and-reverse-accruals)
* [How the AI Accounting Copilot Works](./ai-accounting-copilot)
* [Scheduled Agents: Cadence, Scoping, and Permissions](./scheduled-agents)
* [How to Test a Scheduled Agent Before You Rely on It](./how-to-test-a-scheduled-agent)
* [Copilot Skills: Slash Commands and Built-in Set](./skills)
* [How to Send Dunning Emails with Copilot and Gmail](./send-dunning-emails-with-copilot-and-gmail)
* [Journal Entries: Reference](../core-financials/general-ledger/journal-entries)
* [Month-End Close Checklist](../core-financials/close-management/month-end-close-checklist)
