Build an application theme
An application theme is a Vue 3 project that gives your advisor its own look and behaviour. This guide takes you from a Zoovu account to your theme running in Experience Designer.
Building your first theme? The workshop takes you through it step by step.
Before you start
You need:
- A Zoovu account that can open your advisor in Experience Designer.
- Node.js 22.13 or newer.
- Yarn 1 (Classic). To install it, run
npm install --global yarn.
Get your preview link
yarn start shows your theme on one of your advisors. It finds the advisor through its preview link:
- In Conversation Studio, open Assistants and click your advisor.
- In the left menu, click Design, then Open Experience Designer. It opens in a new tab. If the page says "This advisor uses an Application Theme", click Switch to the Application Design page.
- Click Preview in the top bar. A new tab opens.
- Copy that tab's address. It looks like
https://orca-preview.zoovu.com/?c=<code>&locale=<locale>.
The link goes in the previewLink field of your theme's zoovu.manifest.js, which you create in the next step. It is for development only: yarn build doesn't need it and never puts it in the zip.
Create the theme
npx @zoovu/create-remote-component@latest <folder-name>
Without a folder name, it asks for one. Use lowercase letters and digits, with single dashes between words, such as my-theme. It creates the folder and installs the dependencies.
Then open zoovu.manifest.js in the new folder and paste your preview link:
previewLink: '<your preview link>',
In the same file, give the theme its own name and label. The name is a PascalCase identifier such as AcmeTheme: letters and digits only, starting with a letter. Experience Designer lists the theme by its label.
Preview with yarn start
cd <folder-name>
yarn start
yarn dev does the same. Open http://localhost:3000, or the address it prints if that port is taken. You see your advisor's latest draft in your theme, and changes to components and styles show right away.
If previewLink is empty, yarn start stops with:
Error: Set "previewLink" in zoovu.manifest.js.
If the link isn't a Zoovu preview link, it stops with:
Error: "previewLink" in zoovu.manifest.js is not a Zoovu preview link.
Before you publish
The template leaves two parts for you to finish:
- Add to cart. The button on result cards doesn't call a shop yet. Write your cart call in a helper, such as
src/helpers/add-to-shop-cart.ts, and call it fromhandleAddToCartinsrc/components/product-card/components/product-card-footer/product-card-footer.component.vue. RunrecordAddToCart()and the confirmation message only after it succeeds. - Assistant launcher. The template shows the Zoe assistant launcher on every advisor. If your advisor has no Zoe assistant, remove
<ZoeDock />and itsimport ZoeDock …line fromsrc/advisor-view.component.vue.
Check your work
Before you build, run the four gates:
yarn lint:css && yarn lint && yarn typecheck && yarn test
Fix what they report, then build.
Build the zip
yarn build
The zip lands in the build folder, named after name in zoovu.manifest.js and version in package.json: for example build/acme-theme.remote-component.v0.0.1.zip for AcmeTheme 0.0.1. The folder holds other files too; the .zip is the one you upload.
Experience Designer accepts each version of a theme only once. Before you upload a change, raise the version and build again:
yarn bump-version
yarn build
Upload to Experience Designer
Open Experience Designer as in Get your preview link. Then:
- In the right panel, open the Config tab and expand ADVANCED OPTIONS.
- Click Upload component. In the dialog, click browse or Upload file and pick the zip. The upload starts at once and the page reloads.
- First time only: in "Choose a theme", pick Base Application Theme under APPLICATION THEMES and click Open theme. In "Save your theme", name the theme and click Save theme.
- In the bar under the preview, under Local, click your theme. It shows your
label. If "Change component?" appears, click Confirm. - Check Config > Component. It shows your theme's name and the version you uploaded.
- Click Save and Apply. In "Add notes", click Save and apply. You should see "Theme applied. The theme has been applied to the assistant's draft." See Save and apply.
- Reload the preview tab.
Once the advisor uses an application theme, the Design page says "This advisor uses an Application Theme". Click Switch to the Application Design page to get back to your theme.
Add the texts
If the buttons in the preview tab are blank, the theme has no texts in your advisor's language yet. Add the language once:
- In the left menu, click Translation, then Add language.
- Select the country and the language of your advisor and click Save. They are the
localeat the end of your preview link. - Click the translate icon next to the new language. You should see "Auto translation completed".
- In the left menu, click Design, switch to the Application Design page, and repeat steps 6 and 7 above.
Click the translate icon again after you upload a version that adds texts. See Translate your theme.
Upload a later version
Run yarn bump-version and yarn build, then repeat steps 1, 2, 4, 5, 6 and 7. After the upload the preview is empty until you click your theme again. Each theme has one tile, and it holds the newest version.
Limits
- There is one template: a Vue 3 application theme.
yarn startserves your theme only on your own machine.yarn startalways shows the advisor's latest draft, never the published version.- The results page shows products only on an advisor whose flow ends in a Results Page step.