# Business use cases

This section covers the work of building a connector, domain by domain:

* obtain the authorization of each seller on the channel,
* bring the seller's stores into Mirakl Connect,
* declare and synchronize the catalog,
* carry the orders and the returns in both directions.


This page frames that work: which flows exist, which ones are yours, and where to start.
Each domain then has its own guide.

## The flows

Your connector carries every flow that reaches the channel.
That is why each of those arrows crosses its lifeline.

The numbers are labels on the diagram, not a build order.

```mermaid
sequenceDiagram
    autonumber
    box rgb(254,226,226) Seller
    actor SE as Seller System
    end
    box rgb(219,234,254) Mirakl
    participant MC as Mirakl Connect
    end
    box rgb(209,250,229) Middleware
    participant IN as Channel Connector
    end
    box rgb(254,240,199) Channel
    participant CH as Channel
    end

    SE->>CH: Channel authorization
    CH->>MC: Channel stores configuration
    MC--)CH: Channel store features configuration
    CH->>MC: Channel catalog configuration
    CH->>MC: Channel taxonomy configuration
    SE->>MC: Mirakl Connect product and offer flow
    MC--)CH: Channel product and offer flow
    CH->>MC: Channel product and offer integration feedback flow
    CH->>MC: Channel order flow
    MC->>SE: Mirakl Connect order flow
    SE->>MC: Mirakl Connect order action
    MC--)CH: Channel order action
    CH->>MC: Channel order action feedback
```

*A solid arrow is an API call.
A dashed arrow is an event.*

## What you implement

### Channel authorization

Before anything else can run for a seller, that seller must grant your connector access to their account and their stores on the channel.
To obtain and hold that consent is the responsibility of your connector.

| # | Flow | What it does | Guide |
|  --- | --- | --- | --- |
| 1 | Channel authorization | Obtain the consent of a seller to access their channel account, run the channel's authorization mechanism, and store the credentials it produces. | [Channel authorization](/content/product/connect-channel-platform/developer-guide/channel-authorization) |


The mechanism belongs to the channel: a shared API key, an OAuth2 flow, or whatever else the channel offers.
Your connector therefore exposes a consent endpoint and drives that process itself.
When the authorization of a channel expires, your connector must also expose a renewal endpoint that the seller can return to.

### Stores

| # | Flow | What it does | Guide |
|  --- | --- | --- | --- |
| 2 | Channel stores configuration | Import the seller's channel stores into Mirakl Connect. It is part of the authorization process, which issues the token that authorizes the import. | [Channel authorization](/content/product/connect-channel-platform/developer-guide/channel-authorization#importing-the-stores) |
| 3 | Channel store features configuration | Manage the features enabled for a given store, including whether the seller has linked it, which is what activates or deactivates its synchronization flows. | [Stores](/content/product/connect-channel-platform/developer-guide/stores) |


### Catalog

| # | Flow | What it does | Guide |
|  --- | --- | --- | --- |
| 4 | Channel catalog configuration | Declare the channel's offer attributes and the offer use cases it supports. | [Catalog configuration](/content/product/connect-channel-platform/developer-guide/catalog-configuration) |
| 5 | Channel taxonomy configuration | Import the channel's taxonomy, which is its product types and its taxonomy rules, into Mirakl Connect. | [Taxonomy](/content/product/connect-channel-platform/developer-guide/taxonomy) |
| 7 | Channel product and offer flow | Receive the products, the offers, the prices, and the stock, and publish them to the channel. | [Catalog flow](/content/product/connect-channel-platform/developer-guide/catalog-flow), [Create or update products](/content/product/connect-channel-platform/developer-guide/catalog/create-products), [Create and update offers](/content/product/connect-channel-platform/developer-guide/catalog/create-and-update-offers), [Sync price and stock](/content/product/connect-channel-platform/developer-guide/catalog/sync-price-and-stock) |
| 8 | Channel product and offer integration feedback flow | Report the integration status and the diagnostics of each product and each offer back to Mirakl Connect. | [Report feedback](/content/product/connect-channel-platform/developer-guide/catalog/report-feedback) |


### Orders

| # | Flow | What it does | Guide |
|  --- | --- | --- | --- |
| 9 | Channel order flow | Synchronize the channel's orders into Mirakl Connect. | [Sync orders into Connect](/content/product/connect-channel-platform/developer-guide/orders/sync-orders-into-connect) |
| 12 | Channel order action | Carry out on the channel the order actions Mirakl Connect requests. | [Handle order action events](/content/product/connect-channel-platform/developer-guide/orders/handle-order-action-events) |
| 13 | Channel order action feedback | Report the outcome of each action back to Mirakl Connect. | [Handle order action events](/content/product/connect-channel-platform/developer-guide/orders/handle-order-action-events) |


Returns carry no number of their own on the diagram.
They travel with the order flow: they are synchronized the same way as the orders, and the same action events drive them.
Refer to [Returns](/content/product/connect-channel-platform/developer-guide/returns).

## What Mirakl Connect handles

These flows run between the seller and Mirakl Connect.
They are listed so that the diagram reads end to end, and they need no work from you.

| # | Flow | What happens |
|  --- | --- | --- |
| 6 | Mirakl Connect product and offer flow | The seller imports their products and their offers into Mirakl Connect. |
| 10 | Mirakl Connect order flow | The seller lists their channel orders in Mirakl Connect. |
| 11 | Mirakl Connect order action | The seller accepts and ships the channel orders from Mirakl Connect. |


## Where to start

The flows split into two kinds, by what each one waits on.
Some describe the **channel**, and you can do them as soon as the Mirakl team has created it.
The others run **for each seller**, and they wait on that seller.

**Channel level, with nothing to wait for:**

* **[Catalog configuration](/content/product/connect-channel-platform/developer-guide/catalog-configuration)**: declare the channel's offer attributes and the offer use cases it supports.
Mirakl Connect emits offer upserts only for the use cases you have declared, and what you declare here is also what sellers are asked to fill in.
* **[Taxonomy](/content/product/connect-channel-platform/developer-guide/taxonomy)**: register the channel's product types and taxonomy rules.
Products are only ever created in the product types you have registered.


**For each seller, where each flow depends on state that another one established:**

* **[Channel authorization](/content/product/connect-channel-platform/developer-guide/channel-authorization)**: nothing can be read from the channel, or written to it, for a seller who has not authorized you.
* **[Stores](/content/product/connect-channel-platform/developer-guide/stores)**: a store must exist and be linked before any catalog flow or order flow runs for it.
* **[Catalog flow](/content/product/connect-channel-platform/developer-guide/catalog-flow)**: products and offers start to arrive for a linked store, once the channel-level configuration above is in place.
* **[Orders](/content/product/connect-channel-platform/developer-guide/orders)**: you can push orders as soon as a store is linked, and the action flow follows.


## Related pages

* [Integration overview](/content/product/connect-channel-platform/getting-started/integration-overview): where your connector sits, the two directions, where the state lives, and the boundary of responsibility.
* [API and event directory](/content/product/connect-channel-platform/getting-started/api-and-event-directory): the REST operations and the events that each flow above uses.
* [Data model](/content/product/connect-channel-platform/getting-started/data-model): the definition, field by field, of the entities these flows carry.
* [Best practices](/content/product/connect-channel-platform/developer-guide/best-practices): the rules on idempotency, ordering, retries, and errors that every flow obeys.