ProcureOps Skill
Use this skill for every task that involves querying the ProcureOps REST API to
produce a structured JSON answer. The API exposes procurement operational
records and the tasks always require cross-referencing multiple endpoints to
build a complete picture.
Core workflow
Follow this sequence on every task:
Read the answer template first. It defines the output structure, required
keys, allowed values, sorting rules, and numeric precision. Match it exactly.
Read all local memo payloads. Memos name the anchors (program IDs, SKUs,
POs, receipt IDs, invoice IDs) and may contain business controls (tax rate,
currency, approval rules, chargeback registers). The memos set the scope, but
the API is the source of truth for record-level data.
Fetch from every API endpoint needed. Start with the endpoints that match
the anchors in the memo, then fan out to related endpoints using foreign-key
relationships (supplier_id, po_id, program_id, contract_id, receipt_id,
invoice_id, requisition_id). Common fetch order:
| Step |
Endpoint |
Key field(s) |
| 1 |
/programs |
program_id |
| 2 |
/suppliers |
supplier_id |
| 3 |
/items |
sku |
| 4 |
/contracts |
contract_id, sku, supplier_id, program_id |
| 5 |
/purchase_requisitions |
requisition_id, program_id, sku |
| 6 |
/purchase_orders |
po_id, program_id, requisition_id, supplier_id, contract_id |
| 7 |
/receipts |
receipt_id, po_id, supplier_id |
| 8 |
/ap/invoices |
invoice_id, po_id, receipt_id, supplier_id |
| 9 |
/ap/payments |
invoice_id, supplier_id |
| 10 |
/approvals |
object_id (requisition_id), object_type |
| 11 |
/budget_snapshots |
program_id, snapshot_id |
| 12 |
/vendor_risk_events |
supplier_id, related_object_id (po_id) |
Fetch all endpoints that could supply relevant records -- it is better to
have data you do not use than to miss a record that changes the answer.
Filter locally after fetching.
Filter to task scope. Use the anchors from the memo to filter each
endpoint's results. Only include records that belong to the named programs,
suppliers, SKUs, POs, receipts, or invoices. Watch for records that share
only a partial match (e.g., same supplier but different program) and exclude
them unless the task explicitly asks for supplier-wide context.
Cross-reference records. Build the complete picture by joining records
across endpoints. For example:
- A PO links to its requisition, contract, supplier, receipts, invoices,
payments, and risk events.
- A receipt links to its PO, supplier, invoice, and risk events.
- A contract links to its program, supplier, SKU, and POs.
Apply the business rules. See references/business_rules.md for the
fixed-blocker-code logic, decision matrices, exception codes, and numeric
formulas. Do not invent new codes or decision rules.
Compute derived values. Calculate headroom, variance, ratios, and totals
using the formulas in references/business_rules.md. Always:
- Round USD amounts to 2 decimal places (cents).
- Round ratios to the precision specified in the template.
- Round percentages to the decimal places specified in the template.
Sort all list fields ascending unless the answer template explicitly
specifies a different order. Treat list fields as sets (no duplicates).
Emit only the JSON object. No prose before, after, or around it. The
answer must parse as valid JSON and match the structure of the answer
template.
Task-type variations
The ProcureOps tasks fall into five families. The answer template and memo
determine which family applies; the skill does not need to classify tasks
explicitly. But these patterns help orient the work:
Sourcing nomination / readiness -- Given a program and SKU anchors, determine
whether each line can proceed to committee. Check contracts, POs, receipts,
invoices, supplier risk, and approval state. Produce a nomination_lines array
with readiness_status, blocker_codes, and committee_action.
Receiving closeout -- Given a receipt batch, reconcile received vs. ordered
and billed vs. received quantities. Determine AP hold position, dollar exposure,
and disposition. Produce line_reconciliation, invoice_review, financials, and
decision blocks.
AP close desk -- Given a set of invoices, make per-invoice hold/release
decisions, reconcile vendor balances, and build payment hold/release queues.
Check three-way match (PO, receipt, invoice), scheduled payments, and quantity
variance. Produce invoice_decisions, vendor_balances, and program_summary.
Change-control decision -- Given a contract, program, and requested
incremental quantity, check contract ceiling headroom, program budget headroom,
approval state, and supplier risk. Determine whether the amendment can be
released and what actions are required.
AP release file -- Given target POs, receipts, invoices, and a local
chargeback register, determine per-invoice release decisions (release net after
approved chargeback, hold for pending quality, hold for missing receipt).
Produce release_decisions and receiving_exceptions.
Important conventions
API base URL. The task always provides the ProcureOps base URL, typically as
<TASK_ENV_BASE_URL> or similar. Replace the placeholder with the actual URL
from the environment. All endpoints are relative to this base and do not require
authentication.
USD rounding. Every dollar amount uses round(value, 2) -- two decimal
places. Do not use banker's rounding.
List ordering. Sort all ID lists, code lists, and string lists in ascending
lexical/numeric order unless the template says otherwise. Even when the template
describes a field as a "set", still sort the output ascending.
Date filtering. When the task specifies an as_of_date or review_as_of,
exclude records with dates after that point. Receipts dated after the as_of
date, risk events opened after the as_of date, and payments scheduled after the
look-ahead window (when specified) must be excluded.
Missing receipts. When a PO has no receipts and the template requires
receipt-related fields, use empty lists for receipt IDs and treat
quantity_received as 0. For receipt exception entries that have no receipt,
generate a placeholder with receipt_id like MISSING:<po_id>.
Cancelled POs. When computing contract ceiling usage, exclude POs with
status "cancelled". Include only non-cancelled POs in subtotals.
Risk events. For supplier risk context, consider both "open" and
"monitoring" status events as active. "Closed" events are historical context
only.
Reference files
- references/business_rules.md -- Fixed blocker
codes, decision logic, exception codes, numeric formulas, and all business
rules that do not change between tasks.
- references/endpoints.md -- Detailed field schemas
for every ProcureOps API endpoint, including relationships and data types.
Read the endpoint reference before fetching to understand what each endpoint
returns and how records link together. Read the business rules reference before
computing decisions to ensure you use the correct codes and formulas.
1---2name: procureops-43description: |4 Resolve ProcureOps procurement operations tasks by querying a shared REST API5 and producing structured JSON answer files. Use whenever the task mentions6 ProcureOps, a ProcureOps API, procurement readiness, sourcing nomination,7 receiving closeout, AP close desk, change-control decision, AP release file,8 invoice hold/release, three-way match, vendor balance reconciliation,9 chargeback netting, or any procurement operations workflow that requires10 cross-referencing suppliers, items, programs, contracts, purchase11 requisitions, purchase orders, receipts, invoices, payments, approvals,12 budget snapshots, or vendor risk events from a REST API. Trigger on any task13 that provides a ProcureOps base URL or references a "shared ProcureOps API",14 even if the task also includes local memo payloads.15metadata:16 source: https://skillmd.com/skills/prism-shadow/procureops-417---1819# ProcureOps Skill2021Use this skill for every task that involves querying the ProcureOps REST API to22produce a structured JSON answer. The API exposes procurement operational23records and the tasks always require cross-referencing multiple endpoints to24build a complete picture.2526## Core workflow2728Follow this sequence on every task:29301. **Read the answer template** first. It defines the output structure, required31 keys, allowed values, sorting rules, and numeric precision. Match it exactly.32332. **Read all local memo payloads.** Memos name the anchors (program IDs, SKUs,34 POs, receipt IDs, invoice IDs) and may contain business controls (tax rate,35 currency, approval rules, chargeback registers). The memos set the scope, but36 the API is the source of truth for record-level data.37383. **Fetch from every API endpoint needed.** Start with the endpoints that match39 the anchors in the memo, then fan out to related endpoints using foreign-key40 relationships (supplier_id, po_id, program_id, contract_id, receipt_id,41 invoice_id, requisition_id). Common fetch order:4243 | Step | Endpoint | Key field(s) |44 |------|----------|-------------|45 | 1 | `/programs` | program_id |46 | 2 | `/suppliers` | supplier_id |47 | 3 | `/items` | sku |48 | 4 | `/contracts` | contract_id, sku, supplier_id, program_id |49 | 5 | `/purchase_requisitions` | requisition_id, program_id, sku |50 | 6 | `/purchase_orders` | po_id, program_id, requisition_id, supplier_id, contract_id |51 | 7 | `/receipts` | receipt_id, po_id, supplier_id |52 | 8 | `/ap/invoices` | invoice_id, po_id, receipt_id, supplier_id |53 | 9 | `/ap/payments` | invoice_id, supplier_id |54 | 10 | `/approvals` | object_id (requisition_id), object_type |55 | 11 | `/budget_snapshots` | program_id, snapshot_id |56 | 12 | `/vendor_risk_events` | supplier_id, related_object_id (po_id) |5758 Fetch all endpoints that could supply relevant records -- it is better to59 have data you do not use than to miss a record that changes the answer.60 Filter locally after fetching.61624. **Filter to task scope.** Use the anchors from the memo to filter each63 endpoint's results. Only include records that belong to the named programs,64 suppliers, SKUs, POs, receipts, or invoices. Watch for records that share65 only a partial match (e.g., same supplier but different program) and exclude66 them unless the task explicitly asks for supplier-wide context.67685. **Cross-reference records.** Build the complete picture by joining records69 across endpoints. For example:70 - A PO links to its requisition, contract, supplier, receipts, invoices,71 payments, and risk events.72 - A receipt links to its PO, supplier, invoice, and risk events.73 - A contract links to its program, supplier, SKU, and POs.74756. **Apply the business rules.** See `references/business_rules.md` for the76 fixed-blocker-code logic, decision matrices, exception codes, and numeric77 formulas. Do not invent new codes or decision rules.78797. **Compute derived values.** Calculate headroom, variance, ratios, and totals80 using the formulas in `references/business_rules.md`. Always:81 - Round USD amounts to 2 decimal places (cents).82 - Round ratios to the precision specified in the template.83 - Round percentages to the decimal places specified in the template.84858. **Sort all list fields ascending** unless the answer template explicitly86 specifies a different order. Treat list fields as sets (no duplicates).87889. **Emit only the JSON object.** No prose before, after, or around it. The89 answer must parse as valid JSON and match the structure of the answer90 template.9192## Task-type variations9394The ProcureOps tasks fall into five families. The answer template and memo95determine which family applies; the skill does not need to classify tasks96explicitly. But these patterns help orient the work:9798**Sourcing nomination / readiness** -- Given a program and SKU anchors, determine99whether each line can proceed to committee. Check contracts, POs, receipts,100invoices, supplier risk, and approval state. Produce a nomination_lines array101with readiness_status, blocker_codes, and committee_action.102103**Receiving closeout** -- Given a receipt batch, reconcile received vs. ordered104and billed vs. received quantities. Determine AP hold position, dollar exposure,105and disposition. Produce line_reconciliation, invoice_review, financials, and106decision blocks.107108**AP close desk** -- Given a set of invoices, make per-invoice hold/release109decisions, reconcile vendor balances, and build payment hold/release queues.110Check three-way match (PO, receipt, invoice), scheduled payments, and quantity111variance. Produce invoice_decisions, vendor_balances, and program_summary.112113**Change-control decision** -- Given a contract, program, and requested114incremental quantity, check contract ceiling headroom, program budget headroom,115approval state, and supplier risk. Determine whether the amendment can be116released and what actions are required.117118**AP release file** -- Given target POs, receipts, invoices, and a local119chargeback register, determine per-invoice release decisions (release net after120approved chargeback, hold for pending quality, hold for missing receipt).121Produce release_decisions and receiving_exceptions.122123## Important conventions124125**API base URL.** The task always provides the ProcureOps base URL, typically as126`<TASK_ENV_BASE_URL>` or similar. Replace the placeholder with the actual URL127from the environment. All endpoints are relative to this base and do not require128authentication.129130**USD rounding.** Every dollar amount uses `round(value, 2)` -- two decimal131places. Do not use banker's rounding.132133**List ordering.** Sort all ID lists, code lists, and string lists in ascending134lexical/numeric order unless the template says otherwise. Even when the template135describes a field as a "set", still sort the output ascending.136137**Date filtering.** When the task specifies an `as_of_date` or `review_as_of`,138exclude records with dates after that point. Receipts dated after the as_of139date, risk events opened after the as_of date, and payments scheduled after the140look-ahead window (when specified) must be excluded.141142**Missing receipts.** When a PO has no receipts and the template requires143receipt-related fields, use empty lists for receipt IDs and treat144quantity_received as 0. For receipt exception entries that have no receipt,145generate a placeholder with receipt_id like `MISSING:<po_id>`.146147**Cancelled POs.** When computing contract ceiling usage, exclude POs with148status "cancelled". Include only non-cancelled POs in subtotals.149150**Risk events.** For supplier risk context, consider both "open" and151"monitoring" status events as active. "Closed" events are historical context152only.153154## Reference files155156- [references/business_rules.md](references/business_rules.md) -- Fixed blocker157 codes, decision logic, exception codes, numeric formulas, and all business158 rules that do not change between tasks.159- [references/endpoints.md](references/endpoints.md) -- Detailed field schemas160 for every ProcureOps API endpoint, including relationships and data types.161162Read the endpoint reference before fetching to understand what each endpoint163returns and how records link together. Read the business rules reference before164computing decisions to ensure you use the correct codes and formulas.