Choose the runtime after you choose the connection point, not before. Then build only as much as the requirement needs: configuring an existing Connector costs far less than building one.
A vendor's marketplace page says its product "integrates with commercetools." Zen Electron's team wants to know whether that's something it can deploy, configure, or would need to build. This page gives the team the questions to ask.
Two runtime options
Every connection point works with either runtime:
- Your own infrastructure: any HTTPS endpoint, queue consumer, or scheduler that you operate. You choose the language, hosting, and scaling, and you run it.
- Connect: a managed runtime from commercetools. You supply the code, and Connect hosts, scales, and runs it.
Connect application types
service: answers an API Extension or receives inbound webhooks from external systems. Theservicetype is an HTTPS endpoint, so it isn't limited to API Extensions.event: consumes notifications from a Subscription. Theeventtype only consumes notifications from commercetools Subscriptions.job: runs on a schedule, for example to call the Direct API or the Import API.
merchant-center-custom-application and merchant-center-custom-view types host Merchant Center customizations, and the assets type hosts static files.When to stay on your own infrastructure
- An existing platform with its own deployment, monitoring, and on-call processes that the team prefers to reuse.
- A Region that Connect doesn't offer, where you need the integration close to another system.
- Vendor-hosted or iPaaS integrations, which run on the vendor's or iPaaS provider's infrastructure.
The Connect lifecycle
sandbox, preview, or production. The environment decides latency. A sandbox Deployment scales down to zero when idle, so the next request has a cold start. A production Deployment keeps warm instances ready and requires a Project that isn't a trial. Price the contract shows how a cold start breaks an API Extension.The adoption ladder
Before you build, climb only as far as you need. Stop at the first step that meets the requirement:
- Configure a public Connector. One exists and covers the requirement. Install and configure it.
- Prove the gap isn't configuration. Before you decide a Connector falls short, check whether its configuration options close the gap. Many apparent gaps are settings.
- Fork or extend. An open-source Connector covers most of the requirement. Fork it, add only the missing behavior, and publish it as a private Connector. This step isn't available for Connectors whose source you can't access.
- Build from a template. Nothing suitable exists. Start from the closest template.
The ladder is a learning aid for ordering the decision, not an official commercetools framework. Each step up adds code that your team owns.
Templates as an effort signal
--template values, which don't match the documentation pages exactly. Check both when you estimate a build.Verify that a listing is a Connect Connector
A marketplace listing that says a product "integrates with commercetools" might describe a Connect Connector, a vendor-hosted service, or an iPaaS recipe. Only a Connect Connector can be deployed by Connect.
GET https://connect.australia-southeast1.gcp.commercetools.com/connectors/search?integrationTypes=psp&limit=5
Authorization: Bearer {access_token}
{
"results": [
{
"id": "5ab3edcd-9d23-4934-8f48-256805253119",
"key": "example-payment-connector",
"name": "Example payment Connector",
"integrationTypes": ["psp"],
"certified": true,
"private": false,
"repository": {
"url": "git@github.com:example/payment-connector.git",
"tag": "v2.4.0"
},
"supportedRegions": ["australia-southeast1.gcp", "europe-west1.gcp"],
"configurations": [
{ "applicationName": "processor", "applicationType": "service" },
{ "applicationName": "enabler", "applicationType": "assets" }
]
}
]
}
- The request needs an access token with the
view_connectorsscope. Hosts and authorization lists the Connect scopes. integrationTypesfilters by domain. See IntegrationType for the current values.certifiedandprivatetell you whether the Connector passed certification and who can deploy it.supportedRegionstells you whether it can run in your Project's Region.configurationslists the applications and their types, which tells you which connection points the Connector uses.
connect.yaml file at its root, which declares each application. The repository doesn't have to be public: certified Connectors can use private repositories. Don't treat a missing public repository as proof that a listing isn't a Connector.connect.yaml file declares three applications:deployAs:
- name: free-sample-product-service
applicationType: service
endpoint: /free-sample-product-service
scripts:
postDeploy: npm run connector:post-deploy
preUndeploy: npm run connector:pre-undeploy
- name: new-product-event-app
applicationType: event
endpoint: /new-product-event-app
- name: new-category-cleanup-job-app
applicationType: job
endpoint: /new-category-cleanup-job-app
properties:
schedule: '0 1 * * *'
applicationTypetells you the runtime pairing for each application.scripts.postDeployandscripts.preUndeployrun after deployment and before removal. Connectors use them to create and remove Project resources such as Subscriptions and API Extensions.properties.schedulesets the default schedule for a job. See Configure connect.yaml for every key.
connect.yaml file, including its configuration.Worked example: choose a step for each integration
| Integration | Runtime | Adoption step | Reason |
|---|---|---|---|
| A. Catalog and stock feed | Connect job or own infrastructure | Step 1, 2, or 3 | Depends on whether a public PIM Connector fits. If the initial load of 46,000 Products can't finish within the current job request limit, the team runs it from its own infrastructure. |
| B. Same-day metro delivery eligibility | Connect service on a production Deployment, or own infrastructure | Built-in, or step 4 | The built-in predicate may be enough. If not, no public Connector covers a private postcode service, so the team builds one. |
| C. Checkout payments | Connect | Step 1 | A certified payment Connector exists for the team's PSP. |
| D. Order confirmation email | Connect event application | Step 4 | No public Connector fits Zen Electron's email service provider, so the team builds one from the email template. |
integrationTypes=email. No result supports Zen Electron's email service provider, and no configuration option closes the gap, so the team stops at step 4. The Deploy and build Connectors module builds the order confirmation email Connector from a template, then installs and operates it the way a Client would.Key takeaways
- Choose the runtime after the connection point. Every connection point works with your own infrastructure or Connect. For storefront-facing logic and API Extensions, the Commerce Integration Layer can also host the code.
- Connect
serviceapplications answer API Extensions and inbound webhooks.eventapplications consume Subscriptions, andjobapplications run on a schedule. - Keep long-running, compute-heavy, stateful, or bulk-batch work on your own infrastructure.
- Sandbox Deployments scale to zero. Production Deployments stay warm and require a Project that isn't a trial.
- Climb the adoption ladder only as far as needed: configure, prove the gap isn't configuration, fork, then build.
- Verify a listing through the Connect surface. A private repository doesn't rule out a Connect Connector.