Object - Pack
Type identifier:
object:packCategory: 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 |
|---|---|---|---|
| Varies | No | One input for each selected Schema path |
| 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 |
|---|---|---|
| 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 |
|---|---|---|---|---|
|
| Yes |
| Display label for the node |
|
| Yes | Empty object | Schema definition or reference |
|
| Yes |
| Paths to properties to accept |
Configuration Details
schema
- Type:
objectwith atypeofliteralorreference 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
datainput 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
- Resolves the Schema (literal or by reference)
For object Schemas, for each selected property:
- Resolves the input handle value
- Maps value to target Schema type
- Constructs the object by setting values at property paths, or reads
datafor a non-object Schema - Validates the value against the Schema
- Returns the packed value, with ID-based property keys for objects
Schema Resolution
Schema Type | Behaviour |
|---|---|
| Uses the inline Schema |
| 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