This example shows a complete solution, written the way the AI builders guide describes. Use it as a pattern.
"When we hire someone, HR enters the candidate's details. Salaries over £60,000 need director approval. Then send an offer letter for the candidate to sign, tell IT to set up a laptop, and email the candidate a welcome message. I want a dashboard of hires by status."
[salary_check] hidden: over £60,000?
| no | yes
v v
[make_offer] [director_approval] question
| | Approve | Reject
| v v
| [make_offer_approved] [rejected] kill
| |
+--------+------------+
v
[offer_gate] Blocker
v
[it_laptop] [welcome_email] [check_signed]
Both offer items share the alias offer, so later steps can use {{offer}} whichever branch ran.
Template text
<p>{{a_date}}</p>
<p>Dear {{a_counterparty_name}},</p>
<p>We are delighted to offer you the position of {{job_title}} at {{c_entity}}.</p>
<p>Your annual salary will be [[MATH=currency:£,decimals:0]]{{salary}}[[ENDMATH]]. Your employment will begin on {{a_date_start}}.</p>
[[IF=salary(GREATER_THAN £60000)]]
<p>This offer has been approved by a director.</p>
[[ENDIF]]
<p>Please sign below to accept this offer.</p>
[[SIGNATURE_BLOCK]]
Template fields (Variables panel)
--#: ---name:job_title ---type:text ---appears_on:extras ---mini_label:Job title ---required:true --#: ---name:salary ---type:amount ---appears_on:extras ---mini_label:Annual salary ---string_format:currency ---required:true
Signature blocks
--#:
---id:company_sig
---type:auto
---party:{{c_entity}}
--#:
---id:candidate_sig
---type:manual
---party:{{a_counterparty_name}}
---name:
---email:
--#: ---name:candidate_name ---type:text ---appears_on:settings ---mini_label:Candidate's full name ---required:true --#: ---name:candidate_email ---type:text ---appears_on:settings ---mini_label:Candidate's email ---string_format:email ---required:true --#: ---name:job_title ---type:text ---appears_on:settings ---mini_label:Job title ---required:true --#: ---name:salary ---type:amount ---appears_on:settings ---mini_label:Annual salary ---string_format:currency ---required:true --#: ---name:start_date ---type:date ---appears_on:settings ---mini_label:Start date ---required:true
Use this workflow for every new hire.
[[CHECKLIST]]
--#item:
---id:salary_check
---action:hidden
---answer:[[IF=salary(GREATER_THAN £60000)]]director[[ELSE]]standard[[ENDIF]]
---done_at:1
---filter1|filter:answer EQUALS standard
---filter1|outcome:make_offer
---filter2|filter:answer EQUALS director
---filter2|outcome:director_approval
--#item:
---depends_on:salary_check
---id:director_approval
---task_stage:Approval
---title:Approve a salary of {{salary}} for {{candidate_name}}
---description:This salary is over £60,000, so a director must approve it.
---action:question
---options:Do you approve this salary?
---answer1|text:Approve
---answer2|text:Reject
---clearance_level:senior
---filter1|filter:answer EQUALS Approve
---filter1|outcome:make_offer_approved
---filter2|filter:answer EQUALS Reject
---filter2|outcome:rejected
--#item:
---depends_on:director_approval
---id:rejected
---title:Offer not approved
---description:The director didn't approve this salary. Start a new task with a revised salary if needed.
---action:kill
---options:Salary not approved
---block:true
--#item:
---depends_on:salary_check
---id:make_offer
---alias:offer
---task_stage:Offer
---title:Offer letter sent to {{candidate_name}}
---action:auto_document
---options:{offer_letter_template_key}
---stage:send
---pass_variables:counterparty_IS_{{candidate_name}}_AND_date_start_IS_{{start_date}}_AND_job_title_IS_{{job_title}}_AND_salary_IS_{{salary}}_AND_candidate_sig:name_IS_{{candidate_name}}_AND_candidate_sig:email_IS_{{candidate_email}}
--#item:
---depends_on:director_approval
---id:make_offer_approved
---alias:offer
---task_stage:Offer
---title:Offer letter sent to {{candidate_name}}
---action:auto_document
---options:{offer_letter_template_key}
---stage:send
---pass_variables:counterparty_IS_{{candidate_name}}_AND_date_start_IS_{{start_date}}_AND_job_title_IS_{{job_title}}_AND_salary_IS_{{salary}}_AND_candidate_sig:name_IS_{{candidate_name}}_AND_candidate_sig:email_IS_{{candidate_email}}
--#item:
---id:offer_gate
---title:Waiting for the offer to be sent
---action:stop
---options:done_at
---block:true
--#item:
---id:it_laptop
---task_stage:Onboarding
---title:Set up a laptop for {{candidate_name}}
---description:Starts on [[DATE=D MMMM YYYY]]{{start_date}}[[ENDDATE]] as {{job_title}}.
---action:done
---clearance_level:{it_email}
--#item:
---id:welcome_email
---action:auto_email
---to:{{candidate_email}}
---subject:Welcome to {{c_name}}
---body:Dear {{candidate_name}},~~~~~~We've sent your offer letter for the role of {{job_title}}. Please sign it using the link in the separate email.~~~~~~We look forward to welcoming you on [[DATE=D MMMM YYYY]]{{start_date}}[[ENDDATE]].
--#item:
---id:check_signed
---task_stage:Onboarding
---title:Check the offer has been signed
---description:[[LINK={{document_url_base}}{{offer}}]]Open the offer letter[[ENDLINK]]
---action:done
[[INCLUDE=data(prefix:hires_):https://plainly.com/report-json?h={hires_dataset_id}&key={hires_dataset_key}]]
<h2>Hires by status</h2>
[[INCLUDE=widget(type:summary_table,columns:hires_{status_column}|hires_{status_column},column_headings:Status|Hires,show:count)]]
<h2>All hires</h2>
[[INCLUDE=widget(type:table,columns:hires_{task_column}|hires_{status_column}|hires_{stage_column},column_headings:Candidate|Status|Stage)]]
| Placeholder | Replace with |
|---|---|
| {offer_letter_template_key} | The offer letter template's key |
| {it_email} | The IT team's email address |
| {hires_dataset_id}, {hires_dataset_key} | From the dataset's shareable link |
| {status_column}, {task_column}, {stage_column} | The column names shown in the feed |