{"skills":[{"name":"Measure on-time, in-full deliveries","description":"Find the orders completed by their agreed promise date using accepted quantities across split deliveries.","content":"# Measure on-time, in-full deliveries\n\nFind the orders completed by their agreed promise date using accepted quantities across split deliveries.\n\n## When to use this skill\n\n- A supplier review or contract KPI needs the percentage of orders delivered on time and in full.\n- Deliveries arrive in several parts, some goods are rejected, or some orders are still overdue.\n- Someone wants the list of orders that missed, to discuss with the supplier.\n\n## When not to use it\n\n- Setting the KPI target or deciding a contract remedy for poor performance. Those come from the contract.\n- Publishing a contract performance notice for a public contract. Under the Procurement Act 2023, which covers most public buyers in England, Wales and Northern Ireland, the buyer assesses KPIs on contracts over \u00a35 million and publishes its rating; follow the buyer's KPI guidance for that step.\n\n## What you need\n\n- Order IDs, promised dates, required quantities and any approved changes.\n- Dated accepted quantities, cancellation evidence and report cut-off.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- How does the contract define on time and in full: by order or by line, against which date, measured on dispatch or on acceptance, and with any tolerance?\n- Which reporting period and cut-off date apply, and how are cancelled orders treated?\n- Can you provide the full register of orders due in the period, not only those delivered? Overdue orders that have not arrived still count.\n\n## Method\n\n1. Set the contract's measurement grain, cancellation policy and reporting period. Under the default whole-order convention, an order belongs to the period containing its last applicable promised line date and is pending until then, even if an earlier line has already missed. A line-level KPI uses a different denominator. Exclude fully cancelled orders under the stated default.\n2. Build the cohort from the order register, not the delivery log: every order whose last promised date falls in the period and on or before the cut-off, including overdue orders with nothing delivered.\n3. Apply only approved changes to line quantities and promise dates. For each order, total the units accepted on or before each line's own promise date. A later line deadline does not extend an earlier one. Exclude rejected units and keep SKUs separate.\n4. Use the date the contract measures. If it measures receipt or acceptance, do not substitute dispatch dates.\n5. An order passes only when every applicable line is complete by its own promise date. A late top-up may close an order commercially but cannot change its historic on-time result.\n6. Divide passing orders by eligible orders, round half up to one decimal place and report the denominator. With no eligible orders there is no percentage. Keep the IDs that missed so the supplier can trace them.\n\n## Checks before you deliver\n\n- Counting shipment events rewards split deliveries and changes the denominator.\n- A dispatch date cannot stand in for the date goods were accepted when the contract measures receipt.\n- Include still-open overdue orders in a due-date cohort. A dispatch-only or completed-only export cannot establish performance for all orders due; request the order register or mark the denominator incomplete.\n- Applying an unwritten grace period or excusing buyer-side delays without an agreed rule. Use only the definition in the contract.\n- Quoting a percentage without its denominator. One order out of one and 400 out of 400 both read as 100%.\n\n## How to present the result\n\nLead with the OTIF rate as passed orders out of eligible orders and the percentage. Then list the missed orders with the reason for each (late, short, rejected or not delivered), and the orders excluded or still pending with the reason. State the definition used so the supplier can reproduce the figure.\n\n## Worked example\n\n**Request:** Calculate July OTIF as of 2026-07-31.\n\n**Supplied material:**\n\n```text\nA due Jul 4: 10 units; accepted 8 Jul 3, 2 Jul 5. B due Jul 10: 3 red, 2 blue; all accepted Jul 10. C due Jul 18: 5; 5 delivered Jul 17, one rejected. D due Aug 2. E due Jul 20 cancelled in full before dispatch.\n```\n\n**Answer:** July OTIF is 1 of 3 orders, or 33.3%. B passed. A reached ten units a day late, and C had only four accepted by its due date. D is due in August and E was cancelled before dispatch.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn eligible_orders and passed as integers, percent rounded half up to one decimal place or null if no orders qualify, and missed as a sorted array of order IDs. For staggered line dates, include an order once its last line is due.\n\n## Sources\n\n- [Cabinet Office: Procurement Act 2023 e-learning, module 9 contract governance](https:\/\/www.gov.uk\/government\/publications\/the-official-procurement-act-2023-e-learning\/module-9-contract-governance): The module gives '% deliveries made on time and in full' as an example KPI, with a 95% target measured weekly. It explains that KPIs on public contracts over \u00a35 million must be assessed and published at least once every 12 months. The order-level definition in this skill is stated so the figure can be reproduced.\n- [Cabinet Office: Guidance on key performance indicators (Procurement Act 2023)](https:\/\/www.gov.uk\/government\/publications\/procurement-act-2023-guidance-documents-manage-phase\/guidance-key-performance-indicators-html): Updated July 2026. Before entering a public contract worth over \u00a35 million, a buyer must generally set at least three KPIs and then assess performance at least once in every 12-month period. Its rating scale includes 'Other' for periods with no KPI data, which matches reporting an empty cohort as having no percentage.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/measure-on-time-in-full-deliveries\n","scope":"contextual","trigger_keywords":["Measure on-time, in-full deliveries","measure-on-time-in-full-deliveries","measure on time in full deliveries","What share of this supplier\u2019s orders arrived on time and in full last month?","What share of this supplier\u2019s orders arrived on time and in full last month","on time in full","on-time in-full","otif rate"],"is_private":true,"is_active":true,"scripts":[{"name":"measure-on-time-in-full-deliveries-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"measure-on-time-in-full-deliveries-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: measure-on-time-in-full-deliveries\ndescription: \"Calculate on-time in-full (OTIF) delivery performance at order level from promised dates and accepted quantities, handling split deliveries, rejections, cancellations and overdue orders. Use when someone asks for a supplier's OTIF rate, delivery KPI or list of late or short orders.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/measure-on-time-in-full-deliveries\n---\n\n# Measure on-time, in-full deliveries\n\nFind the orders completed by their agreed promise date using accepted quantities across split deliveries.\n\n## When to use this skill\n\n- A supplier review or contract KPI needs the percentage of orders delivered on time and in full.\n- Deliveries arrive in several parts, some goods are rejected, or some orders are still overdue.\n- Someone wants the list of orders that missed, to discuss with the supplier.\n\n## When not to use it\n\n- Setting the KPI target or deciding a contract remedy for poor performance. Those come from the contract.\n- Publishing a contract performance notice for a public contract. Under the Procurement Act 2023, which covers most public buyers in England, Wales and Northern Ireland, the buyer assesses KPIs on contracts over \u00a35 million and publishes its rating; follow the buyer's KPI guidance for that step.\n\n## What you need\n\n- Order IDs, promised dates, required quantities and any approved changes.\n- Dated accepted quantities, cancellation evidence and report cut-off.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- How does the contract define on time and in full: by order or by line, against which date, measured on dispatch or on acceptance, and with any tolerance?\n- Which reporting period and cut-off date apply, and how are cancelled orders treated?\n- Can you provide the full register of orders due in the period, not only those delivered? Overdue orders that have not arrived still count.\n\n## Method\n\n1. Set the contract's measurement grain, cancellation policy and reporting period. Under the default whole-order convention, an order belongs to the period containing its last applicable promised line date and is pending until then, even if an earlier line has already missed. A line-level KPI uses a different denominator. Exclude fully cancelled orders under the stated default.\n2. Build the cohort from the order register, not the delivery log: every order whose last promised date falls in the period and on or before the cut-off, including overdue orders with nothing delivered.\n3. Apply only approved changes to line quantities and promise dates. For each order, total the units accepted on or before each line's own promise date. A later line deadline does not extend an earlier one. Exclude rejected units and keep SKUs separate.\n4. Use the date the contract measures. If it measures receipt or acceptance, do not substitute dispatch dates.\n5. An order passes only when every applicable line is complete by its own promise date. A late top-up may close an order commercially but cannot change its historic on-time result.\n6. Divide passing orders by eligible orders, round half up to one decimal place and report the denominator. With no eligible orders there is no percentage. Keep the IDs that missed so the supplier can trace them.\n\n## Checks before you deliver\n\n- Counting shipment events rewards split deliveries and changes the denominator.\n- A dispatch date cannot stand in for the date goods were accepted when the contract measures receipt.\n- Include still-open overdue orders in a due-date cohort. A dispatch-only or completed-only export cannot establish performance for all orders due; request the order register or mark the denominator incomplete.\n- Applying an unwritten grace period or excusing buyer-side delays without an agreed rule. Use only the definition in the contract.\n- Quoting a percentage without its denominator. One order out of one and 400 out of 400 both read as 100%.\n\n## How to present the result\n\nLead with the OTIF rate as passed orders out of eligible orders and the percentage. Then list the missed orders with the reason for each (late, short, rejected or not delivered), and the orders excluded or still pending with the reason. State the definition used so the supplier can reproduce the figure.\n\n## Worked example\n\n**Request:** Calculate July OTIF as of 2026-07-31.\n\n**Supplied material:**\n\n```text\nA due Jul 4: 10 units; accepted 8 Jul 3, 2 Jul 5. B due Jul 10: 3 red, 2 blue; all accepted Jul 10. C due Jul 18: 5; 5 delivered Jul 17, one rejected. D due Aug 2. E due Jul 20 cancelled in full before dispatch.\n```\n\n**Answer:** July OTIF is 1 of 3 orders, or 33.3%. B passed. A reached ten units a day late, and C had only four accepted by its due date. D is due in August and E was cancelled before dispatch.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn eligible_orders and passed as integers, percent rounded half up to one decimal place or null if no orders qualify, and missed as a sorted array of order IDs. For staggered line dates, include an order once its last line is due.\n\n## Sources\n\n- [Cabinet Office: Procurement Act 2023 e-learning, module 9 contract governance](https:\/\/www.gov.uk\/government\/publications\/the-official-procurement-act-2023-e-learning\/module-9-contract-governance): The module gives '% deliveries made on time and in full' as an example KPI, with a 95% target measured weekly. It explains that KPIs on public contracts over \u00a35 million must be assessed and published at least once every 12 months. The order-level definition in this skill is stated so the figure can be reproduced.\n- [Cabinet Office: Guidance on key performance indicators (Procurement Act 2023)](https:\/\/www.gov.uk\/government\/publications\/procurement-act-2023-guidance-documents-manage-phase\/guidance-key-performance-indicators-html): Updated July 2026. Before entering a public contract worth over \u00a35 million, a buyer must generally set at least three KPIs and then assess performance at least once in every 12-month period. Its rating scale includes 'Other' for periods with no KPI data, which matches reporting an empty cohort as having no percentage.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/measure-on-time-in-full-deliveries\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/measure-on-time-in-full-deliveries\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Split delivery finishes late\n\nCalculate July OTIF as of 2026-07-31.\n\n## Supplied material\n\nA due Jul 4: 10 units; accepted 8 Jul 3, 2 Jul 5. B due Jul 10: 3 red, 2 blue; all accepted Jul 10. C due Jul 18: 5; 5 delivered Jul 17, one rejected. D due Aug 2. E due Jul 20 cancelled in full before dispatch.\n\n## Worked answer\n\nJuly OTIF is 1 of 3 orders, or 33.3%. B passed. A reached ten units a day late, and C had only four accepted by its due date. D is due in August and E was cancelled before dispatch.\n\n## Reasoning\n\nA short acceptance and a late final quantity each fail the whole-order test.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Calculate July OTIF as of 2026-07-31.\nReturn only the JSON specified in SKILL.md for this test.\n\nA due Jul 4: 10 units; accepted 8 Jul 3, 2 Jul 5. B due Jul 10: 3 red, 2 blue; all accepted Jul 10. C due Jul 18: 5; 5 delivered Jul 17, one rejected. D due Aug 2. E due Jul 20 cancelled in full before dispatch.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"eligible_orders\": 3,\n    \"passed\": 1,\n    \"percent\": 33.3,\n    \"missed\": [\n        \"A\",\n        \"C\"\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"A short acceptance and a late final quantity each fail the whole-order test.\n"},{"path":"tests\/case-2\/request.txt","content":"What is our delivery performance by 2026-01-20?\nReturn only the JSON specified in SKILL.md for this test.\n\nOnly order K is due 2026-01-25 and has already shipped. Order M due Jan 15 was cancelled in full on Jan 9.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"eligible_orders\": 0,\n    \"passed\": 0,\n    \"percent\": null,\n    \"missed\": []\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"An empty measurement cohort has no percentage.\n"},{"path":"tests\/case-3\/request.txt","content":"Calculate this week\u2019s order-level OTIF using all five entries in the due register.\nReturn only the JSON specified in SKILL.md for this test.\n\nAll five promised by the reporting cutoff. A and B accepted complete on time; C accepted complete one day late; D overdue and undelivered; E cancelled by buyer before its due date and excluded under the agreed policy.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"eligible_orders\": 4,\n    \"passed\": 2,\n    \"percent\": 50,\n    \"missed\": [\n        \"C\",\n        \"D\"\n    ]\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The undelivered overdue order belongs in the denominator. Cancellation E is excluded by the agreed definition.\n"},{"path":"tests\/case-4\/request.txt","content":"Measure October whole-order OTIF at close on October 31.\nReturn only the JSON specified in SKILL.md for this test.\n\nA has one line due Oct 31, accepted Oct 31, and a second line due Nov 3, still open. B has one line due Oct 28 and one due Oct 31, both accepted on their own due dates. C had one September line due Sep 29, missed, and another due Oct 20, accepted Oct 20. D due Sept 30 failed and closed in September. No cancellations.\n"},{"path":"tests\/case-4\/expected.json","content":"{\n    \"eligible_orders\": 2,\n    \"passed\": 1,\n    \"percent\": 50,\n    \"missed\": [\n        \"C\"\n    ]\n}\n"},{"path":"tests\/case-4\/explanation.txt","content":"B and C enter October because their final promise is then. C\u2019s earlier miss stands. A is pending until November and D belongs to September.\n"}],"is_active":true,"is_approved":false}]}]}