# Spend requests and procurement

> Ask before the money goes out: a member, an agent or the assistant raises a spend request, a person approves it through your approval tiers, and a bookkeeper turns it into a draft bill, a reimbursement claim or a purchase order. For a larger purchase, invite vendors by e-mail, record and grade their bids, and award one into a purchase order.

Source: /help/en/bills/spend-requests-and-procurement

A **spend request** is a question asked before anything is bought: what is needed, what it costs and why. In Alya Books it lives under **Spend Requests** in the **Purchases** group of the menu. A request posts nothing to the books and pays nobody. A person approves it, and only then does a bookkeeper turn it into the record that carries the purchase: a [bill](/help/en/bills/record-and-approve-a-bill), a [reimbursement claim](/help/en/bills/expenses-and-reimbursements) or a [purchase order](/help/en/bills/purchase-orders).

When the purchase is large enough to compare prices, the same request carries a small **Sourcing** stage: you invite vendors by e-mail, record what each one offers, grade the bids and award one.

## Before you start

- **Settings → Accounting → Modules → Spend requests** must be **Enabled**. The module is in every plan. While it is off, **Spend Requests** is not in the menu.
- Request numbers come from their own series (`SR-0001`, `SR-0002`, …).
- Decide who approves. Either add a tier (see [Who approves](#who-approves-the-tiers)) or leave it to the default described there.
- Decide whether a purchase-order request needs its vendor before it is submitted. By default it does; see [Request settings](#request-settings-the-vendor-on-a-purchase-order-request).

## Raising a request

**Spend Requests → New request.** Any member of the organisation may raise one.

1. **Kind.** Choose what the request becomes once it is approved:

| Kind | What it becomes |
|---|---|
| **Bill** | a draft bill from the vendor |
| **Reimbursement** | a reimbursement claim for the requester, who pays first |
| **Purchase order** | a draft purchase order to the vendor |

2. **Vendor.** A bill request needs its vendor before it is submitted. A purchase order request needs one too, unless your [Request settings](#request-settings-the-vendor-on-a-purchase-order-request) say otherwise: without a vendor, **Save and submit** is greyed out and the form says "A vendor is needed to submit a purchase-order request. Save the draft to invite vendors to bid on it: the awarded bid fills in the vendor and submits the request." A purchase order request is never converted without a vendor. A reimbursement needs none.
3. **Currency** and **Needed by**, the date you need the goods or the service.
4. **Lines.** Each line has a **Description**, an **Amount (net)**, an **Account** and a **Tax rate**. Amounts are net, before tax. **Add line** adds another; the **Total (net)** is what the approvers see.
5. **Justification.** Why it is needed. The approvers read it.
6. **Save draft** to finish later, or **Save and submit** to send it for approval straight away.

A draft can be changed with **Edit**, sent with **Submit**, or removed with **Delete**. The list has three chips, **Mine**, **To approve** and **All**, a status filter and a search by number, vendor, requester or description.

## Request settings: the vendor on a purchase-order request

**Spend Requests → Request settings** opens **Spend request settings**. Owners, admins and accountants see the button and change the setting; the rule applies to everyone who raises a request.

**Vendor on purchase-order requests** has three choices:

| Choice | What it means |
|---|---|
| **Required before submitting** (the default) | A purchase-order request names its vendor before it is submitted. You can still invite vendors to bid on the draft: the awarded bid fills in the vendor and submits the request for approval at the bid's amount. |
| **Required unless vendors are invited** | A purchase-order request is submitted with a vendor, or once vendors are invited to bid on the draft. |
| **Not required: the vendor can be sourced after approval** | A purchase-order request is submitted and approved without a vendor; you invite vendors after the approval, and **Convert** asks for the vendor. |

**Save** keeps the choice ("Spend request settings saved"). A request submitted without the vendor the rule asks for is refused with `vendor_required`, and the request's page says "A vendor is needed before this request is submitted". Name the vendor, or invite vendors on the draft and award a bid.

## What an agent or the assistant may do

An [agent](/help/en/ai-assistant/agents-skills-and-guardrails) or the AI assistant may **raise** a request and **submit** it for the person it acts for. Once you confirm, it may also invite vendors, record a bid and award one. It never spends anything, and it never approves or declines.

- A request an agent or the assistant raised is marked **Raised by an agent** in the list and on its page, and its **Approval** card says: "An agent raised this request. A person decides it: an agent can never approve or decline."
- The decision is taken by a signed-in person, in the app. An agent, the assistant and an API key are all refused when they try (`same_actor_kind`), whoever they act for.
- In the request's **History**, the agent stays the one who created the request and the approver is the person who decided.

## Who approves: the tiers

Approvers are never picked by the person who asks. They come from your tiers.

[**Settings → Accounting → Posting approvals**](/help/en/settings/posting-approvals) **→ Add tier**, with **Source** set to **Spend request**:

- **From amount**: the tier takes requests of this amount or more, compared in your base currency. Zero takes every request.
- **Accounts (optional filter)**: only requests with a line on one of these accounts; leave it empty for any account.
- **Approvers** and **Approver roles**: the people who decide. The requester is always left out.
- **Priority** orders the tiers; the first one that fits the amount and the accounts is used, and its name shows on the request as **Approval tier: …**. Every approver the tier names must approve; one decline declines the request.

A tier with the source **Any of these** also takes spend requests.

Without a tier that fits:

1. the organisation's **Default approvers** (**Settings → Accounting → Bill approvals**) are asked, level by level, without the requester;
2. if there are none, one owner or admin other than the requester is asked;
3. a sole owner, with nobody else to ask, decides their own request. It is still a person who decides.

## Approving and declining

Submitting sends the notification **Spend request to approve** to the approvers. An approver decides in either of two places:

- On the request's page, in the **Approval** card: an optional comment, then **Approve** or **Decline**.
- Under **Approvals**, where the request is listed with the subject **Spend request**, its number and its amount, together with everything else waiting for that person.

The requester receives **Spend request decided** with the outcome. An approved request shows the status **Approved** and its **Approved amount**. A declined one shows a **Declined** banner with the approver's comment as the reason.

An owner or admin may decide in an approver's place, but not on a request they raised themselves.

## Converting an approved request

Approval and conversion are two separate steps, by design: the approver says yes, the bookkeeper makes the record.

On an approved request, an owner, an admin or an accountant chooses **Convert** and confirms. The request becomes:

- a **draft bill** from the vendor, dated today, with one line per request line and the request number as its order reference;
- a **reimbursement claim** in the requester's name, as a draft;
- a **draft purchase order** to the vendor.

The request then reads **Converted** and a banner links to the record; the record keeps the link back. From there the record follows its own flow, exactly as if you had typed it: a bill is reviewed, accepted and paid (with its own payment approval when your settings ask for one), a claim is submitted and approved, a purchase order is sent to the vendor.

**Tax.** A line with a **Tax rate** converts with that rate. A line left at **No tax** converts with no tax at all, so the record's total is the net amount the approvers saw. Pick a tax rate on the request when the purchase carries VAT, or set it on the draft record before you accept it.

## Declined, cancelled, withdrawn

- **Declined.** **Edit** the request (it becomes a draft again) and **Submit again**, or submit it again as it is. The approvers are asked afresh.
- **Withdraw request** in the **Approval** card takes a submitted request back to a draft so that you can change it.
- **Cancel** stops a request at any point before it is converted, with an optional reason the approvers and the requester can read. A pending approval is withdrawn and open sourcing is closed. In the list, select several requests and use **Cancel selected** to cancel them with one reason.
- A converted request cannot be cancelled: cancel or void the bill, claim or purchase order it became.

The requester may edit, submit, withdraw and cancel their own request; an owner, admin or accountant may do so for any request.

## Who sees a request

A request is seen by the person who raised it, by the owners, admins and accountants, and by the approvers named on it. Other members do not see it. The vendors invited to bid and their bids are seen by the same people.

## Sourcing: invite vendors, compare bids, award

The **Sourcing** card on a request's page is for an owner, an admin or an accountant. It works on a draft, submitted or approved request. Under the default rule (**Required before submitting**) a purchase-order request without a vendor is sourced while it is a draft: the award fills in the vendor and submits it.

### Inviting vendors

**Invite vendors**: add each vendor (up to 20), set **Bids due by** if there is a deadline, and choose **Send invitations**.

- Each vendor with an e-mail address on its contact receives one e-mail, sent from your organisation's own [sending identity](/help/en/settings/sending-settings), in the language you are working in. It lists the request's lines and the deadline, and its subject carries a reference in square brackets: the request number and a short code, for example `[SR-0007 · a1b2c3d4]`.
- A vendor without an address is listed as **No e-mail address** and is not e-mailed; ask that vendor another way.
- The card shows each invitation as **Sent** with its date, or **Not sent** with the reason. **Send unsent invitations** tries those again; **Invite more vendors** adds vendors to the same round.

There is no vendor portal and nothing is published anywhere. The vendor answers by replying to the e-mail, the reply arrives at the reply address of your sending settings, and the reference in the subject tells you which request and which vendor it belongs to.

### Recording the bids

When a reply arrives, record it yourself:

1. Upload the vendor's offer under **Documents** in the menu, then link it on the request's **Documents** card with **Link a document**.
2. On the **Sourcing** card choose **Record bid**: the **Vendor**, the **Amount, net**, the **Vendor's file** you just linked and a **Note**.

One bid per vendor: recording again for the same vendor replaces the bid and clears its grade. The bids are listed cheapest first.

### Grading and awarding

- **Grade** each bid from 1 to 5 with the buttons in its row. The grade is your own judgement of the offer (price, delivery, quality); it does not choose the winner for you.
- **Award** on the bid you choose, then confirm. The request becomes a purchase order request to that vendor for the bid's amount, its lines are scaled to that amount in proportion, and the other bids are marked **Not awarded**.
- If the request was already approved for at least the bid's amount, the purchase order is raised at once and the request reads **Converted**.
- Otherwise (the request was not approved yet, or the bid is higher than what was approved) the request goes for approval of the new amount. Once a person approves it, **Convert** raises the purchase order.
- **Close without award** ends the round with an optional reason. No bid wins, no more bids are taken and the request stays as it is. **Invite vendors** later opens a new round.

## Walkthrough 1: an agent asks, a person approves, the accountant converts

Golden Trading has a tier named `Requests from 1,000` with the source **Spend request**, **From amount** `1000` and its approver.

1. An agent raises a request of the kind **Bill** for office supplies: 4,500.00 net, the stationery vendor, the office supplies account. It submits the request.
2. The request appears under **Spend Requests** as **Submitted**, marked **Raised by an agent**. Its **Approval** card reads **Approval tier: Requests from 1,000** and names the approver.
3. If the agent is asked to approve it, it is refused: a person decides.
4. The approver opens **Approvals**, finds the **Spend request** of 4,500.00, opens it and chooses **Approve**. The request reads **Approved**, with **Approved amount** 4,500.00.
5. The accountant opens the request and chooses **Convert**. The message "Draft bill … created" appears, the request reads **Converted**, and the banner "This request became a draft bill" links to it.
6. The bill is a draft from the stationery vendor for 4,500.00 with the request's line. The accountant reviews and accepts it like any other bill.

The same steps with the kind **Reimbursement** end in a reimbursement claim for the requester, and with **Purchase order** in a draft purchase order.

## Walkthrough 2: two vendors bid for the office furniture

Golden Trading sources its larger purchases after the approval: its **Request settings** read **Not required: the vendor can be sourced after approval**.

1. A member raises a **Purchase order** request for office furniture with two lines, desks 6,000.00 and chairs 3,000.00 (9,000.00 net), and submits it. The approver approves it: **Approved amount** 9,000.00.
2. The accountant chooses **Invite vendors** on the **Sourcing** card, adds two furniture vendors, sets **Bids due by** and chooses **Send invitations**. Both show as **Sent**.
3. The vendors reply by e-mail. The accountant uploads each offer and records the bids: 8,400.00 for the first vendor and 8,900.00 for the second.
4. The accountant grades them, for example 5 and 3.
5. **Award** on the bid of 8,400.00, then confirm. Because 8,400.00 is within the 9,000.00 that was approved, the message "Bid awarded; purchase order … raised" appears at once.
6. The purchase order is a draft to the first vendor for 8,400.00 with the lines scaled: desks 5,600.00 and chairs 2,800.00. The other bid reads **Not awarded**, the sourcing reads **Awarded** and the request reads **Converted**.

Had the cheaper bid been 9,600.00, above what was approved, the award would have sent the request back for approval of 9,600.00 first.

Under the default rule, **Required before submitting**, the member chooses **Save draft** in step 1 instead. The accountant invites the vendors on the draft, records and grades the bids, and **Award** on 8,400.00 fills in the vendor and submits the request for approval of 8,400.00. Once a person approves it, **Convert** raises the purchase order.

## API and MCP

- `GET` and `POST /spend-requests`, `GET`, `PATCH` and `DELETE /spend-requests/{id}`, `POST /spend-requests/{id}/submit`, `/convert` and `/cancel`, `POST /spend-requests/bulk-cancel`, `GET /spend-requests/{id}/approval`; sourcing under `POST /spend-requests/{id}/sourcing` (invites and e-mails), `GET /sourcing/{id}`, `POST /sourcing/{id}/bids`, `POST /sourcing/{id}/close`, `POST /bids/{id}/grade` and `POST /bids/{id}/award`; the vendor rule under `GET` and `PATCH /settings/spend-requests` (`{"poVendor": "required" | "or_sourcing" | "optional"}`).
- A reimbursement raised over the API without `requesterUserId` repays the person the caller acts for (an API key's creator, the member an assistant acts for). Naming another member needs a role that prepares documents (owner, admin, accountant), over the API as in the app.
- MCP: `create_spend_request`, `submit_spend_request`, `list_spend_requests`, `get_spend_request`, `open_sourcing`, `record_bid` and `award_bid` (the tools that write ask before they act). `list_approvals` shows spend requests; `decide_approvals` refuses them with `same_actor_kind`.
- Refusals: `same_actor_kind` (a decision that did not come from a signed-in person), `same_user` (the requester deciding their own request), `tier_without_approver` (the tier names nobody but the requester), `request_not_approved` (converting before the approval), `request_already_converted`, `vendor_required` (a purchase-order request without the vendor your rule asks for), `sourcing_closed` (the round is awarded or closed), `bid_not_found`, `module_not_enabled`.

See docs.alyabooks.ai.
