All questions

Duplicate a proven experience setup into another workspace?

Asked by Freya Dahlberg on

FDFreya Dahlberg

We run several brands, each in its own workspace. For brand A we have a returning-visitor experience that took real iteration to get right: the component, the slot, the audience condition, all of it. Now I want to replicate that exact setup in brand B's workspace without rebuilding every piece by hand and hoping I remember all the details.

Is there a supported way to package and reapply an experience setup across workspaces? Copy-paste between workspaces does not seem to exist, which I assume is deliberate given they hold separate data

Was this helpful?

1 answer

Jjulius_hAccepted answer

Templates are the supported path, and they live in the CLI:

npx croct@latest create template

packages a setup, and

npx croct@latest use <template>

applies a template to whatever workspace you are working against. So the workflow for your case is: create a template from the brand A setup, then run croct use in the brand B project. That gives you a reproducible artifact instead of a manual rebuild, which is exactly what you want when standardizing playbooks across brands.

This is the same mechanism behind Croct's own template gallery, for example the Sanity personalization template, so it is a first-class workflow, not a workaround.

And your assumption is right: workspaces are isolated by design, each with its own applications, environments, and audiences. Cross-workspace reuse goes through templates or re-creation, never live sharing, so brand data stays cleanly separated.

Was this helpful?
FDFreya Dahlberg

Tested it this morning: templated the brand A setup and applied it to brand B in a few minutes. Adding "create template" to our playbook checklist so every proven setup gets packaged going forward. Thank you.

HBHana Brenner

Adding a workflow note for anyone standardizing across a lot of workspaces. npx croct create template then npx croct use <template> is the path, as julius says. One thing that saved us headaches: we committed the template to the repo and made applying it a step in each new brand's onboarding, so the returning-visitor setup is versioned alongside the code rather than living only in one workspace. The CLI reads croct.json5 for which application/environment you are targeting, so double-check you are pointed at the right workspace before running use, otherwise you apply it to the wrong brand.

Still have questions?