5. Publishing a decision tree

This advice applies to England. See advice for See advice for Northern Ireland, See advice for Scotland, See advice for Wales

Before you publish the decision tree, you should proofread it for errors and test it works as expected.

You can preview the decision tree by using the following link in a new tab and adding the ID from the decision tree entry at the end:

https://www.citizensadvice.org.uk/p/decision-trees/paste-ID-here 

For example, https://www.citizensadvice.org.uk/p/decision-trees/debt-remedy-tool/

Proofreading and testing checklist

These checks will help make sure your decision tree is ready to publish.

Preview the decision tree

Open the decision tree with the preview link.

To check error text, don’t select any of the radio buttons and scroll straight to the bottom. Select ‘Next’ and it will flag the question with error text.

Now refresh the page and continue testing each branch of the decision tree.

You should check:

  1. All questions have error text 

  2. Error text starts with ‘Select’

  3. Error text doesn’t end with a full stop

  4. Questions are in the correct order

  5. Hint text ends with a full stop

  6. There are no spelling or grammar mistakes

If entries are missing

Make sure you’ve tagged all your entries with the appropriate decision tree tag. This includes any embedded entries in the results like targeted content, contact details and callouts.

Preview the expandable tree view

You can use the expandable tree view to get an overview of all of the questions and results. You need to be signed in to view it.

Use the following link in a new tab and add the ID from the Decision tree entry:

https://www.citizensadvice.org.uk/p/decision-trees/paste-ID-here/expandable_tree

For example, https://www.citizensadvice.org.uk/p/decision-trees/scams/expandable_tree

It will take a long time to load as it's getting the entire tree and all of the embedded entries.

Expandable tree view for a decision tree. The user has clicked 'expand all' to view every entry in the decision tree. They can click the entry links to go directly to the entry in Contentful.

Check the validation report

You can use the validation report to get an overview of any errors. You need to be signed in to view it.

Use the following link in a new tab and add the ID from the Decision tree entry:

https://www.citizensadvice.org.uk/p/decision-trees/paste-ID-here/validation_report

For example, https://www.citizensadvice.org.uk/p/decision-trees/scams/validation_report

It will take a long time to load as it's getting the entire tree and all of the embedded entries.

Decision tree validation report. The report says there are incomplete entries in the tree. It lists them with links to the entry in Contentful.

Publish all entries

Once you have checked everything, you can publish the decision tree.

Make sure you publish all of the entries. You can publish everything at once by using the ‘References’ tab.

Select all entries by ticking ‘All’ at the top.

Selecting all references in a decision tree. The user has ticked 'all' to select every entry.

You can then click the green ‘Publish all’ button.

Publish all button for publishing all references.

If you get a validation error

You might get an error if any of the entries aren’t published. You'll see the warning below if there are unpublished entries.

Some references did not pass validation error message.

Make sure they are all published.

If you publish a decision tree with archived entries

If you have an archived entry within your decision tree, the decision tree won’t work.

Make sure you remove or restore any archived entries before publishing.

Remove an archived entry

You can remove an archived entry by clicking the 3 dots at the right and selecting 'Remove'.

Removing an archived entry from a decision tree. The user has clicked the 3 dot menu on the entry then clicked remove.

Restore an archived entry

Go into the entry you want to restore. Click on the green 'Unarchive' button on the right hand side of the page.

Image of the 'Unarchive' button on the right hand side of the page.

Unarchiving an entry will put it back into 'Draft' status. You'll need to publish it to make it appear on the site.

View the published decision tree

You can view the decision tree by using the following link in a new tab and adding the decision tree ID at the end:

https://www.citizensadvice.org.uk/decision-trees/paste-ID-here 

For example, https://www.citizensadvice.org.uk/decision-trees/debt-remedy-tool/

A published decision tree on the Citizens Advice website. The first question asks 'did you sign the agreement?'.

Add the decision tree to a page

To add the decision tree to a page, embed it into the advice collection.

In the advice collection body, place your cursor where you want the start button to appear. Use the 'Embed' button to add an entry.

Screenshot of the embed button in the body of an advice collection.

Find the decision tree you want to add. You can set the filter to 'Decision tree' to make it easier to find.

Screenshot of entry search box with Decision tree filter applied

Once your advice collection is published the button will appear on the advice page.

Screenshot of the debt remedy tool page showing the start button for a decision tree.

Help us improve our website

Take 3 minutes to tell us if you found what you needed on our website. Your feedback will help us give millions of people the information they need.