Flows is a workflow engine for orchestrating Sohar APIs into a single automated process.
Instead of integrating each API endpoint separately and managing the logic yourself, Flows lets you define a workflow once and run it as a single unit. You can think of it as workflow-as-code for common healthcare operations. A Flow can call multiple Sohar products in sequence, branch based on results, pause while waiting for additional input and return a final output when the workflow is complete.
At a practical level, a Flow is a reusable workflow template, and a Run is one execution of that template. A template defines the workflow logic, including what inputs it expects, which states it executes, how it makes decisions and what output it returns. A Run is what happens when your application starts that workflow for a specific request.
Flows are useful when the integration you want is bigger than a single API call. For example, you may need to run multiple products in order, apply decision logic between states, or introduce a human-in-the-loop step before continuing. Rather than hard-coding that orchestration in your application, you can define it in a Flow and interact with it through the API.
This gives teams a more structured way to build automation on top of Sohar. Developers get a clearer orchestration model, product teams get reusable workflow definitions, and both gain a consistent way to reason about multi-step API behaviour.