# Connect workflow Follow the process of creating, previewing, and deploying a Connector from end to end. The Connector lifecycle spans four scenarios: development, testing, staging, and production. [Creators](/connect/overview.md#who-is-connect-for) develop, test, and publish the Connector, while clients deploy it to staging and production. You can manage each scenario using the [Connect API](/connect/connect-api-overview.md), the [Connect CLI](/connect/cli.md), or the [Merchant Center](/merchant-center/connect.md). For the underlying concepts and terminology, see the [Connect overview](/connect/overview.md). ## Lifecycle at a glance As a Connector moves through its lifecycle, it takes three forms. You develop [Connect applications](/connect/overview.md#connect-applications) locally, preview and publish them as a [ConnectorStaged](/connect/overview.md#connectors), and deploy the resulting read-only [Connector](/connect/overview.md#connectors) for staging and production. Each scenario maps to a [Deployment type](/connect/deployment-behavior-and-environments.md#environments). ```mermaid flowchart TD subgraph development [Development] direction TB A[Develop and test Connect applications locally] --> B[Push source code to GitHub and release with a Git tag] end subgraph testing [Testing] direction TB C[Create a ConnectorStaged] --> D[Request a preview build] D --> E{Preview validation passed?} E -->|No| F[Fix the applications] E -->|Yes| G[Deploy as a preview Deployment] end P[Publish the ConnectorStaged to create a Connector] subgraph staging [Staging] direction TB H[Deploy the Connector as a sandbox Deployment] end subgraph production [Production] direction TB I[Deploy the Connector as a production Deployment] end B --> C F -.-> B G --> P P --> H P --> I ``` - **Development**: build and test your [Connect applications](/connect/overview.md#connect-applications) locally, then [create a GitHub release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release) with a Git tag in the [GitHub repository](/connect/overview.md#github-repository) that stores the source code. - **Testing**: create a [ConnectorStaged](/connect/overview.md#connectors) and deploy it as a `preview` [Deployment](/connect/deployment-behavior-and-environments.md#preview) to validate it in a Project. - **Staging**: [publish](/connect/getting-started.md#publish-your-connector) the ConnectorStaged to create a read-only [Connector](/connect/overview.md#connectors), then deploy it as a `sandbox` [Deployment](/connect/deployment-behavior-and-environments.md#sandbox) for integration testing outside of production. - **Production**: deploy the published Connector as a `production` [Deployment](/connect/deployment-behavior-and-environments.md#production), which requires a non-trial Project. ## Run lifecycle tasks with the CLI, API, or Merchant Center You can run each lifecycle task using the [Connect CLI](/connect/cli.md), the [Connect API](/connect/connect-api-overview.md), or the [Merchant Center](/merchant-center/connect.md). In the CLI, all commands are prefixed with `commercetools connect`. The following table maps each task to its equivalent across the three interfaces. | Task | Connect CLI | Connect API | Merchant Center | | --- | --- | --- | --- | | Develop and test applications locally | [`init`](/connect/cli.md#commercetools-connect-init), [`application start`](/connect/cli.md#commercetools-connect-application-start), [`application test`](/connect/cli.md#commercetools-connect-application-test), [`validate`](/connect/cli.md#commercetools-connect-validate) | Not applicable | Not applicable | | Create a Connector | [`connectorstaged create`](/connect/cli.md#commercetools-connect-connectorstaged-create) | [Create ConnectorStaged](/connect/connectors-staged.md#create-connectorstaged) | [Create connector](/merchant-center/connect.md#create-an-organization-connector) | | Preview and test a Connector | [`connectorstaged preview`](/connect/cli.md#commercetools-connect-connectorstaged-preview) | [Preview Connector](/connect/connectors-staged.md#preview-connector), then [Create Deployment](/connect/deployments.md#create-deployment) (`preview`) | [Request preview](/merchant-center/connect.md#publish-an-organization-connector), then [Deploy on Preview](/merchant-center/connect.md#install-an-organization-connector) | | Publish for private use | [`connectorstaged publish`](/connect/cli.md#commercetools-connect-connectorstaged-publish) | [Publish](/connect/connectors-staged.md#publish) (`certification: false`) | [Publish for private use](/merchant-center/connect.md#publish-an-organization-connector) | | Publish for the marketplace | [`connectorstaged certify`](/connect/cli.md#commercetools-connect-connectorstaged-certify) | [Publish](/connect/connectors-staged.md#publish) (`certification: true`) | [List on Marketplace](/merchant-center/connect.md#publish-an-organization-connector) | | Deploy for staging | [`deployment create`](/connect/cli.md#commercetools-connect-deployment-create) (`--type sandbox`) | [Create Deployment](/connect/deployments.md#create-deployment) (`sandbox`) | Use the CLI or API | | Deploy for production | [`deployment create`](/connect/cli.md#commercetools-connect-deployment-create) (`--type production`) | [Create Deployment](/connect/deployments.md#create-deployment) (`production`) | [Deploy on Production](/merchant-center/connect.md#install-an-organization-connector) | | Redeploy after an update | [`deployment redeploy`](/connect/cli.md#commercetools-connect-deployment-redeploy) | [Redeploy](/connect/deployments.md#redeploy) | [Redeploy](/merchant-center/connect.md#redeploy-a-connector) | | View Deployment logs | [`deployment logs`](/connect/cli.md#commercetools-connect-deployment-logs) | [Query Deployment Logs](/connect/deployment-logs.md#query-deployment-logs) | [App logs](/merchant-center/connect.md#view-connector-logs) | The Merchant Center manages ConnectorStaged and Connectors as **Organization Connectors** and refers to Deployments as **installations**. ## Related pages - [Area overview page with navigation](/connect.md) - [Previous page: Overview](/connect/overview.md) - [Next page: Validation pipeline](/connect/validation-pipeline.md) - [Search documentation and API specs](/search.md)