inspect-inbound-diagnostics
Skill7 starsChanged 4 months agoApache-2.0View on GitHub
Read the Orderful SuiteApp's inbound diagnostic log (customrecord_orderful_diagnostic) to see the mapped Business Data Object (BDO) for an inbound transaction — what the SuiteApp parsed from the EDI and intended to write to NetSuite. Use when an inbound 850/860/etc. processed "Success" but the resulting Sales Order is missing data (ship-to address, location, item match, store/department), when the user says "check the inbound logs", "why is the SO missing X", "inspect the inbound diagnostics", "/inspect-inbound-diagnostics", or when inbound behavior is mysterious and you'd otherwise start guessing.
- Reads credentials
In this repository41 other files it gives its agents.
- code-reviewSkill
- 945-fulfillment-debuggingSkill
- adjust-inventorySkill
- alternative-packing-sourceSkill
- audit-outbound-rulesSkill
- auto-pack-fulfillmentSkill
- bill-and-fire-810Skill
- bill-test-invoiceSkill
- build-mock-fulfillmentsSkill
- bulk-jsonata-updateSkill
- cleanup-orderful-transactionsSkill
- configure-packing-groupsSkill
- customer-kickoff-prepSkill
- custom-process-transactionsSkill
- dsco-portal-onboardingSkill
- dsco-reconSkill
- dsco-wire-testingSkill
- enable-customerSkill
- fetch-validationsSkill
- inject-test-transactionSkill
- item-lookupSkill
- manage-datasetsSkill
- manage-deploymentsSkill
- migrate-datasetSkill
- monitor-mrSkill
- netsuite-setupSkill
- o2c-discoverySkill
- org-prebuildSkill
- reconcile-860-with-soSkill
- reprocess-transactionSkill
- rithum-dsco-end-to-endSkill
- run-pollerSkill
- set-feature-flagSkill
- sps-reconSkill
- submit-test-transactionSkill
- update-skillsSkill
- upload-productsSkill
- which-script-ranSkill
- writing-860-jsonataSkill
- writing-inbound-jsonataSkill
- writing-outbound-jsonataSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Do NOT use this skill for:
- Distinctive: line 70
Read the log before theorizing: When an inbound record is missing data, the diagnostic answers "mapped wrong vs.
- Very specific: line 74
Diagnostics are a read-only diagnostic surface: Don't write to or delete customrecord_orderful_diagnostic.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Inspect Inbound Diagnostics
The SuiteApp writes a step-by-step trace of inbound mapping to customrecord_orderful_diagnostic. Each record holds a JSON log_text showing the Business Data Object (BDO) — the SuiteApp's internal representation of the parsed EDI right before it writes NetSuite records. Reading it is the fastest way to answer "did the SuiteApp parse this correctly, and what did it intend to write?" — which cleanly separates a mapping problem (BDO is wrong) from a write problem (BDO is right, the NS record came out wrong).
Reach for this early when inbound behavior is mysterious, instead of theorizing about config. It frequently turns a multi-hour guessing loop into a one-query answer.
When to use this skill
- "The 850 came in Success but the SO has no ship-to address — check the inbound log"
- "Why didn't the location get assigned on this order?"
- "Inspect the inbound diagnostics for transaction 9xxxxxxxx"
- "/inspect-inbound-diagnostics"
- Any inbound 850/860 that processed without error but produced a record that's missing or wrong
Do NOT use this skill for:
ITEM_LOOKUP_MISSING/ item-matching failures — that'sitem-lookup(though the diagnostic's "found item" step is a useful cross-check).- Outbound message debugging — read
custrecord_ord_tran_messageand usewriting-outbound-jsonata.
Inputs the skill needs
- The Orderful transaction ID of the inbound message (e.g. from
custrecord_ord_tran_orderful_idon thecustomrecord_orderful_transactionrow, or the SO'scustbody_orderful_document). - Customer slug — for env loading (
~/orderful-onboarding/<slug>/.env).
The recipe
Step 1 — Pull the diagnostic record(s)
The log is keyed by the Orderful transaction id (a string field, not the NS record id):
SELECT id,
custrecord_orderful_diag_ns_record_type AS rectype,
custrecord_orderful_diag_ns_record_id AS recid,
custrecord_orderful_diag_log_text AS log
FROM customrecord_orderful_diagnostic
WHERE custrecord_orderful_diag_transaction_id = '<orderfulTxnId>'
ORDER BY idcustrecord_orderful_diag_log_text is a JSON array of { "step": ..., "data": [...] } objects. The log can be large — pipe it through a JSON parser rather than reading raw.
Step 2 — Walk the steps
Common steps in an inbound 850 trace:
| Step | What it shows | Use it to check |
PO to BDO Mapping | each EDI line mapped to the SuiteApp's item/quantity/price shape | qualifiers parsed, UOM, price, line refs |
found item | item-resolution results (returnObj.itemId, unitTypeNS) | item matching, case-pack qty |
Order Split | the full BDO per resulting order: transaction (header), transactionLines, customerConfig, customerSettings, splitKey | the headline — see below |
The Order Split step's transaction object is the most useful: it carries shippingAddress, billingAddress, shipToId, location, locationLookup, department, subsidiary, dcNumber, userDefinedFields, plus customerConfig (the resolved parent/sub-customer, ISA, subcust_rep, ship-lookup config) and customerSettings (packagingDataSourceId, sendAsnWithoutPack, etc.).
Step 3 — Separate "mapping wrong" from "write wrong"
Compare the BDO against the NetSuite record that was created:
- BDO field is empty/wrong → mapping/config problem. The EDI value didn't parse, or a lookup (item, location, customer/sub-customer) didn't resolve. Chase the relevant config.
- BDO field is correct but the NS record is missing it → a write-step gap in the SuiteApp (the BDO had the value but it wasn't persisted). This is not something customer config or JSONata can fix — capture the BDO-vs-record evidence and escalate to the SuiteApp devs.
Concrete example this skill was built from: an inbound 850 produced a Sales Order with an empty shipping address. The diagnostic's Order Split BDO had transaction.shippingAddress fully populated from N1*ST (addr1/city/state/zip), and billingAddress identically populated. On the resulting SO, the billing address persisted but the shipping address did not — proving the mapping was correct and the SO write step drops shippingAddress. That distinction (BDO right, write wrong) is the entire value of reading the log: it turned a config wild-goose-chase into a one-line dev escalation.
Behaviour rules
- Read the log before theorizing. When an inbound record is missing data, the diagnostic answers "mapped wrong vs. written wrong" directly. Guessing at config first (subcustomer setup, ship-to lookups, flags) wastes time the log would save.
- Key on the Orderful transaction id, not the NS record id.
custrecord_orderful_diag_transaction_idis the Orderful id as a string; don't confuse it with the diagnostic record's own internal id. - State the mapping-vs-write conclusion explicitly. "BDO has it, SO doesn't" is a SuiteApp write bug → escalate with the evidence; "BDO is missing it" is config → keep diagnosing. Don't blur the two.
- Don't paste raw customer EDI/PII into shared notes. The log contains real addresses, item data, and identifiers. Quote only the field names and the structural finding when reporting or capturing a learning.
- Diagnostics are a read-only diagnostic surface. Don't write to or delete
customrecord_orderful_diagnostic.
Reference material
item-lookup— forITEM_LOOKUP_MISSING; cross-check against the diagnostic "found item" step.enable-customer— ship-to / sub-customer / department resolution config that shows up in the BDOcustomerConfig.reprocess-transaction— re-run an inbound transaction after a config fix to regenerate the diagnostic.which-script-ran— the diagnostic record only exists for native-path inbound (JSONata-path OTs never get one) and shows the BDO, not the MR's own errors; for what the processing MR logged/threw, read its execution logs over SuiteQL.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

