In this tutorial you will learn how to configure ConfiForms to provide sequential approvals workflow.

This tutorial is not very simple, and you have to pay attention to details. To learn the basics about ConfiForms see Creating a simple form in Confluence with ConfiForms

We believe that approach shown in Form with sequential approvals workflow which uses IFTTT macro instead of Formula field is a lot easier to maintain and develop.

This solution has been prepared before the ConfiForms had the feature to update own records based on the conditions.

However, this tutorial is still good way to demonstrate how formula fields could work together and what you can achieve


We will have 3 user groups who should be able to approve a proposal in a sequential way, one by one and only when a proposal is in a certain state.

3 user groups (security groups in Confluence) are as follows:

The form is very simple and has 2 common fields to capture the proposal text in a plaintext format and to set a readonly field to show the proposal approval state as a text.

For each user group we will setup own field control of type "checkbox" to change current approval state to next state. Fields are restricted to be editable by certain user group only

So in total we will have 5 fields here:



IF("[entry.approvedByFin]", "Approved By Finance", IF("[entry.approvedByPM]", "Approved By PMs", IF(NOT("[entry.approvedByDevs]"), "Created", "Approved By Devs")))

The whole storage format for the form is listed below:

<ac:structured-macro ac:macro-id="81b6f18d-2cd2-4604-b9f3-7a3ea40d77fd" ac:name="confiform"
                                  ac:schema-version="1">
<ac:parameter ac:name="additionalFormAdmins">devs,pm,fin</ac:parameter>
<ac:parameter ac:name="formName">proposals</ac:parameter>
<ac:parameter ac:name="saveButtonLabel">Register proposal</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">Register</ac:parameter>
<ac:rich-text-body>
  <p>
    <ac:structured-macro ac:macro-id="2b3a3bb8-fe7b-4e81-825f-ccda6816e9f5" ac:name="confiform-field-definition"
                         ac:schema-version="1">
      <ac:parameter ac:name="fieldName">proposaltext</ac:parameter>
      <ac:parameter ac:name="fieldLabel">Proposal text</ac:parameter>
      <ac:parameter ac:name="type">textarea</ac:parameter>
    </ac:structured-macro>
  </p>
  <p>
    <ac:structured-macro ac:macro-id="a6894605-f8a2-4954-8eab-f5779e267abe" ac:name="confiform-field-definition"
                         ac:schema-version="1">
      <ac:parameter ac:name="fieldName">statelabel</ac:parameter>
      <ac:parameter ac:name="fieldLabel">State</ac:parameter>
      <ac:parameter ac:name="extras">IF(&quot;[entry.approvedByFin]&quot;, &quot;Approved By Finance&quot;, IF(&quot;[entry.approvedByPM]&quot;,
        &quot;Approved By PMs&quot;, IF(NOT(&quot;[entry.approvedByDevs]&quot;), &quot;Created&quot;, &quot;Approved By
        Devs&quot;)))
      </ac:parameter>
      <ac:parameter ac:name="type">formula</ac:parameter>
    </ac:structured-macro>
  </p>
  <p>
    <ac:structured-macro ac:macro-id="b557fad8-d633-4e1d-8fa9-993eea0c3f53" ac:name="confiform-field-definition"
                         ac:schema-version="1">
      <ac:parameter ac:name="editRestrictions">devs</ac:parameter>
      <ac:parameter ac:name="fieldName">approvedByDevs</ac:parameter>
      <ac:parameter ac:name="fieldLabel">Approved (Devs)</ac:parameter>
      <ac:parameter ac:name="editRestrictions">devs</ac:parameter>
      <ac:parameter ac:name="type">checkbox</ac:parameter>
    </ac:structured-macro>
  </p>
  <ac:structured-macro ac:macro-id="16541513-8b13-47b1-9bf1-53e85f6a8f00" ac:name="confiform-field-definition"
                       ac:schema-version="1">
    <ac:parameter ac:name="editRestrictions">pm</ac:parameter>
    <ac:parameter ac:name="fieldName">approvedByPM</ac:parameter>
    <ac:parameter ac:name="fieldLabel">Approved By (PMs)</ac:parameter>
    <ac:parameter ac:name="editRestrictions">pm</ac:parameter>
    <ac:parameter ac:name="type">checkbox</ac:parameter>
  </ac:structured-macro>
  <p>
    <ac:structured-macro ac:macro-id="fb050936-7372-47b2-b6ca-a78a88e36600" ac:name="confiform-field-definition"
                         ac:schema-version="1">
      <ac:parameter ac:name="editRestrictions">fin</ac:parameter>
      <ac:parameter ac:name="fieldName">approvedByFin</ac:parameter>
      <ac:parameter ac:name="fieldLabel">Approved By (Finance)</ac:parameter>
      <ac:parameter ac:name="editRestrictions">fin</ac:parameter>
      <ac:parameter ac:name="type">checkbox</ac:parameter>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="e30b9daf-18a1-4d15-936a-cdeafb2c4715" ac:name="confiform-entry-register"
                         ac:schema-version="1">
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>&nbsp;</p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="58421c25-de39-45da-b5f2-4d3b349470c8" ac:name="confiform-field-definition-rules"
                         ac:schema-version="1">
      <ac:parameter ac:name="condition">id:</ac:parameter>
      <ac:parameter ac:name="fieldName">approvedByDevs,approvedByPM,approvedByFin</ac:parameter>
      <ac:parameter ac:name="action">Hide field</ac:parameter>
      <ac:parameter ac:name="actionFieldName">statelabel</ac:parameter>
    </ac:structured-macro>
  </p>
</ac:rich-text-body>
</ac:structured-macro>

This is about everything about form configuration, let's proceed with an actual approvals workflow.

We use ListView macro to show the data and have setup multiple edit buttons what are visible to certain user groups. Here is how it looks in the editor

So, we reference the form by name ("proposals") and put references to field definitions using ConfiForms Field macros. So far, so good. Simple and straightforward. The trick though is with configuration of ConfiForms Edit Controls. We want it to appear only for certain user groups and only when a record is in certain condition. Let's see it in details: