Skip to main content
Search Again

We think these articles could help you:

    See More
    Nintex Knowledge Base

    Step 4: Building a contract approval workflow

    Preparing for success

    • You must have at least the following permissions within Nintex Workflow Cloud to complete this step:
    • This step utilizes a connection to Box:
      • You must have a Box account to add a Box connection to Nintex Workflow Cloud.
      • (Optional) Create a Box Developer account to complete the steps below.

    Contract approval workflow creation

    In this scenario, the organization requires each contract:

    • Approved by two reviewers
    • Tracked as draft, approved, or rejected

    The contract approval workflow can meet organizational requirements by completing the following steps whenever draft contracts are submitted (by uploading to the “Draft” folder on a file share).

    1. The workflow sends an email notification to Reviewer A indicating that a contract is ready for review.
    2. Depending on Reviewer A’s decision, the workflow either sends an email notification to Reviewer B indicating that the contract is ready for review or stops the workflow after moving the contract into the “Rejected” folder.
    3. Depending on Reviewer B’s decision, the workflow either sends the contract back to Reviewer A for re-review or stops the workflow after moving the contract into the “Approved” folder.

    Descriptions of the workflow stages

    1. Start event configuration (trigger): The workflow starts when it finds a contract copied into the “Draft” folder on the file share.
    2. Stage 1: Initialization: The workflow gets opportunity details for the contract and then moves to Reviewer A Reviews.

      Note: For purposes of this scenario, the opportunity details are hard-coded. To create this workflow for your enterprise, connect to your third-party provider, such as Salesforce or Microsoft Dynamics CRM. Use the related Retrieve a record action to get the opportunity details and then store the value in a variable for use in the workflow.

    3. Stage 2: Reviewer A Reviews:
      1. The workflow sends an email notification to Reviewer A asking for review of the linked contract. The notification includes the contents of the variable ReviewMyRework.
      2. If Reviewer A replies Yes, the workflow moves to Reviewer B Reviews.
      3. If Reviewer A replies No, the document is moved to the Rejected folder and the workflow ends (moves to Exit stage).
    4. Stage 3: Reviewer B Reviews:
      1. The workflow sends an email notification to Reviewer B asking for review of the linked contract.
      2. If Reviewer B replies Yes, the workflow moves to Completion (Approval).
      3. If Reviewer B replies No, the workflow moves back to Reviewer A Reviews.
    5. Stage 4: Completion (Approval)
      • The workflow moves the contract to the Approved folder and the set of stages ends.
    6. Stage 5: Exit stage (If stage 4 is not used):
      • The workflow ends.

    Step 1

    This step describes how to set up routing folders for scenarios using Box, such as document routing and approval or contract approval.

    1. If you don’t already have one, create a Box account at www.box.com.
    2. Create a folder structure for document routing: 
      • Draft to start the workflow
      • Approved for routing of approved documents
      • Either Rework or Rejected for routing of unapproved documents (the document routing scenario uses Rework; the contract approval scenario uses Rejected.)

      With the routing folders created in Box, you're now ready to create a Box connection.

    Step 2

    This step describes how to create a connection that grants Nintex Workflow Cloud access to your Box account for related scenarios, such as document routing and approval or contract approval with stages.

    To create a Box connection:

    1. On the left of the Nintex Workflow Cloud dashboard, click Connections.
    2. Click Add new and fill in the fields as follows.

      Field Value
      Connector Box
      Connection My Box Account 
      (or your custom name)
    3. Click Connect.

      Box prompts you to log in (if not yet logged in) and to grant access to Nintex Workflow Cloud.

    4. If needed, log in to your Box account.
    5. Click Grant access to Box.

      Nintex Workflow Cloud creates your Box connection. The next step is to create a workflow to start when new drafts are uploaded.

    Step 3

    This step describes how to create a new workflow with start configuration optimized for scenarios such as document routing and approval and contract approval with stages.

    This configuration causes the workflow to start when it finds new files uploaded to the Draft folder in your Box environment.

    To create a workflow configured to start with new drafts:

    1. Click Create workflow on the upper left to display the workflow designer in Nintex Workflow Cloud.
    2. At the top of the designer canvas, click Start event to display the Start event configuration dialog box.
    3. Fill in the fields as follows.

      Field Value
      Connector Box
      Event Box - New file
      Connection My Box Account (or your custom name)
      Path /Draft/
    4. Under Start event variables, select Path and Name to add these variables to the workflow.

      You'll be using these start event variables later in the workflow configuration.

      For document routing and approval, you're now ready to set up the workflow-started notification in the workflow.

      For contract approval with branching stages, you're now ready to set up the stage branches.

    Step 4

     

    This step describes how to configure the Initialization stage, which includes defining variables that are referenced throughout the workflow and moving to the next stage.

    Note: An enterprise-connected version of this workflow might also collect data on the contract (such as originator and opportunity ID), send email notification to the contract originator indicating that the contract is under review, lock the contract document to avoid unexpected edits, and update the opportunity in Salesforce or Microsoft Dynamics CRM.

    To define the opportunity ID variable:

    1. Add the action Set a variable value to the Initialization stage branch.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Set a variable value is in the OperationsGroup. For more information, see Set a variable value.

    2. Rename the action Opportunity ID.

      To rename an action, click the action label and type the new name.

    3. Configure the action as follows.

      To display the configuration panel on the right, click the added action.

      Field Value
      Variable

      {OpptyID}

      Click + Variable on the upper right to create a variable named "OpptyID" of the type text.

      Value ABC123

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    To move to the next stage (Reviewer A Reviews):

    1. Add the action Change stage as the last item in the Initialization stage branch, under Set a variable value (renamed Opportunity ID).

      To find an action, you can either search for it by name or select it from its group in the toolbox. See . The action Change stage is in the Logic and flowgroup. For more information, see Change stage,  Set a variable value, and Find actions.

    2. Rename the action Change to Reviewer A.

      To rename an action, click the action label and type the new name. 

    3. Configure the action as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Set next stage Reviewer A

      You're now ready to configure the Reviewer A Reviews stage.

    Step 5

    This step describes how to configure the Reviewer A Reviews stage, which involves setting up the email notification and configuring logic for approval and rejection responses.

    Reviewer A receives a review request by email. Depending on Reviewer A’s response, the workflow either sends a review request to Reviewer B or stops after moving the contract into a folder named Rejected.

    To set up the email notification for Reviewer A:

    1. Add the action Express Approval to the Reviewer A Reviews stage branch.

      To find an action, you can either search for it by name or select it from its group in the toolbox.The action Express Approval is in the Communications group. For more information, see Express Approval.

    2. Rename the action Reviewer A Contract Approval.

      To rename an action, click the action label and type the new name.

    3. Configure the action to define the task, assignee, and email notification as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Task name Reviewer A Contract Approval Request
      Task description Contract approval needed from the Account Executive
      Assignee email address

      (your reviewer A email address)

      From email address

      (your contact email address)

      Subject

      Contract needs Account Executive approval

      Message body

      A contract in Box folder "Draft" requires your review.

      {Path}

      Opportunity ID: {OpptyID}

      Default outcome

      Reject

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    4. In the Message body field, add a new line after the opportunity ID and insert a redlines variable.

      1. Click + Variable on the upper right of the field.

        Nintex Workflow Cloud displays the Insert variables dialog box, listing existing variables.

      2. If needed, click  (Toggle add variable) to display the Add variable section.
      3. Create the redlines variable as follows.

        Field Value
        Name ReviewMyRedlines
        Type Text
      4. Select the variable and then click Insert.

        The Insert variables dialog box is closed and the selected variable is inserted into the field. You'll define the text for this variable during configuration of the Reviewer B Reviews stage.

    To configure logic for document rejection (move file to Rejected folder and exit stages):

    1. In the Reject branch of the action Reviewer A Contract Approval in the Reviewer A Reviews stage branch, add the action Box - Move a file.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Box - Move a file is in the Box group.

    2. Rename the action Move contract to Rejected folder.

      To rename an action, click the action label and type the new name. 

    3. Configure the action to reference the initial file and specify the new folder as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Connection

      My Box Account (or your custom name)

      File path {Path}

      New path

      /Rejected/{Name}

      Overwrite file

      Yes

      Store new path

      {NewPath}

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    4. Add the action Change stage as the last item in the Reject branch, under the action Box - Move a file (renamed Move contract to Rejected folder).

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Change stage is in the Logic and flowgroup. For more information, see Change stage.

    5. Rename the action Exit stages.

      To rename an action, click the action label and type the new name. 

    6. Configure the action as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Set next stage Exit

    To configure logic for document approval (move to the next stage):

    1. In the Approve branch of the action Reviewer A Contract Approval in the Reviewer A Reviews stage branch, add the action Change stage as the only item.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Change stage is in the Logic and flowgroup. For more information, see Change stage.

    2. Rename the action Change to Reviewer B.

      To rename an action, click the action label and type the new name. 

    3. Configure the action as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Set next stage Reviewer B

      You're now ready to configure the Reviewer B Revews stage.

    Step 6

    This step describes how to configure the Reviewer B Reviews stage, which involves setting up the email notification and configuring logic for approval and rejection responses.

    Reviewer B receives a review request by email after Reviewer A approves the document. Depending on Reviewer B’s response, the workflow either sends another review request to Reviewer A or moves to the Completion (approval) stage.

    To set up the email notification for Reviewer B:

    1. Add the action Express Approval to the Reviewer B Reviews stage branch.

      To find an action, you can either search for it by name or select it from its group in the toolbox.The action Express Approval is in the Communications group. For more information, see Express Approval.

    2. Rename the action Reviewer B Contract Approval.

      To rename an action, click the action label and type the new name. 

    3. Configure the action to define the task, assignee, and email notification as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Task name Reviewer B Contract Approval Request
      Task description Contract approval needed from the Territory Manager
      Assignee email address

      (your reviewer B email address)

      From email address

      (your contact email address)

      Subject

      Contract needs Territory Manager approval

      Message body

      A contract in Box folder "Draft" requires your review.

      /{Path}/{Name}

      Opportunity ID: {OpptyID}

      Default outcome

      Reject

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    To configure logic for document rejection (set redlines variable and notify Reviewer A):

    1. In the Reject branch of the action Reviewer B Contract Approval in the Reviewer B Reviews stage branch, add the action Set a variable value.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Set a variable value is in the OperationsGroup. For more information, see Set a variable value.

    2. Rename the action Please Review Redlines.

      To rename an action, click the action label and type the new name. 

    3. Configure the action as follows.

      To display the configuration panel on the right, click the added action.

      Field Value
      Variable {ReviewMyRedlines}
      Value

      Please review my redlines.

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    4. Add the action Change stage as the last item in the Reject branch, under the action Set a variable value (renamed "Please Review Redlines").

      To find an action, you can either search for it by name or select it from its group in the toolbox. See . The action Change stage is in the Logic and flowgroup. For more information, see Change stage,  Set a variable value, and Find actions.

    5. Rename the action Change to Reviewer A.

      To rename an action, click the action label and type the new name. 

    6. Configure the action as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Set next stage Reviewer A

    To configure logic for document approval (move to the next stage):

    1. In the Approve branch of the action Reviewer B Contract Approval in the Reviewer B Reviews stage branch, add the action Change stage as the only item.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Change stage is in the Logic and flowgroup. For more information, see Change stage.

    2. Rename the action Change to Completion (approved).

      To rename an action, click the action label and type the new name.

    3. Configure the action as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Set next stage Completion (approved)

      You're now ready to configure the Completion (approved) stage.

    Step 7

    This step describes how to configure the Completion (approved) stage, which involves moving the contract to the Approved folder and exiting the stages.

    To move the contract to the Approved folder:

    1. In the Completion (approved) stage branch, add the action Box - Move a file.

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Box - Move a file is in the Box group.

    2. Rename the action Move contract to Approved folder.

      To rename an action, click the action label and type the new name. 

    3. Configure the action to reference the initial file and specify the new folder as follows.

      To display the configuration panel on the right, click the added action. 

      Field Value
      Connection

      My Box Account (or your custom name)

      File path {Path}

      New path

      /Approved/{Name}

      Overwrite file

      Yes

      Store new path

      {NewPath}

      Note: In field values above, a set of curly brackets around red text indicates a variable name. For instructions on inserting new and existing variables into action configuration fields.

    To exit the stages (effectively ending the workflow)

    1. In the Completion (approved) stage branch, under the action Box - Move a file (renamed Move contract to Approved folder), add the action Change stage as the last item,

      To find an action, you can either search for it by name or select it from its group in the toolbox. The action Change stage is in the Logic and flowgroup. For more information, see Change stage.

    2. Rename the action Exit stages.

      To rename an action, click the action label and type the new name.

    3. Configure the action as follows. 

      To display the configuration panel on the right, click the added action. ​​​​​​​

      Field Value
      Set next stage Exit

      The workflow is now ready to publish.

    Check for success

    • Were you able to connect the workflow to Box?
    • Were you able to publish the workflow?
    • Were you able to successfully approve the document?
    • Did the workflow successfully change stages based on the document approval?
    • Was this article helpful?