Functions is a serverless compute service that lets you run code on Stedi’s infrastructure. Functions are similar to AWS Lambda, Google Cloud Functions, or Azure Functions. You can use functions to build any type of integration by supplying your source code.
When to use Stedi Functions
You should use a function if all of the following criteria apply:
- A transformation or operation is too complicated to handle purely within a mapping
- You want to keep all of your business logic encapsulated within Stedi
Alternatives to Stedi Functions
- Write code to run on your infrastructure. This route is best if you prefer to manage all of the data transformations and business logic within your own codebase. You can do so by consuming Destination webhooks from Stedi and making API calls to the Generate EDI API. Stedi’s webhooks can send data to any URL using Basic, OAuth, or API Key authorization, or directly to a cloud function like AWS Lambda, Google Cloud Functions, or Azure Functions.
- Use an iPaaS platform like Zapier, Workato, or Tray.io. This route is best if you already have an iPaaS system in place and want to continue to use it to encapsulate your business logic. These platforms can ingest the Guide JSON payload from Stedi and transform it into your system’s format using a visual interface. They can also transform your system’s data into Stedi’s JSON format before calling the Generate API.
Functions offer the following benefits:
Runs your code in a hosted environment that’s fully-managed by Stedi
Integrates natively with Stedi events
Out-of-the-box best practices for resiliency and monitoring, including:
- Built-in retries and dead letter queues (DLQs)
- Log retention and essential operational metrics.
Functions allow you to use any third-party libraries and include unrestricted network access to integrate with Stedi products, your own APIs, or third-party services. They can be invoked synchronously or asynchronously.
You use functions to build any type of integration or standalone backend service by supplying your source code. You may want to use functions for the following use cases:
- Perform custom transformations in response to Stedi events. For example, you may want to:
- Store transactional details in a database such as Stash to use in subsequent transactions.
- Integrate with internal or external API endpoints or webhooks.
- Wrap a potentially unreliable processing step with configurable retries and a built-in error queue.
Visit Creating and deploying functions for instructions.