Finance package

NetSuite vendor bill (AP) approval

NetSuite posts a vendor bill; subsidiary and amount limits pick the approvers, AP codes the cost centre and approves, rejects or holds, and NetSuite is updated.

Connects to Oracle NetSuite

OfficialHeadless / APIIntermediate~25 min setupv1.0.0

About this package

What it does

NetSuite vendor bill (AP) approval runs bill approvals outside the NetSuite UI while keeping the approval status in NetSuite. When a vendor bill is created with approval status Pending Approval, a SuiteScript user event or a SuiteFlow action posts its internal id to the workflow.

The workflow reads the bill from the SuiteTalk REST record API with its item and expense sublists: vendor (entity), subsidiary, currency, total, tax, terms and due date. The AP approval limits decision table picks the approver level by subsidiary and amount and whether a financial controller or the CFO must also approve.

The AP approver sees the bill, its lines and the days to the due date, picks the cost centre from the Cost centres table (name, budget owner and NetSuite department fill in) and chooses Approve, Hold or Reject. Large bills go on to the second approver. The bill is then PATCHed in NetSuite: approvalStatus 2 (Approved) or 3 (Rejected), or kept at 1 with paymentHold set, with a memo, and AP is emailed the decision.

Headless / API

Starts from NetSuite: a SuiteScript afterSubmit user event (or a SuiteFlow "Send HTTP request" action) on Vendor Bill posts {"bill_id": record.id} to the workflow webhook.

Another system starts it over REST or an inbound webhook. No UI is needed; people only appear where a decision needs a human.

The flow

Step by step

  1. 1

    Bill posted

    NetSuite posts the vendor bill internal id when a bill is entered as Pending Approval.

  2. 2

    Read the bill

    GET /vendorBill/{id}?expandSubResources=true returns vendor, subsidiary, currency, total, due date and the item / expense lines.

  3. 3

    Apply the limits

    The AP approval limits table sets the approver level and any second approval by subsidiary and amount.

  4. 4

    AP approves

    The approver picks the cost centre (lookup), checks the PO match and chooses Approve, Hold or Reject.

  5. 5

    Second approval

    Over the subsidiary's limit, the financial controller or CFO approves or rejects.

  6. 6

    Update NetSuite

    PATCH /vendorBill/{id} sets approvalStatus (2 approved, 3 rejected, 1 with paymentHold for a hold); AP is emailed.

NetSuite vendor bill approval — NetSuite posts a vendor bill id; the bill is read from the REST record API, the AP approval limits pick the approvers by subsidiary and amount, the AP approver codes the cost centre and approves, rejects or holds, and the approval status goes back to NetSuite. The same canvas you get in the designer after installing.

Forms

Inputs and task forms

The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.

Start inputs

NetSuite vendor bill approval

Passed by the calling system

Vendor bill id * bill_id · textInternal id of the vendor bill (record.id in the SuiteScript / workflow action)
Bill number tran_id · textOptional: the vendor's invoice number (tranId), for logs
AP mailbox ap_email · emailname@company.comWhere the decision email goes

User Task

AP approval

Approve bill {{tran_id}}: {{vendor_name}} {{currency}} {{total}} (due {{due_date}}) · 2-column grid · own header and theme

Cost centre * cost_centre · lookup
Cost centre name cost_centre_name · text
Budget owner budget_owner · text
NetSuite department id ns_department_id · text
Matches the PO and receipt po_matched · boolean
Hold reason hold_reason · choice
Awaiting goods receiptPrice query with vendorMissing PODuplicate suspectedBank details check
Comments * comments · textarea
ApproveHoldReject

User Task

Second approval

{{second_approver}} approval: bill {{tran_id}} {{vendor_name}} {{currency}} {{total}} · 2-column grid · own header and theme

Comments * comments · textarea
ApproveReject

Headless

Call it from your systems

Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.

REST

shell
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
  -H "Authorization: Bearer $USERTASKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id":"<workflow id>","variables":{"bill_id":"48213","tran_id":"INV-77120","ap_email":"accounts.payable@example.com"}}'

CLI

shell
usertasks workflows inputs <workflow id>          # the start form: keys, types, required
usertasks workflows run <workflow id> --input bill_id=48213 --input tran_id=INV-77120 --input ap_email=accounts.payable@example.com --wait

Inbound webhook

shell
usertasks webhooks create <workflow id>          # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
  -H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
  -d '{"bill_id":"48213","tran_id":"INV-77120","ap_email":"accounts.payable@example.com"}'

What's included

7 assets, ready to adapt

TypeNameDetails
Email templateVendor bill decisionSent to the AP mailbox with the decision on a vendor bill.
Data tableCost centresCost centres AP approvers code bills to, with the NetSuite department and class ids and the budget owner. The approver picks one in the task form; its details fill in.
IntegrationNetSuiteOracle NetSuite SuiteTalk REST record API (/services/rest/record/v1). Use an OAuth 2.0 bearer token (client credentials / M2M) for an integration role with Bills (edit) and approval permissions.
API referenceGet vendor billGET /vendorBill/{{bill_id}} — Read the vendor bill with its item and expense sublists (GET /vendorBill/{id}?expandSubResources=true): vendor, subsidiary, currency, total, due date and approval status.
API referenceUpdate bill approvalPATCH /vendorBill/{{bill_id}} — Set the approval status on the vendor bill (PATCH /vendorBill/{id}): approvalStatus 1 = Pending Approval, 2 = Approved, 3 = Rejected; paymentHold and memo too. NetSuite answers 204 No Content.
Decision tableAP approval limits6 rules — Approval limits by subsidiary and bill total: the approver level, whether a second (controller / CFO) approval is needed and how long approvers have. First matching rule wins.
WorkflowNetSuite vendor bill approval19 steps — NetSuite posts a vendor bill id; the bill is read from the REST record API, the AP approval limits pick the approvers by subsidiary and amount, the AP approver codes the cost centre and approves, rejects or holds, and the approval status goes back to NetSuite.

Cost centres · 6 sample rows

CodeNameNetSuite department idNetSuite class idBudget ownerBudget owner emailActive

Requirements

What you connect it to

Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.

Needs

  • REST API — A REST API integration: set its base URL and credentials on install.
  • Inbound webhook — An inbound webhook created for the workflow, so other systems can start it.
  • Assignees — People in your workspace to receive the User Tasks (picked on install).
  • Email — Email delivery configured for the instance (EMAIL_PROVIDER), used for notifications.

After installing

  1. NetSuite integration: base URL https://<account id>.suitetalk.api.netsuite.com/services/rest/record/v1 and an OAuth 2.0 bearer token (client credentials / M2M certificate flow) for an integration role with Bills (Edit) and Approve Vendor Payments.
  2. In NetSuite, turn on Accounting Preferences > Approval Routing > Vendor Bills so approvalStatus is used, and add a user event script (afterSubmit, create) or SuiteFlow action that posts {"bill_id": record.id, "tran_id": tranid} to the workflow webhook.
  3. Assignees: pick the AP approver and the second approver (financial controller / CFO).
  4. Replace the Cost centres rows with yours and set the AP approval limits per subsidiary (rules match on the subsidiary name).
  5. Email: configure EMAIL_PROVIDER so AP gets the decision (the step continues on error).

Asked for on install

  • Integration “NetSuite”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://1234567.suitetalk.api.netsuite.example.com/services/rest/record/v1· optional
  • Workflow “NetSuite vendor bill approval” assigneesRequired

    • User for step “AP approval”nodes.6.config.assignee_id
    • User for step “Second approval”nodes.9.config.assignee_id

Install

Install it in your workspace

Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.

In the app

  1. Download netsuite-vendor-bill-approval-1.0.0.utpkg.
  2. Open Automations → Packages and drag the file onto the page (or choose Import package). Browse gallery there lists every gallery package without downloading by hand.
  3. Pick the file. The wizard verifies the checksum, every file hash and the signature, and shows the readme.
  4. Review the changes (what is created) and the data rows.
  5. Fill in the requirements, or tick Keep incomplete and finish later with Complete setup.
  6. Done: the workflow is published and active once setup is complete.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/netsuite-vendor-bill-approval-1.0.0.utpkg
usertasks packages inspect netsuite-vendor-bill-approval-1.0.0.utpkg       # offline: checksum, hashes, signature
usertasks packages install netsuite-vendor-bill-approval-1.0.0.utpkg --dry-run
usertasks packages install netsuite-vendor-bill-approval-1.0.0.utpkg       # prompts for each requirement
usertasks packages install netsuite-vendor-bill-approval-1.0.0.utpkg --keep-incomplete --yes   # in CI; finish with:
usertasks packages complete netsuite-vendor-bill-approval -f values.yaml

Verify the download

File SHA-256
78f44ad6d0fde212338fac34afff0aa318742e9f90f796608bf3d002dff5b51b
Package checksum (what is signed)
sha256:1b2ae257876cc0179edabe7fe1a20d384ad6a3a1158a013c804e09bb7f0b097e
Signer
Unsigned preview build — compare the SHA-256 above

shasum -a 256 netsuite-vendor-bill-approval-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.

Versions

Version 1.0.0

  1. v1.0.02026-10-28First release.

Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work

More packages

Related

Browse the whole gallery