Function Types
Join Functions
Combine multiple inputs into a single output
Join functions combine multiple inputs into a single, unified output transformed according to the configured output schema. They're useful for aggregating data from parallel processing paths or merging related documents.
When to Use
Use a Join function when you need to:
- Combine outputs across different modes (e.g. combining an image, a voicemail, and a PDF that all comprise a single car accident report)
- Merge related data from different sources
- Create summary outputs from multiple inputs
Configuration Fields
Required Fields
| Field | Type | Description |
|---|---|---|
functionName | string | Unique identifier for the function |
type | string | Must be "join" |
description | string | Description of how inputs should be combined |
joinType | string | Type of join operation (currently "standard") |
outputSchemaName | string | Human-readable name for your output schema |
outputSchema | object | JSON Schema defining the merged output structure |
Optional Fields
| Field | Type | Default | Description |
|---|---|---|---|
displayName | string | - | Human-readable display name |
tags | string[] | - | Tags for organization |
Join Types
| Type | Description |
|---|---|
standard | Combines all inputs into a single output based on the output schema |
Example
Combining Invoice Line Items
When processing a multi-page invoice where each page is extracted separately, use a Join function to combine all line items:
{
"functionName": "invoice-joiner",
"type": "join",
"displayName": "Invoice Aggregator",
"description": "Combines extracted data from multiple invoice pages into a single complete invoice record. Merges line items from all pages and calculates totals.",
"joinType": "standard",
"outputSchemaName": "Complete Invoice",
"outputSchema": {
"type": "object",
"required": ["invoiceNumber", "totalAmount", "lineItems"],
"properties": {
"invoiceNumber": {
"type": "string",
"description": "The invoice number (from any page header)"
},
"vendor": {
"type": "object",
"properties": {
"name": { "type": "string" },
"address": { "type": "string" }
}
},
"totalAmount": {
"type": "number",
"description": "Total amount from the invoice"
},
"lineItems": {
"type": "array",
"description": "All line items combined from all pages",
"items": {
"type": "object",
"properties": {
"description": { "type": "string" },
"quantity": { "type": "number" },
"unitPrice": { "type": "number" },
"totalPrice": { "type": "number" }
}
}
},
"pageCount": {
"type": "integer",
"description": "Number of pages processed"
}
}
},
"tags": ["aggregation", "invoices"]
}Merging Multi-Source Data
When combining data from different document types:
{
"functionName": "shipment-merger",
"type": "join",
"displayName": "Shipment Data Merger",
"description": "Combines data from purchase orders, packing slips, and invoices into a complete shipment record.",
"joinType": "standard",
"outputSchemaName": "Complete Shipment",
"outputSchema": {
"type": "object",
"properties": {
"orderNumber": { "type": "string" },
"shipmentDate": { "type": "string" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sku": { "type": "string" },
"orderedQuantity": { "type": "number" },
"shippedQuantity": { "type": "number" },
"invoicedAmount": { "type": "number" }
}
}
},
"totalInvoiced": { "type": "number" }
}
}
}