Workflow Framework
Building modern web workflows with the Temporal framework
Framework
Introduction
Stateset Workflows using Temporal
Temporal is an open source programming model that can simplify your code, make your applications more reliable, and help you deliver more features faster. The temporal framework allows activities to be defined and workflows to execute them based on the state or specific signals. Temporal provides the workflow management engine to combine the power of serverless API calls with a deterministic scheduler for execution. By leveraging the Temporal workflow orchestration framework, Stateset automates the entire Returns Management (RMA) process. This includes generating and emailing return labels, creating returns in Stateset, providing search capabilities for efficient record retrieval, updating customer support platforms with tracking information, and processing instant refunds. This automation streamlines the return process, enhances customer experience, and enables businesses to effectively manage and track returns.
Stateset Workflows
Stateset Workflows are built using the Temporal framework. The framework consists of the following components:
- Temporal Client
- Temporal Worker
- Temporal Workflow
- Temporal Activities
Temporal Client
The Temporal Client is the main entry point for Temporal applications. The client is used to start workflows and send signals to them. The client is also used to register and start workers. The client is configured with the following parameters:
- Namespace
- Task Queue
- Workflow Path
Here is an example of Stateset’s Return API using Temporal Client:
Temporal Worker
Here is an example of Stateset’s Return API using Temporal Worker & Workflow:
Return Approved Workflow
The Returns Workflow is the main workflow that is executed when a return is approved. The workflow is triggered by a signal from the Returns API. The workflow then calls the following activities:
Activities
The activities are the functions that are called by the workflow. The activities are defined in the activities.js file and are called by the workflow.
StateSet Cloud
StateSet offers hosted Temporal workflows that are completely deterministic and have state-of-the-art infrastruting these operations. The hosted service is available at https://cloud.stateset.com