Collections & complex rules

We can combine the rules we have shown above and the following is an example actually used in a council.

{{#each V2Account.CtaxDetails.YearsWithPositiveBalanceOutstanding}}

For {{Year}}

Your Balance is: {{formatToString BalanceOutstanding 'C' }}

{{#each RecYrSummary}}

{{#if @last}}

{{#if_eq Stage.StageCode 'FINAL'}}

The recovery stage for this year is: {{Stage.Value}}

The date this came into effect was: {{Stage.StageDate}}

Being at final notice is bad :(

{{/if_eq}}

{{#if_eq Stage.StageCode ‘BAIL'}}

The recovery stage for this year is: {{Stage.Value}}

The date this came into effect was: {{Stage.StageDate}}

Your account is with the Bailiffs. Contact them.

{{/if_eq}}

{{/if}}

{{/each}}

{{/each}}

Note only the content in bold is actually going to be shown to the customer.

What this does is:

  1. Checks for all years where there is a balance outstanding

  2. Shows the year and balance for these

  3. Checks the collection of recovery periods inside each year

  4. Retrieves the most recent status using the @last rule

  5. Uses if statements to show different content to the customer based upon the current stage of their account

An example response where the account was at a Bailiff for 2019/20 would be:

For 2019/20

Your Balance is: ÂŖ1203.00

The recovery stage for this year is Bailiff

The date this came into effect was 20/03/2020

Your account is with the Bailiffs. Contact them.

Last updated

Was this helpful?