This page is optional and ungraded. AI output differs from one learner to the next, so the page gives you the requirement and the acceptance checks, not the code. You decide whether the result is done by checking it, not by comparing it with a reference solution.
commercetools-connect skill covers Connect applications, and the commercetools-integrations skill has a transactional email sub-area for this domain. As in Use the integration guides, ask the assistant which sub-area and step it used.The requirement
OrderCreatedFromRecurringOrder instead of OrderCreated. The Connector doesn't subscribe to that type, so customers with a recurring Order get no confirmation.A starting prompt:
Using the commercetools-connect skill, add the OrderCreatedFromRecurringOrder
Message type to the mail-sender application in this repository, so that it is
handled as an order confirmation. Keep the existing at-most-once acknowledgment
policy and the least-privilege scopes. Add a unit test. Explain each change.
Acceptance checks
The change is done when every check passes:
- Filter and router.
ORDER_SUBSCRIPTION_MESSAGE_TYPES, or whatever the assistant changed instead, makes both the Subscription filter insrc/connector/actions.jsand the router insrc/validators/message.validators.jsincludeOrderCreatedFromRecurringOrder. - Unit test. A test posts an
OrderCreatedFromRecurringOrderMessage tomessageHandlerand asserts that the order confirmation handler runs. Adding the type to the routing test'sit.eachlist is enough. - Delivery policy unchanged. The controller still returns
202as its first statement, so the policy recorded in the README still holds. The one-sentence test for the contract gives the same three answers as before. - Scopes unchanged.
inheritAs.apiClient.scopesstill listsmanage_subscriptions,view_orders, andview_customers, and nothing else. - Validation passes.
npm run test:unitandnpx eslint src testspass, andcommercetools connect validatereports no findings that your previous release didn't already have. Local SAST can be stricter than the remote gate, so the publishing report for the new tag decides, as described in Trust the remote report. - The Subscription has the type after deployment. Move the Deployment to the new version as on Operate a Deployment. Don't skip scripts:
postDeploymust run to update the Subscription. Then query the Subscription by key and confirm thatmessageslists the new type. - Reviewed against the docs. You checked each change against the Connect documentation and the email guide, not only the assistant's explanation.
Record what you used
Add a line to your repository's README with the following:
- The assistant and model you used.
- The skill and plugin version, as your plugin manager shows it.
- The date.
Skills change between versions, and the same prompt can produce different code. The record tells a reviewer what produced the change.
AI assistance doesn't transfer accountability. You own the code that you merge, and you verify it to the same standard as code you wrote yourself.
Verify the result, not the report
An assistant's summary of its own work needs the same rule that applies to a Deployment status: verify the resource, not the report. "I added the type to the Subscription" isn't evidence. The Subscription query in the acceptance checks is.
Key takeaways
- Give an AI assistant a narrow requirement and fixed acceptance checks, and judge the result by the checks.
- A new Message type must reach both the Subscription filter and the router. A shared list makes that one change.
- A change to what
postDeploycreates needs a redeploy with scripts enabled, and a query of the resource to prove it. - Record the assistant, model, and skill version that produced a change.
- You remain accountable for AI-generated code. Review it against the documentation, not only against the assistant's explanation.