Systems and records
Business event case ID design: pick a case ID that survives across systems
By SourceX Editorial · Updated
10 sections
Short answer
Choose a case identifier by picking the business object whose lifecycle is the task, such as an order line or ticket, then key it on source system, numbering scope, object type and the raw native ID. Hold other systems' IDs in a crosswalk with confidence labels, keep multi-object links, and run collision tests for scope, case folding, reuse and migration before building any case.
System export
Business event case ID
Key takeaways
- Pick the case object from the question you want answered, not from whatever the export happens to contain.
- Document numbers are unique only within a scope, so the key must include system, scope and object type.
- Keep raw IDs byte for byte; case folding and stripped padding create silent merges.
- Weak links belong in a crosswalk with a confidence label, never in the case key.
- Run collision tests and reconcile case counts to source reports before building episodes.
How do you choose a case identifier that works across business systems?
Choose the business object whose lifecycle is the task you want to reconstruct, then build its case ID as a composite of source system, organizational scope, object type and the native ID exactly as stored. Keep every other system's identifier in a crosswalk rather than in the key, and when one event touches several objects, record all the links and decide the case per question.
Business event case ID design fails in two predictable ways. The key is too narrow, so two different orders share a number and their events merge into one impossible case, or the key is too broad, so one customer or account becomes the case and unrelated work is stitched together. Both errors survive into every downstream count, timing and label, which is why the choice deserves a written worksheet rather than a guess made during export.
The decision rule in this guide is deliberately conservative: a key is accepted only when it is unique within the scope you declare, stable over the life of the object, and reproducible from source exports by someone who did not build it. Anything weaker becomes a crosswalk link with a confidence label, not a case ID.
Which business object should be the case?
The case is the object whose start and end define the task: an order line if the question is how a line gets fulfilled, a ticket if the question is how a request gets resolved, an invoice if the question is how it gets paid. Pick the case after the question, not after the export.
Traditional event logs force one case notion. The XES standard's concept extension uses concept:name on a trace to hold the case name, and process mining tools expect one case column per event. Object-centric event logs relax that: the OCEL 2.0 specification lets one event relate to several objects, with qualifiers naming each object's role, and adds object-to-object relationships. The pm4py library's flatten function shows the trade-off in code: choosing an object type turns each object of that type into a case containing every event related to it, so an event linked to three orders appears in three cases.
| Question | Case object | Related objects kept as links | Risk if the wrong case is chosen |
|---|---|---|---|
| How long does an order line take from entry to delivery? | Sales order line | Order header, shipment, invoice, customer | Header-level cases blend fast and slow lines into one duration |
| How is a support request resolved? | Ticket | Customer account, linked bug, order | Account-level cases merge unrelated requests from one customer |
| How does a purchase order get paid? | Invoice line matched to order line | Purchase order, receipt, supplier | Order-level cases double count events shared by several invoices |
| How does an opportunity become revenue? | Opportunity | Quote, order, account, contact | Account-level cases hide which deal an event belonged to |
| How is a field job completed? | Work order | Service agreement, asset, technician | Asset-level cases join visits years apart into one case |
Why do native document numbers collide across systems?
Document numbers are designed to be readable inside one scope, not unique across a company's systems. Treat any number without its scope as a candidate for collision until a test shows otherwise.
Microsoft's documentation for Dynamics 365 finance and operations apps is explicit about scope: a number sequence can be shared or scoped to a company, legal entity or operating unit, and if the same format is used for every company, each company uses the same numbers, so one sales order number can exist in each company. The same page notes that noncontinuous sequences may skip numbers, so a gap in a numbering run is not by itself evidence of a missing case.
Case sensitivity is a second trap. Salesforce's CASESAFEID function exists to convert a 15-character record ID into a case-insensitive 18-character ID, because the 15-character form depends on letter case and tools that ignore case can treat two different IDs as one. SAP shows the third pattern: change documents collect changes under an object ID that, for purchase orders, is the order number, so the object class is part of what makes the ID meaningful.
| Collision type | How it happens | Detection test | Fix in the key |
|---|---|---|---|
| Scope collision | Same numbering restarts in each company or tenant | One case ID with events from two companies | Add the company or tenant scope to the key |
| Case-folding collision | Case-sensitive IDs compared in a case-insensitive tool | Distinct raw IDs that become equal after lowercasing | Use the case-safe form, or keep raw bytes and compare exactly |
| Format collision | Leading zeros, prefixes or padding stripped differently by each export | IDs that match only after normalization | Store raw and normalized forms; key on raw plus scope |
| Reuse collision | Numbers recycled after deletion, archive or system reset | One ID with two creation events far apart | Add a creation date or system generation to the key |
| Type collision | Same number used for an order and an invoice | One ID with activities from two object types | Add the object type to the key |
| Migration collision | Old system numbers loaded into a new system alongside new ones | Overlapping ranges before and after the cutover date | Add a source generation and keep a cutover crosswalk |
What goes in each row of the case ID mapping worksheet?
The worksheet below has one row per identifier source. Fill it before export, keep it with the dataset, and treat it as the specification the case-building code must follow. Example values are illustrative.
At a glance
What goes in each row of the case ID mapping worksheet
Two fields do most of the work. The scope field forces someone to look up how each system issues numbers instead of assuming they are global, and the raw ID field stops exports, spreadsheets and loaders from quietly changing case, padding or prefixes. If either cannot be filled from documentation or configuration, the identifier is not ready to be a key.
| Field | What to record | Illustrative value | Check before accepting |
|---|---|---|---|
| source_system | System and instance the ID comes from | ERP production instance A | Instance names match the export manifest |
| scope | Company, legal entity, tenant or site the numbering is unique within | Company code 20 | Numbering setup confirms the scope |
| object_type | Business object the ID names | Sales order line | One object type per ID column |
| native_id_raw | ID exactly as stored, including case, padding and prefix | SO-0029, line 3 | Byte-for-byte equal to the source table |
| id_generation | How IDs are issued: sequence, UUID, external, manual entry | Noncontinuous number sequence | Manual entry flagged for extra collision tests |
| case_sensitive | Whether two IDs differing only by case are different objects | No | Confirmed from vendor documentation |
| case_key | Composite key: system, scope, object type, raw ID | ERP-A|20|SOL|SO-0029|3 | Unique across the full extract |
| crosswalk_links | Identifiers of the same object in other systems, with link source | CRM opportunity ID from the order header field | Link field populated by the system, not typed |
| valid_period | Dates the ID is valid, including merges, renumbering and cutovers | From go-live to present | No events outside the valid period |
| clock_source | Which timestamp field orders events, its time zone and offset handling | Server time stored in UTC | Offset documented for every system |
Which collision tests should run before any case is built?
Run these tests on the full extract before any episode is built, and send every hit to review rather than fixing it silently. Most of them are a few lines of SQL or dataframe code.
Convergence and divergence, the two problems object-centric logging was designed to handle, show up here as measurable counts: convergence when one event is copied into several cases, divergence when one case contains repeated, unrelated instances of the same activity.
- Duplicate creation: any case key with more than one creation event.
- Cross-scope events: any case key with events from more than one company, tenant or site.
- Case folding: raw IDs that differ but are equal after lowercasing, trimming or removing padding.
- Time order: any case whose first event precedes its creation event, beyond the documented clock tolerance.
- Convergence count: events attached to more than one case, by event type, so their effect on counts is known.
- Divergence count: cases with repeated start activities, such as two order-entry events, which suggest merged objects.
- Crosswalk conflict: one object in system A linked to two objects in system B where a one-to-one link is expected.
- Orphans: events whose case key matches no object in the master extract, and objects with no events.
- Source reconciliation: case counts per period against the source system's own report for the same period.
What happens to the key when objects merge, split or get renumbered?
Treat merges, splits and renumbering as events in their own right, and never rewrite history to make the key look clean. The key you assigned when the object was created stays valid for the events recorded under it; a later identity change is linked, dated and labeled.
At a glance
What happens to the key when objects merge, split or get renumbered
These events are common in real systems. Duplicate customer or account records get merged in a CRM, a sales order is split into two shipments or two orders when stock runs short, a help desk merges duplicate tickets, and an ERP migration loads old documents under new numbers. Each one changes which events belong together, and each one is invisible if the export only shows the surviving record.
Decide in advance which object survives for the question you are answering. For a fulfillment question, a split order line usually becomes two cases that share a parent link; for a resolution question, merged tickets usually become one case with the absorbed ticket's events attached and labeled. Write the rule into the worksheet so a second engineer makes the same call.
- Merge: keep both original keys, add a merge event with its timestamp and the surviving key, and attach later events to the survivor only.
- Split: keep the parent key, create child keys for each resulting object, and link children to the parent with a split event.
- Renumbering or migration: keep the old key as a crosswalk entry valid until the cutover date, and record the cutover in valid_period.
- Deletion: keep a tombstone row with the key and deletion date if the system logs it, so later reuse of the number is detectable.
- Unknown identity change: if events stop under one key and a near-identical object starts under another, label the pair for review instead of joining them.
Which timing and identity assumptions could change what a case contains?
Yes, each can, so state each one as an explicit assumption with a tolerance. Clock differences reorder events across systems, identifier mismatches split or merge cases, and an unrecorded transition makes a case look shorter or simpler than it was.
Normalize timestamps to one reference but keep the original. RFC 3339, the internet profile of ISO 8601, requires each timestamp to carry its offset from UTC, either Z or a numeric offset, which is the minimum needed to compare events from systems in different time zones. Keep the source timestamp and offset alongside the normalized value, and set a tolerance for cross-system ordering that reflects how each system records time, such as server time on save versus user-entered dates.
Do not invent transitions you did not observe. If a ticket moves from open to closed with no record of the work between, the case shows an unrecorded interval, not an inferred one. If you generate new identifiers for derived objects, RFC 9562 defines UUIDv7 with a Unix timestamp in the most significant bits and random bits for uniqueness, which keeps generated keys sortable by creation time without depending on a single sequence.
Worked scenario: two ERP companies, one CRM, one help desk (illustrative)
This scenario is invented to show the worksheet and tests in use; it describes no real company and the counts are illustrative.
A distributor runs two ERP companies that share one sales order number format, a CRM that stores opportunities with 15-character IDs in one export and 18-character IDs in another, and a help desk whose tickets cite order numbers in a free-text field. The goal is order-line cases from entry to delivery, with linked opportunities and tickets.
The cross-scope test finds that order numbers alone produce cases with events from both companies, so the company code joins the key. The case-folding test finds a small number of opportunity IDs that become equal when lowercased in the spreadsheet used for the crosswalk; switching to the 18-character form removes them. The ticket link is typed, not system-populated, so tickets enter as crosswalk links labeled heuristic, never as part of the key.
Reconciliation then compares order-line counts per month with the ERP's own sales report. A remaining difference in one month traces to a migration cutover, and the worksheet's valid_period field is updated to record the old range. The cases from that range are relabeled crosswalk rather than exact, and the published case counts show how many cases sit in each reconstruction label, so a user can see exactly what the migration cost in certainty.
Which assumption flips the key most often, and how should every case be labeled?
The assumption that most often changes the decision is scope: whether a number is unique across companies, tenants and system generations. Test it first, because every other check depends on it.
At a glance
Which assumption flips the key most often, and how should every case be labeled
Show uncertainty per case, not only per dataset. Give every case a reconstruction label and publish the share of cases in each, so a user can filter to exact cases or study the effect of including weaker links.
- Exact: every event joins on the case key or a system-populated link field.
- Crosswalk: at least one event joins through a documented crosswalk with a one-to-one check.
- Heuristic: at least one event joins through a typed reference, text match or time window.
- Conflicted: a collision test fired and was resolved by a reviewer; record the decision.
- Excluded: the case failed a test that could not be resolved, counted in the reconciliation.
How do clean case IDs help when the records are licensed?
Records that link cleanly across systems are what make a set of exports into reconstructable business tasks, and a written case ID worksheet is the evidence that the linking was done carefully. Before any of it is shared, the company still needs to confirm it may license the records, which is a separate question from having access to them, and personal data in tickets and CRM notes needs privacy review.
When a company decides to license linked exports like these, SourceX qualifies it and then carries the records through rights review, contracting, preparation and delivery. Buyers generally want two or more years of consistent history and tens of thousands of records or more in one system, though rarer work can qualify with less and every deal is judged on its own. The worksheet itself can wait: whether the company qualifies is settled through a short questionnaire, not an upload.
Frequently asked questions
What should the case ID mapping and collision detection worksheet include?
One row per identifier source with the system, numbering scope, object type, raw ID, how IDs are issued, case sensitivity, the composite case key, crosswalk links, the period the ID is valid and the clock source. Pair it with a list of collision tests whose hits go to review.
Is a purchase or sales order number a good case ID?
Only with its scope. Many ERPs restart numbering per company or legal entity, so the same number can name different orders. Combine it with system, company and object type, and add the line number if lines are the unit of work.
Should the case ID be a customer or account?
Rarely. A customer has many unrelated orders and requests, so account-level cases merge separate tasks. Keep the customer as a linked object and choose the order, ticket or work order as the case.
What is the difference between a case ID and a crosswalk?
The case ID is the key that defines which events form one case, and it must be unique and stable. A crosswalk links the same object across systems and can carry a confidence label. Weak links belong in the crosswalk, not in the key.
How do object-centric event logs change case ID design?
They let one event relate to several objects with named roles, so you do not have to pick one case notion at export time. You still choose a case per analysis when you flatten, and an event linked to several objects then appears in several cases.
Sources
- Dynamics 365 number sequences are scoped to shared, company, legal entity or operating unit; the same format in each company reuses numbers, and noncontinuous sequences may skip numbers. Source
- pm4py's flatten function turns the objects of one chosen type into cases, each containing every event related to that object. Source
- Salesforce's CASESAFEID function converts a 15-character record ID to a case-insensitive 18-character ID. Source
- RFC 9562 defines UUIDv7 with a Unix millisecond timestamp in the most significant bits and random bits for uniqueness. Source
- RFC 3339 timestamps state their offset from UTC, either Z or a numeric offset. Source
- The OCEL 2.0 specification lets events relate to multiple objects with qualified roles and adds object-to-object relationships. Source
- SAP change documents collect all changes to a business object under its object ID, the order number for purchase orders. Source
- The XES concept extension defines concept:name for the name of log, trace and event elements and concept:instance for event instances. Source
See if your company qualifies
A short company assessment. No data uploads are needed.