Connect

Ask about this Page
Copy for AI
View as Markdown

Build, validate, and manage commercetools Connect connectors and deployments from the terminal.

The connect topic provides commands for the full Connector development lifecycle, from scaffolding a new connector project locally to creating and monitoring live deployments. Commands are grouped into four areas: local development, staged connector management, deployment management, and application utilities.
Commands that call the API need an authenticated session. For how to log in, see Authentication.

Local development

connect init

Scaffolds a new Connect project from a template.

Scaffold a Connect projectbash
commercetools connect init [<directory>] [--template <template>]
Argument or flagDescription
<directory>Target directory for the project (prompts if omitted)
--templateTemplate to bootstrap the project with (prompts if omitted)

connect validate

Validates the connector configuration and applications in a local project directory.

Validate a Connect projectbash
commercetools connect validate [<directory>] [--skip <step>]
Argument or flagDescription
<directory>Connect project directory (defaults to current directory)
--skipSkip a validation step: test or analysis

connect bundle

Bundles all Connect applications in the project into deployable images.

Bundle the applicationsbash
commercetools connect bundle

Staged connectors

Staged connectors are private, editable versions of a connector that go through a review lifecycle before being published. The describe, update, preview, publish, and certify commands of connectorstaged accept --id or --key to identify the target connector.

connect connectorstaged list

Lists staged connectors.

List staged connectorsbash
commercetools connect connectorstaged list [--limit <n>] [--offset <n>] [--sort <expr>]
FlagDescription
--limitMaximum number of results
--offsetNumber of results to skip
--sortSort expression

connect connectorstaged describe

Gets a staged connector.

Get a staged connectorbash
commercetools connect connectorstaged describe (--id <id> | --key <key>)

connect connectorstaged create

Creates a staged connector.

Create a staged connectorbash
commercetools connect connectorstaged create \
  --key <key> \
  --repository-url <url> \
  --repository-tag <tag> \
  --creator-email <email> \
  --name <name> \
  [--description <text>] \
  [--supported-regions <regions>] \
  [--integration-types <types>]
FlagDescription
--keyUnique key for the connector
--repository-urlGit repository URL
--repository-tagGit tag or branch to deploy
--creator-emailEmail of the connector creator
--nameDisplay name
--descriptionShort description
--supported-regionsComma-separated list of supported Regions
--integration-typesComma-separated list of integration types

connect connectorstaged update

Updates a staged connector.

Update a staged connectorbash
commercetools connect connectorstaged update \
  (--id <id> | --key <key>) \
  [--repository-url <url>] \
  [--repository-tag <tag>] \
  [--creator-email <email>] \
  [--name <name>] \
  [--description <text>] \
  [--supported-regions <regions>] \
  [--integration-types <types>]

connect connectorstaged preview

Runs the required validations and creates a preview deployment of the staged connector, so you can test it without publishing it.

Preview a staged connectorbash
commercetools connect connectorstaged preview \
  (--id <id> | --key <key>) \
  --deployment-key <key> \
  --region <region> \
  [--configuration <key=value>...]

connect connectorstaged publish

Initiates the publishing process for a staged connector.

Publish a staged connectorbash
commercetools connect connectorstaged publish (--id <id> | --key <key>)

connect connectorstaged certify

Initiates the certification process for a staged connector.

Certify a staged connectorbash
commercetools connect connectorstaged certify (--id <id> | --key <key>)

Deployment

Deployments are running instances of a connector in a Project.

connect deployment list

Lists deployments.

List deploymentsbash
commercetools connect deployment list [--limit <n>] [--offset <n>] [--sort <expr>]

connect deployment describe

Gets a deployment.

Get a deploymentbash
commercetools connect deployment describe (--id <id> | --key <key>)

connect deployment create

Creates a deployment of a connector.

Create a deploymentbash
commercetools connect deployment create \
  [--key <key>] \
  (--connector-id <id> | --connector-key <key>) \
  --region <region> \
  [--connector-staged] \
  [--type preview|sandbox|production] \
  [--configuration <key=value>...]
FlagDescription
--keyKey for the new deployment
--connector-idID of the connector to deploy
--connector-keyKey of the connector to deploy
--connector-stagedDeploy the staged version instead of the published version
--typeThe type of the deployment: preview, sandbox, or production
--regionTarget Region (for example, europe-west1.gcp)
--configurationConfiguration key-value pairs. Can be repeated.

connect deployment redeploy

Redeploys an existing deployment, optionally updating its connector version or configuration.

Redeploy a deploymentbash
commercetools connect deployment redeploy \
  (--id <id> | --key <key>) \
  [--configuration <key=value>...] \
  [--update-connector] \
  [--skip-scripts]
FlagDescription
--configurationUpdated configuration key-value pairs
--update-connectorPull the latest version of the connector
--skip-scriptsSkip pre/post-deployment scripts

connect deployment logs

Retrieves logs for a deployment.

Get deployment logsbash
commercetools connect deployment logs \
  (--id <id> | --key <key>) \
  [--application <name>] \
  [--start-date <date>] \
  [--end-date <date>]
FlagDescription
--applicationFilter logs by application name
--start-dateStart date for log retrieval
--end-dateEnd date for log retrieval

connect deployment delete

Deletes a deployment.

Delete a deploymentbash
commercetools connect deployment delete (--id <id> | --key <key>) [--yes] [--dry-run]
FlagDescription
--idUnique identifier of the deployment. Specify either --id or --key.
--keyUser-defined unique identifier of the deployment. Specify either --id or --key.
--yes, -ySkip the confirmation prompt. Required for non-interactive use, for example in CI or from an AI agent.
--dry-runShow what would be deleted without deleting anything

Application utilities

These commands operate on the local application source code within a Connect project.

CommandDescription
connect application addAdds a new application to an existing Connect project
connect application buildBuilds a Connect application
connect application startStarts a Connect application locally
connect application testRuns tests for a Connect application

Workflow example

Connector development workflowbash
# 1. Scaffold a new connector
commercetools connect init my-connector

# 2. Develop and validate locally
cd my-connector
commercetools connect validate

# 3. Create a staged connector
commercetools connect connectorstaged create \
  --key my-connector \
  --name "My Connector" \
  --repository-url https://example.com/org/my-connector \
  --repository-tag v1.0.0 \
  --creator-email dev@example.com

# 4. Preview the staged connector (validates it and creates a preview deployment)
commercetools connect connectorstaged preview \
  --key my-connector \
  --deployment-key my-connector-preview \
  --region europe-west1.gcp

# 5. Deploy to a Project
commercetools connect deployment create \
  --key my-connector-prod \
  --connector-key my-connector \
  --region europe-west1.gcp \
  --configuration "API_KEY=abc123"

# 6. Check logs
commercetools connect deployment logs --key my-connector-prod