This functionality is available on Cloud and Enterprise plans.

Event bindings and functions allow you to integrate Stedi with external systems and applications.

Event bindings automatically invoke your function asynchronously in response to events. For example, you could invoke a function for each transaction received from a specific trading partner.


Before creating a binding, complete the following setup:

To test events and event bindings, you can deploy the following simple function that logs the events it receives.

export const handler = async (event, context) => {
  console.dir(event, { depth: null });

Create an event binding in the UI

To configure an event binding:

  1. In Functions UI, open your function.
  2. On the Overview tab, click the Add Event Binding button to open the binding editor.
  3. In the binding editor, you can:
    • Subscribe to one of the default Detail Types, like transaction.processed.v2, by selecting it from the list.
    • Create a custom binding. A custom binding allows you to filter a specific subset of events using a custom event pattern. Visit Creating custom event patterns for details.
  4. Click Create.

Your event binding will take a minute or so to create. It’s ready once the status has changed from Under change to Available. Process a process a test file to try it out.

Visit Events for descriptions of every event type and full event structures.

Custom event patterns

Event patterns are simple JSON objects that have the same structure as the events that they match.

You only need to include the fields in your event pattern that you want to match on, and the values must always be an array. This approach allows a single pattern to match many different events.

The following example pattern would match any file.processed.v2 event when artifactType is text/csv.

Example event pattern

  "detail-type": ["file.processed.v2"],
  "detail": {
    "artifacts": {
      "usage": ["input"],
      "artifactType": ["text/csv"]

Example matching file.processed.v2 event for an incoming CSV

file.processed.v2 event
  "id": "xxx-16fa-ac29-7f9f-c008cd443a21",
  "detail-type": "file.processed.v2",
  "source": "stedi.core",
  "time": "2023-09-06T20:25:03Z",
  "resources": [
  "detail": {
    "fileExecutionId": "xxx-5470-a381-69ca-ee9e4cfa72f7",
    "processedAt": "2023-09-06T20:25:03.194Z",
    "artifacts": [
        "artifactType": "application/edi-x12",
        "usage": "input",
        "sizeBytes": 10036,
        "url": ""

Send data to your downstream service

Instead of writing a custom function, you can use Destination webhooks to automatically send transactions and other events from Stedi to any third-party service. You can add event bindings that define which events should trigger the destination.