Ligantic
Knowledge Base
Tutorials
Updates
Search Articles
Login
Free Sign Up
Home
Get Started
Tutorials
How-to guides
Reference
Explanation
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
Browse documentation
Home
Get Started
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
Docs
/

Object - Pack

Type identifier: object:pack Category: Object Operations

Description

Combines selected property values into a Schema-validated object, or validates a data input against a non-object Schema. The configured Schema can be inline or reference an existing Schema.

Input Handles

Handle

Data Type

Required

Description

<propertyPath>

Varies

No

One input for each selected Schema path

data

Varies

Yes for a non-object Schema

Value to validate and pack

Input Handle Details

Property Handles

Input handles are generated from selectedProperties:

  • Handle ID: Dot-notation path using Schema property IDs (for example, Pname, Paddress.Pcity)
  • Type: Defined by the Schema's property type
  • Notes: Each connected handle supplies the value for that path.

Output Handles

Handle

Data Type

Description

object

Configured Schema

The packed value

Output Handle Details

object

  • Type: Value matching the configured Schema
  • Notes:

    • Validated against the Schema before output

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"Object - Pack"

Display label for the node

schema

object

Yes

Empty object

Schema definition or reference

selectedProperties

array

Yes

[]

Paths to properties to accept

Configuration Details

schema

  • Type: object with a type of literal or reference
  • Variants:

    • { type: "literal", schema: <schemaDefinition> } - Inline Schema definition
    • { type: "reference", schemaId: string } - Reference to existing Schema
  • Default: Object type with empty properties
  • Notes:

    • Can toggle between inline and Schema reference in UI

selectedProperties

  • Type: Array of paths (a string, number, or path-segment array)
  • Format: Each entry represents a path (for example, ["Paddress", "Pcity"])
  • Notes:

    • Determines which input handles are created
    • Only properties with connected handles are populated
    • Paths must identify properties in the configured object Schema. Non-object Schemas must have no selected properties and use the data input instead; a reference that resolves to a non-object Schema with selected properties fails during the run.

Behaviour

Value Traits in Flows v2

Packing a sensitive input marks its destination field as Sensitive, including any nested marked fields. Unrelated fields remain unmarked. The run inspector shows marked paths but withholds the entire containing payload. Flow Result may pass an object containing a sensitive field back to an inline child Flow's caller, but cannot return it as the top-level Flow run result.

Execution Flow

  1. Resolves the Schema (literal or by reference)
  2. For object Schemas, for each selected property:

    • Resolves the input handle value
    • Maps value to target Schema type
  3. Constructs the object by setting values at property paths, or reads data for a non-object Schema
  4. Validates the value against the Schema
  5. Returns the packed value, with ID-based property keys for objects

Schema Resolution

Schema Type

Behaviour

literal

Uses the inline Schema

reference

Uses the referenced Schema from the current Space

A reference that resolves to a non-object Schema reads the data input; if it is not connected, the run fails.

Value Mapping

Values are automatically mapped to the target Schema:

  • Type coercion is applied when possible
  • Nested objects are recursively handled
  • Numeric path segments select array indexes

Error Handling

Scenario

Behaviour

Schema reference unavailable

The run fails

Invalid data for Schema

The run fails with a Schema validation error

Examples

Basic Object Construction

{
  "type": "object:pack",
  "data": {
    "label": "Create User Object",
    "schema": {
      "type": "literal",
      "schema": {
        "type": "object",
        "name": "User",
        "properties": {
          "Pname": { "type": "string", "name": "Name" },
          "Pemail": { "type": "string", "name": "Email" }
        }
      }
    },
    "selectedProperties": [["Pname"], ["Pemail"]]
  }
}

Creates input handles: Pname, Pemail. Output: { Pname: "...", Pemail: "..." }

Pack With an Existing Schema

{
  "type": "object:pack",
  "data": {
    "label": "Pack Order",
    "schema": {
      "type": "reference",
      "schemaId": "cm12345678901234567890123"
    },
    "selectedProperties": [["PcustomerId"], ["Pitems"], ["Ptotal"]]
  }
}

Uses an existing Schema from the Space.

Pack Nested Properties

{
  "type": "object:pack",
  "data": {
    "label": "Pack Address",
    "schema": {
      "type": "literal",
      "schema": {
        "type": "object",
        "name": "Contact",
        "properties": {
          "Pname": { "type": "string", "name": "Name" },
          "Paddress": {
            "type": "object",
            "name": "Address",
            "properties": {
              "Pstreet": { "type": "string", "name": "Street" },
              "Pcity": { "type": "string", "name": "City" }
            }
          }
        }
      }
    },
    "selectedProperties": [["Pname"], ["Paddress", "Pstreet"], ["Paddress", "Pcity"]]
  }
}

Creates handles: Pname, Paddress.Pstreet, Paddress.Pcity

Related pages

Data - Literal
Provides a static data value of any supported type. Use this node to inject constant values into your Flow, such as configuration strings, default numbers, or structured objects.
Page not found. It may have moved or may not be published.
Browse documentation