Skip to content

Understanding the CoCoCo Layout Data Model

This guide is for print industry professionals, especially those in prepress, who are encountering the CoCoCo data model for the first time. We'll translate our digital-first concepts into familiar prepress terms, helping you understand how a job is represented from data to print.

While our system uses a GraphQL API for programmatic access, the focus here is on the what and why of the data structure, not the technical implementation.

1. From Prepress to Pixels: Core Concepts

Think of a CoCoCo Layout as the digital equivalent of an imposition plan or the final, print-ready layout file. It contains everything needed to produce a job: the imposition, artwork files, color information, and finishing details. The model is nested, just like a physical job's components are organized.

Here’s how our digital terms map to physical prepress concepts:

CoCoCo Data Model TermPrepress AnalogDescription
LayoutImposition Plan / Digital LayoutThe top-level container for a single production run's imposition.
LayoutImpositionPlanImposition or Gang-Run PlanDefines how individual products are arranged on press sheets.
LayoutSheetPress SheetA single sheet of substrate that will be printed.
LayoutSheetSideFront or Back of a SheetRepresents one side of a press sheet (frontSide, backSide).
LayoutElement1-Up / Product PositionA single item's position on the ganged sheet (e.g., one business card on a 50-up sheet).
LayoutLayerArtwork Layer / SeparationAn individual layer within a design, like a color separation, a varnish, or a text layer.
LayoutContentObjectArtwork AssetThe actual content, such as a block of text, an image, a barcode, or a die-line. See LayoutContentText, LayoutContentImage, etc.
LayoutColorInk & Color SwatchesThe list of all colors (spot, process) used in the layout.
revisionVersion NumberAn internal counter to prevent accidental overwrites. Every change increments it.

The Nested Structure

A Layout organizes these concepts into a clear hierarchy:

Layout (The Imposition)
 ├─ impositionPlan
 │   └─ signatures[*]
 │       └─ sheets[*] (Press Sheets)
 │           ├─ frontSide
 │           │   └─ layoutElements[*] (1-Up Positions)
 │           │       └─ layers[*] (Artwork Layers)
 │           │           └─ contentObjects[*] (Text, Images, etc.)
 │           └─ backSide
 ├─ colorCatalog[*] (Inks)
 ├─ variableFields[*] (Data for VDP)
 └─ separationSets[*] (Color Separations)

2. Common Prepress Tasks & GraphQL Examples

While you may use a graphical interface, these are the underlying API operations that power common prepress tasks.

2.1 Add a New Product to a Ganged Layout

To add a new "1-up" to a press sheet, you use the addLayoutElement mutation. You must specify which sheet and side it belongs to.

GraphQL Mutation: addLayoutElement

json
{
  "input": {
    "layoutId": "lay_123",
    "revision": 3,
    "sheetId": "sheet_001",
    "side": "FRONT",
    "layoutElement": {
      "id": "element_99",
      "pageNumber": 8,
      "contentBox": { "x": 0, "y": 0, "width": 200, "height": 300, "unit": "pt" },
      "layers": [],
      "layerOrder": []
    }
  }
}

2.2 Swap a Low-Res Image with a High-Res Version

Updating an asset, like an image or graphic, is done with upsertContentObject. You target the specific layer holding the content and provide the new asset details.

GraphQL Mutation: upsertContentObject

json
{
  "input": {
    "layoutId": "lay_123",
    "revision": 4,
    "sheetId": "sheet_001",
    "side": "FRONT",
    "layoutElementId": "element_99",
    "layerId": "layer_image",
    "contentObject": {
      "type": "Image",
      "id": "img_main",
      "assetId": "asset_new_high_res",
      "fitMode": "Cover",
      "boundingBox": { "x": 0, "y": 0, "width": 200, "height": 300, "unit": "pt" }
    },
    "mode": "REPLACE"
  }
}

2.3 Add a Spot Varnish Layer

Adding a new separation, like a spot varnish or a die-line, involves adding a new Layer to a LayoutElement.

GraphQL Mutation: upsertLayer

2.4 Update Job Notes

Simple changes to metadata, like adding production notes, can be done efficiently with patchLayout. This avoids needing to send the entire layout back and forth.

GraphQL Mutation: patchLayout

json
{
  "input": {
    "layoutId": "lay_123",
    "revision": 5,
    "operations": [
      { "op": "replace", "path": "/notes", "value": "Customer approved proof on Oct 24." }
    ]
  }
}

3. Best Practices for Prepress Workflows

  1. Always Work Against the Latest Revision: Think of the revision number as a version check. Before making a change, ensure you have the latest version of the layout. This prevents two operators from overwriting each other's work.

  2. Use the Right Tool for the Job: For small metadata tweaks (like adding notes), use patchLayout. For structural changes (like adding a new product to the sheet), use specific mutations like addLayoutElement.

  3. Respect Layout Status: A layout can be in different states (DRAFT, APPROVED, ARCHIVED). You can only edit layouts in DRAFT status. This is a safety measure to prevent changes to approved or archived jobs.

  4. Mind Your Units: All measurements require a unit (e.g., pt, in, mm). Always be explicit to avoid scaling errors.

  5. Batch Updates Sequentially: If you need to make several changes (e.g., reorder layers and then replace an image), send the commands one after another, using the new revision number returned by the previous command.

4. GraphQL API Reference

For developers building tools on our platform, this section provides a quick reference of the available queries (reading data) and mutations (writing data).

Queries (Reading Data)

GraphQL nameDescription
listLayoutsList all layouts (job bags).
getLayoutFetch a single layout with all its data.
listLayoutElementsGet a flat list of all 1-ups for a layout.
listLayoutLayersGet a flat list of all layers for a layout.
fetchLayoutColorCatalogRetrieve the color swatches (ink book) for the layout.
getLayoutVariableFieldsGet variable data fields for VDP.
getLayoutSummaryReturn high-level counts (sheets, elements, etc.).

Mutations (Writing & Editing Data)

GraphQL nameDescription
createLayoutCreate a new layout for a component.
replaceLayoutReplace an entire layout document.
approveLayoutLock a layout and mark it as APPROVED.
archiveLayoutArchive an approved layout.
addLayoutElementAdd a 1-up to a sheet side.
updateLayoutElementChange an existing 1-up.
removeLayoutElementRemove a 1-up.
upsertLayerAdd or replace an artwork layer.
upsertContentObjectAdd or replace an artwork asset (text, image).
removeContentObjectDelete an artwork asset.
patchLayoutApply small, targeted changes (e.g., updating notes).

All mutations require the current revision number to ensure data integrity.

5. Getting Started with the API

  1. List available layouts to find the id of the job you want to work on.

    graphql
    query Example {
      listLayouts(limit: 10) {
        id
        componentId
        status
        revision
      }
    }
  2. Fetch the full layout document using its id. Note the revision number.

    graphql
    query LayoutDocument($id: ID!) {
      getLayout(id: $id) {
        id
        revision
        impositionPlan {
          # ... and so on
        }
      }
    }
  3. Perform an update using a mutation, providing the revision you just fetched. The operation will return a new revision number. Use this new number for any subsequent edits.

Happy building!

Connect. Combine. Collaborate.
The pioneering open integration platform, dedicated to transforming connectivity in the printing industry.