Function Types Overview
Understanding the different types of functions available in bem
Functions are the core building blocks for data processing in bem. Each function type serves a specific purpose and has its own configuration requirements.
If you're coming from V1/V2 and looking for transform, analyze, or route, see V3 migration. Those types remain readable and callable; new functions should be created as extract or classify.
Available Function Types
| Type | Purpose | Key Use Case |
|---|---|---|
| Extract | Pull structured JSON out of documents, images, and media against a schema | Invoice processing, form extraction, receipt scanning, visual analysis |
| Classify | Direct inputs down labeled paths based on content | Document classification, workflow branching |
| Split | Break multi-page documents into pieces | Multi-document PDFs, batch processing |
| Join | Combine multiple inputs into one output | Data aggregation, multi-source merging |
| Enrich | Semantic search against collections | Knowledge base lookup, context enrichment |
| Parse | Render documents into a navigable structure of sections, entities, and relationships | LLM-agent retrieval over a corpus, cross-document memory, RAG-free Q&A |
| Payload Shaping | Translate JSON data with JMESPath expressions | Data mapping, format conversion |
| Render | Merge structured JSON into a Word template to produce a .docx | Generate contracts, reports, and letters from extracted data |
| Send | Deliver workflow outputs to a webhook, S3 bucket, or Google Drive folder | Push to downstream APIs, mirror outputs to a data lake |
Common Configuration
All function types share these base fields:
| Field | Type | Required | Description |
|---|---|---|---|
functionName | string | Yes | Unique identifier for the function (per environment) |
type | string | Yes | The function type (e.g., "extract", "classify") |
displayName | string | No | Human-readable name for display in the UI |
tags | string[] | No | Tags for categorizing and organizing functions |
Choosing the Right Function Type
- Need to pull structured data out of a document, image, or media file? Use an Extract Function
- Need to classify inputs and route them down different paths? Use a Classify Function
- Have multi-document files to break apart? Use a Split Function
- Need to combine multiple outputs? Use a Join Function
- Need to add context from a knowledge base? Use an Enrich Function
- Want LLM agents to navigate a corpus by sections and entities instead of fixed fields? Use a Parse Function
- Want to reshape JSON without AI processing? Use a Payload Shaping Function
- Need to merge structured JSON into a Word template and produce a
.docx? Use a Render Function - Want to deliver workflow outputs to a webhook, S3 bucket, or Google Drive folder? Use a Send Function
Finding Functions Used by a Workflow
Before editing a workflow, check which function versions its nodes are
pinned to. GET /v3/functions filters by workflowNames / workflowIDs
for any function a workflow references, or by
workflowNameVersionNums / workflowIDVersionNums to narrow to the
functions pinned by one specific workflow version:
curl -G "https://api.bem.ai/v3/functions" \
-H "x-api-key: $BEM_API_KEY" \
-d workflowNameVersionNums=invoice-processing.2Pass includeExtraSettings=true to also populate each function's
extraConfig block, which is omitted by default. GET /v3/functions
supports several more filters — see List Functions
for the complete parameter list.