|
1
|
--- |
|
2
|
generate_toc: true |
|
3
|
--- |
|
4
|
|
|
5
|
import { ChildDocs } from "docs-ui" |
|
6
|
|
|
7
|
export const metadata = { |
|
8
|
title: `Medusa Core Workflows Reference`, |
|
9
|
} |
|
10
|
|
|
11
|
# {metadata.title} |
|
12
|
|
|
13
|
This section of the documentation provides a reference to the core workflows created by Medusa. Medusa uses these workflows in the Store and Admin API routes. |
|
14
|
|
|
15
|
You can use these workflows and steps in your customizations. For example, you can [execute these workflows](!docs!/learn/fundamentals/workflows#3-execute-the-workflow): |
|
16
|
|
|
17
|
- In an [API route](!docs!/learn/fundamentals/api-routes) when a request is received; |
|
18
|
- In a [subscriber](!docs!/learn/fundamentals/events-and-subscribers) when an event is emitted; |
|
19
|
- In a [scheduled jobs](!docs!/learn/fundamentals/scheduled-jobs) at a specified interval during the application's runtime; |
|
20
|
- In a [custom CLI scripts](!docs!/learn/fundamentals/custom-cli-scripts) that you can execute from the terminal; |
|
21
|
- Or in a custom workflow that wraps the existing workflows and steps in a custom flow. You can then execute your custom workflow in the same way as the core workflows. |
|
22
|
|
|
23
|
Through this reference, you'll learn about the available workflows and steps in Medusa out-of-the-box. For each workflow, you'll explore its steps, expected input and output, an example of executing that workflow, and how to inject custom functionalities into the workflow, if applicable. |
|
24
|
|
|
25
|
All workflows and steps in this reference are exported by the `@medusajs/medusa/core-flows` package. |
|
26
|
|
|
27
|
<ChildDocs startChildLevel={2} hideItems={["Overview", "Steps"]} defaultItemsPerRow={2} search={{ |
|
28
|
enable: true, |
|
29
|
placeholder: "Search workflows...", |
|
30
|
storageKey: "medusa-workflows-reference", |
|
31
|
}} /> |