コンテンツにスキップ

Structured, Semi-Structured and Unstructured

このコンテンツはまだ日本語訳がありません。

The question this module answers: When should data become first-class fields, and when should it stay in its document or file?

Most of this course has been about fields: the Work Order’s status, its scheduled date, its partner key. A Salesforce architect is comfortable there. I know how to query a field, secure it, validate it, relate it and automate around it.

But a lot of enterprise data doesn’t arrive as fields. It arrives as JSON from an API, as a CSV file, as an EDI message, as a PDF, a photo, an email, a recording. In class I ask the room: what’s a blob? Besides an old movie about a creature. It’s a binary large object: a photo, a PDF, a sound file, stored as one opaque piece. All of these can carry valuable business information. The mistake is assuming valuable information has to become fields.

So the question is still module 1’s, what are you going to do with the data?, and in this module it gets sharper: which parts of this need to become first-class data?

A Work Order is structured data. Its status, dates and partner key aren’t buried in a block of text; the platform understands each one on its own. That’s what I mean by first-class data: not just that the business has the information, but that the system understands each piece of it individually. Because Salesforce understands the status, I can filter on it, validate it, protect it with field-level security, start a flow when it changes to Delivered, relate the delivery to its partner, and report on a hundred thousand deliveries grouped by status.

That’s powerful, and it isn’t free. Every field I add is something to design, govern, integrate, secure, maintain, migrate and someday change. So don’t confuse “this information exists” with “this information needs to be a field.” They’re different requirements.

Semi-Structured: Structure, Just Not Yours

Section titled “Semi-Structured: Structure, Just Not Yours”

Redrock sends each delivery through its API as JSON. Simplified, one looks like this:

{
"partnerDeliveryId": "REDROCK-8472914-1",
"destination": {
"address": { "street": "123 Main Street", "city": "Phoenix", "state": "AZ" },
"phone": "602-555-0142"
},
"items": [
{ "sku": "WASHER-27-W", "quantity": 1, "service": "install" },
{ "sku": "HAULAWAY", "quantity": 1 }
],
"deliveryPreferences": {
"placement": "Laundry room, back of the house",
"gateCode": "4417"
},
"storeAssociateId": "RR-AZ-0931",
"loyaltyTier": "Gold"
}

That isn’t unstructured. It has plenty of structure: names, nested objects, an array, values. That’s why formats like JSON and XML are called semi-structured. The structure is real; it just isn’t our structure. Redrock organizes a delivery its way. Keystone sends a CSV file, and Brightwave sends EDI. Steve Trucking still runs one delivery business, on one model.

I’ve flattened a lot of JSON. When I built the airline-flight demo for the Data 360 Ingestion API, the flight data came in with objects and sub-objects inside the JSON, and I wanted to flatten it into one object. Most of it was elements and sub-elements, one value each, and it flattened cleanly. I brought in almost all of it. The only thing that didn’t fit was one little array.

That little array is the lesson. A single value nested three levels down flattens easily into one field. A list doesn’t. An array is a list of values in one place, and back in chapter 2, first normal form took a list out of one field and gave each value a row of its own: a child. Redrock’s items array is exactly that: one delivery, several items. It doesn’t become Item1_SKU__c, Item2_SKU__c. It becomes Work Order Line Items.

Now go through Redrock’s document the way an architect should, one element at a time, asking what Steve Trucking does with it:

  • partnerDeliveryId becomes the partner key on the Work Order. We match on it, upsert on it and reconcile on it. First-class, no question.
  • The address and phone become the Recipient’s fields on the Work Order. The crew drives there and calls that number.
  • The items array becomes line items, one per item, because each one is loaded, delivered and sometimes installed on its own.
  • The placement note becomes the delivery note. The crew reads it.
  • The gate code becomes first-class too, but not as a field on the Work Order. Chapter 12 gave it its own small, temporary record, shared only with the assigned crew and deleted when the stop is done. Promoting data includes deciding where it goes, by its classification.
  • storeAssociateId and loyaltyTier mean something to Redrock and nothing to Steve Trucking’s delivery. Nobody here queries them, validates them, relates them or changes them. They stay in the payload.
Promote what the business process needs Redrock's JSON manifest on the left, element by element, and where each goes. The partner delivery ID, REDROCK-8472914-1, is promoted to the partner key on the Work Order, used to match, upsert and reconcile. The destination's address and phone, nested two levels down, are promoted to the Recipient's fields on the Work Order, so the crew can drive there and call. The items array, a washer to install and a haul-away, is promoted to Work Order Line Items, one per item: a list becomes children. The placement note is promoted to the delivery note the crew reads. The gate code is protected: it goes to its own temporary record, highlighted, shared with the assigned crew and deleted when the stop is done. The store associate ID and loyalty tier are Redrock's, not ours: they stay in the payload, kept whole and classified, for as long as the payload is kept. Underneath: promote what the business process needs; keep the rest where it came. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.52.0", "built": "2026-10-28", "id": "DGM-DA-BR-30", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.4.0", "theme": "stevetecharc 1.4.0"} REDROCK'S JSON, ELEMENT BY ELEMENT WHERE IT GOES partnerDeliveryId REDROCK-8472914-1 destination: address, phone nested two levels down items [ … ] an array: a washer to install, a haul-away deliveryPreferences.placement Laundry room, back of the house deliveryPreferences.gateCode 4417 storeAssociateId, loyaltyTier Redrock's, not ours The partner key on the Work Order: match, upsert, reconcile The Recipient's fields on the Work Order: the crew drives and calls Work Order Line Items one per item: a list becomes children The delivery note the crew reads it Its own temporary record shared with the assigned crew; deleted when the stop is done Stays in the payload kept whole and classified, for as long as the payload is kept promoted promoted promoted promoted protected kept Promote what the business process needs. Keep the rest where it came. HOW TO READ IT promoted, and placed by its classification © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Here’s the trap this avoids. A source system sends a document with 250 possible attributes, someone says “we need this data in Salesforce,” and suddenly there are 250 fields. Stop and read the requirement. Did the business say “we need to work with all 250 values,” or “we need to be able to get to the source information”? Those are very different. Promote what the process needs, and keep the rest where it came.

It also protects you from the partner. If every optional element in Redrock’s payload is a Salesforce field, my model is tied to Redrock’s document. Redrock adds an element: do I add a field? It renames one: do I rename mine? I want my model to change because my business changed, not because a partner’s JSON did. In a talk on Data 360 I put it this way: don’t ingest everything, and data should be shaped before it lands, not fixed afterward. Think in terms of use cases, not just data structure.

So what makes an element earn a field, an object, or its own record? I ask what the business needs to do with it:

  • Find it on its own? “Every delivery scheduled for today” needs the scheduled date as a field.
  • Relate it? The delivery’s partner and DC drive the model and the sharing.
  • Validate it? A rule needs to read the value.
  • React to it? A flow can’t start on something buried in a text block.
  • Secure it differently? Something more sensitive than its neighbors is hard to protect inside one big document.
  • Report on it? Grouped and counted, again and again.
  • Own it? If Steve Trucking maintains the value, it needs a deliberate home and an owner.

None of these automatically means “create a Salesforce field.” But each one is a strong signal that the element needs to be understood on its own somewhere in the architecture. That’s a better standard than “it’s in the payload.”

And keeping the original payload isn’t a failure to model it. Steve Trucking keeps Redrock’s JSON as it came, for disputes and for reconciliation. That copy carries the Recipient’s address and phone, so it’s classified Confidential and kept only as long as it’s needed, like any other copy (chapter 12).

Now the far end. Steve Trucking’s crews take about four photos a delivery: the item delivered, the installation, any damage. Those are unstructured data: images, along with PDFs, recordings, emails and video.

Be careful with the word. Unstructured doesn’t mean the content has no structure or meaning. A photo holds a great deal of information. A contract has parties, dates and clauses. The difference is that none of it is a field a query can use. Ask a database for “every photo that shows a damaged washer” and it can only answer if someone, or something, has already looked at each photo and recorded what it shows.

That leads to one of the most useful patterns in this chapter: the content can stay unstructured while what we know about it becomes structured. That’s metadata.

For each Steve Trucking photo: which delivery it belongs to, when it was taken, by whom, what kind it is (delivered, installed, damage), its key in object storage, and its retention date. The photo stays an image. The facts about it are first-class.

And where the metadata lives is a decision too. At Checkpoint 1 we chose to let the photo store keep the photos’ index next to the images, and the Work Order keep only a count and a “required photos complete” flag. Salesforce shows a photo when someone asks for it, by its key. Millions of index records a year stay out of the org, and the operational process still gets exactly what it needs.

The photo, and what we know about it One delivery photo and what's known about it, in three columns. On the right, the content, unstructured: the photo itself, an image in object storage of about 3 MB. In the middle, highlighted, the metadata, structured: the photo's index, kept beside the image, holding the delivery's partner key, when it was taken and by whom, the kind of photo (delivered, installed or damage), its storage key, and its retention date; it points to the photo. On the left, in Salesforce: the Work Order keeps only a photo count and a required photos complete flag, and asks for the key to show a photo when someone wants it. Underneath: the content can stay unstructured while what we know about it becomes structured. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.52.0", "built": "2026-10-28", "id": "DGM-DA-BR-31", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.4.0", "theme": "stevetecharc 1.4.0"} IN SALESFORCE THE METADATA: STRUCTURED THE CONTENT: UNSTRUCTURED The Work Order a photo count and a required photos complete flag; shows a photo by its key when asked The photo's index partner key · taken at, by whom · kind: delivered, installed or damage · storage key · retention date The photo itself an image in object storage, about 3 MB asks for the key points to The content can stay unstructured while what we know about it becomes structured. HOW TO READ IT what we know about the content, kept beside it © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

The same pattern shows up everywhere. A PDF contract stays a PDF; its parties, effective date, classification and location become fields. A recording stays audio; the call’s ID, agent, time and length become fields. The content doesn’t have to become structured for us to structure what we know about it.

Derived Data Is a New Representation, Not New Truth

Section titled “Derived Data Is a New Representation, Not New Truth”

Then it gets more interesting. Installation requires specific photos: for a dishwasher, the water line, the drain line and the level (R12). Suppose a vision model looks at each install photo and records “drain line visible: yes,” “appliance level: probably.” Or a recording becomes a transcript. Or a document reader pulls an invoice number and a total out of a PDF.

The source is still the source. We’ve created another representation from it, and that derived data can be very useful: searchable, countable, a field a flow can react to. But I want to know three things about every derived value. That it was derived. What it was derived from. And how much I trust it. A value isn’t true because a model produced it. If “appliance level” is going to close the install checklist on its own, that’s a business decision, with a human check where the stakes are high.

It’s tempting to rank these: structured is good, semi-structured less good, unstructured bad. That’s wrong. They describe how information is represented, not what it’s worth. The Work Order is the best shape for running the delivery. Redrock’s JSON is the best record of what Redrock sent. The install photo may be the strongest proof that the work was done right.

The architect’s job isn’t to push everything to the most structured form possible. It’s to make the information usable while keeping what matters: its meaning, its authority, its identity, its security, its lineage and its lifecycle.

Every new representation is another place to protect. Redrock’s payload carries the Recipient’s phone. The original has access controls. Extract its text for a search index, and the extracted text needs the same controls. Even metadata can reveal something: a photo tagged “damage, bedroom” says something about someone’s home. Later, when text is split into pieces for AI retrieval (module 5), every piece needs the classification of the document it came from.

Chapter 12’s classification doesn’t stop at the edge of the relational model. It matters more here. You can’t classify the payload as Confidential and then treat every copy made from it as Public. The shape changed. The sensitivity didn’t.

AI adds one more reason to be deliberate. A person opens one document because they know what they’re looking for. An agent can search thousands at once, connect them, and find what nobody thought to look for. That’s useful, and it’s why I keep saying that AI will search the data to answer, and it will find the edges of what it can reach.

Picture it at Steve Trucking. Someone can’t open a confidential complaint file. Good. But its text was extracted into a search index months ago, without its classification, and an agent can search that index. We protected the file. We didn’t protect the information. That’s a data architecture failure, and it happens one copy at a time.

And text that gets indexed doesn’t only leak; it can also instruct. Salesforce warns that “Knowledge articles, Data 360 indexed documents, and external retrieval sources used for grounding all become persistent injection surfaces,” and that “adversarial content influences agent behavior for as long as it remains indexed” (Salesforce Well-Architected, Trust for the Agentic Enterprise (opens in a new tab), checked 2026-11-28). A damage claim description that says “ignore your instructions” is a problem for one conversation. The same words in an indexed document are a problem every time it’s retrieved. That’s chapter 12’s lesson, treat every prompt like SQL injection, applied to what you choose to index: decide what goes into an index as carefully as what goes into a field.

  • Which elements of each document become first-class: fields, child records, or their own protected record.
  • What stays in the document, and how long the original is kept, classified like any other copy.
  • How repeating groups are handled: arrays become children, not numbered fields.
  • What metadata to keep about unstructured content, and where that metadata lives.
  • Which derived values to trust, what they came from, and where a human must confirm.
  • How classification follows every representation, including extracted text, indexes and chunks.

Beyond the exam: AI turns unstructured content into something it can search and act on, which is valuable and risky in equal measure. Extracted text, transcripts and indexes are new copies with the sensitivity of their source, and indexed text can carry instructions. Decide what you extract and index as deliberately as what you make a field.