Approvals
The Klevr Approvals Framework allows organisations to enforce structured review and sign‑off processes on any Klevr entity (e.g., Contracts, Milestones...
Klevr Approvals
The Klevr Approvals Framework allows organisations to enforce structured review and sign‑off processes on any Klevr entity (e.g., Contracts, Milestones, Projects, custom tables).
A Klevr approval process:
- Determines whether a record requires approval.
- Identifies who the approvers are, based on configuration.
- Applies multi‑stage or hierarchical approvals where needed.
- Automatically updates status, status reason, and approval fields.
- Generates Approval User records for each required approver.
This framework is highly configurable and supports both simple and complex approval logic, including conditional paths based on record data (e.g., contract value thresholds).
Klevr Approvals – Administrator Guide
What this guide covers
For environment administrators and implementation leads responsible for enabling, configuring, and running Klevr Approvals on any table.
Roles & prerequisites
- Security Klevr Approval Administrator: Can delegate approvals for themselves and others.
- ToolsRibbon Workbench (required: button enable/visibility rules rely on JavaScript; this cannot be done from Maker).
Enabling Approvals on a new table
Create these fields (recommended schema/display names shown):
| Schema | Display | Type | Default / Notes |
|---|---|---|---|
requiresapproval | Requires Approval | Two options (Boolean) | Default value: Yes Purpose: Controls visibility of the Request Approval action. Behaviour: 1) The field is always set to Yes when a record is created if approvals are enabled. 2)This ensures the Request Approval button is visible to the user. 3) The system does not determine whether approval is required until the user clicks the button. |
isapproved | Record Approved | Two options (Boolean) | Default No; set to Yes after the final stage completes |
approvaltypecode | Approval Type | Global optionset | Values: One must approve, All must approve (informational; copied from the applied Approval Config) |
- Map the Entity Schema Name (e.g.,
klevr_contract). - Map table fields used by the engine: Approval Required, Approved, Approved On (optional), Approval Type (global option set).
- Configure Status and Status Reason transitions for "during approval", "approved", and "declined". During approval the system moves records to a "Review" state; on decline, it typically returns to "Draft"; on approval it applies "Approved" and sets the date if the field exists.
- Entity (lookup to the entity configured above)
- Execution Order (1, 2, 3 … for sequential approvals)
- Approval Group (and Additional User Fields to dynamically add approvers)
- Approval Type (One must approve / All must approve)
| Option | Meaning |
|---|---|
| Single Approval – Fail on First Approval | One "Yes" approves the record. A "No" immediately fails. |
| Single Approval – Fail on First Decline | One "No" fails the record. At least one "Yes" approves it. |
| Everyone Must Approve | All approvers must approve. Approval waits for all responses. |
- FetchXML – Applicable Records (which records should go through this stage)
- FetchXML – Eligibility (when a user may request approval; add an Error Message to guide users)
- Can Self‑Approve:
- Yes → requester can be included as an approver.
- No → requester is removed; if they are the only approver, the approval request fails.
Lock requiresapproval, isapproved, and approvaltypecode to prevent manual edits (plugins update them).
Show/hide approval stages using isapproved.
- Add via Ribbon Workbench (cannot be done via Maker because JavaScript resources are needed in visibility rules).
- Add three buttons and name exactly:
RequestApproval(form): starts the process.Approve(form): approve/decline current record.ApproveMulti(list): approve/decline multiple selected records. - Button Commands (JavaScript Actions):
RequestApproval→KlevrCommon.RequestApprovalClick Approve→KlevrCommon.ApprovalClick ApproveMulti→KlevrCommon.ApprovalMultiClick - Enable/Visible Rules (in
klevr_approval.ribbon.js):RequestApproval→KlevrCommon.RequestApprovalVisible Approve→KlevrCommon.ApprovalVisible ApproveMulti→KlevrCommon.GetApprovalMultiRecords - Icons: Approve →
ClickToCall/SuccessX16.svgApproveMulti →ClickToCall/SuccessX16.svgRequestApproval →/HeaderIconImages/TeamManagement.svg
Create and configure a Power Automate flow that sends notifications to Approvers when an Approval User record is created. The flow should retrieve the Regarding record, generate the notification content, include a direct link to the record being approved, and send the notification from the appropriate queue or user account.
Validate buttons, visibility, eligibility rules, notification emails, and status transitions.
Operating the solution
- Groups: Maintain Approval Groups (name, description, user subgrid) for reuse.
- Thresholds: Use multiple Approval Configs + execution order + FetchXML for value‑based chains (e.g., managers → finance → CEO).
Klevr Approvals – Technical Guide
Architecture
- Custom API Initiates approvals; evaluates applicability & eligibility (FetchXML); picks the correct Approval Config; computes approver list (Group + Additional User fields; respects self‑approval); creates Approval User records; and calls subsequent stages after completion.
- Plugins (Approval User scope) Enforce security (only the assigned user can complete their approval); manage delegation; drive state transitions; and ensure data integrity.
- Entity updates On Request Approval: set status to Review; lock fields via field flocker if desired. On Decline: revert to Draft; on Final Approval: set approved flags and date.
Data model (key tables)
Approval Entity Configuration
- Entity Schema Name (e.g.,
klevr_contract) - Approval Required Field (e.g.,
klevr_requiresapproval) - Approved Field (e.g.,
klevr_isapproved) - Approved On (optional date)
- Approval Type Field (
klevr_approvaltypecode, global option set) - Status / Status Reason – During, Approved, Declined (numeric mappings for state/status reason transitions)
Approval Configuration (one or many per table)
- Execution Order (1..n) — stages run sequentially
- Approval Group (lookup)
- Additional User Fields (schema name(s) on the record; each must be a System User lookup)
- Approval Type → One must approve / All must approve
| Option | Meaning |
|---|---|
| Single Approval – Fail on First Approval | One “Yes” approves the record. A “No” immediately fails. |
| Single Approval – Fail on First Decline | One “No” fails the record. At least one “Yes” approves it. |
| Everyone Must Approve | All approvers must approve. Approval waits for all responses. |
- Can Self‑Approve (Yes/No)
- Yes → requester can be included as an approver.
- No → requester is removed; if they are the only approver, the approval request fails.
- FetchXML – Applicable Records (which records this stage applies to)
- FetchXML – Eligibility (when a record is ready to request approval); Condition Logic (block if in result set / block if not in result set); Error Message for user feedback.
- Approval types
- One must approve → Any single approver can approve the record for that stage.
- All must approve → Every assigned approver must approve; the stage remains pending until all responses are complete.
FetchXML patterns
Applicable Records (example – threshold):
<fetch top="50">
<entity name="klevr_contract">
<attribute name="klevr_name" />
<filter>
<condition attribute="klevr_amount" operator="ge" value="1000" />
</filter>
</entity>
</fetch>
Eligibility (example – ready to request):
<fetch top="1">
<entity name="klevr_contract">
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" /> <!-- Active -->
<condition attribute="klevr_description" operator="not-null" />
<condition attribute="klevr_istemplate" operator="eq" value="0" />
</filter>
</entity>
</fetch>
- Pair the query with Condition Logic: Block if in result set or Block if not in result set to emulate NOT scenarios where required. (The demo shows eligibility blocking until conditions are satisfied.)
Approval Group
- Name, Description, Users (subgrid)
Approval User (activity)
- Regarding (the record under approval), User, Delegate To, Status, Outcome, Comments
- Created per approver per stage; visible under Approvals and on the originating record.
Ribbon & web resources
Buttons (names & placement)
RequestApproval(form)Approve(form)ApproveMulti(list toolbar)
Commands → JavaScript
KlevrCommon.RequestApprovalClickKlevrCommon.ApprovalClickKlevrCommon.ApprovalMultiClick
Enable/Visible rules (JS functions in klevr_approval.ribbon.js****)
KlevrCommon.RequestApprovalVisibleKlevrCommon.ApprovalVisibleKlevrCommon.GetApprovalMultiRecords
Web resources
- JavaScript library handling button logic & visibility
- HTML/Dialog capturing approve/decline + comments
Icons
- Approve →
ClickToCall/SuccessX16.svg - ApproveMulti →
ClickToCall/SuccessX16.svg - Request Approval →
/HeaderIconImages/TeamManagement.svg
Notifications (Power Automate)
- Create a Power Automate flow to send approval notifications to Approvers when Approval User records are created.
- Trigger the flow when an Approval User record is created.
- Use the Regarding record to determine which record is being submitted for approval.
- Build the notification email using information from the related record.
- Include a direct link to the record so the Approver can review and action the request.
- Configure the sender (queue or user) based on the customer's requirements.
- Send the notification to the assigned Approver.
Integration with Field Locker
- For example, when status is Review, lock critical fields to prevent tampering. On decline, return to Draft for edits; on final approval, keep them locked as needed.
Deployment checklist
- Fields created and secured (BR lock)
- Approval Entity Configuration mapped (fields + statuses)
- Approval Config(s) created (groups, additional users, FetchXML, messages, order)
- Ribbon buttons + commands + rules published
- Template flow cloned and customised
- Admin/Approver roles assigned
- End‑to‑end UAT scenarios passed (single stage, multi‑stage, delegation, multi‑select approval)
Klevr Approvals – User Guide
What you can do
- Request approval for a record
- Approve / Decline assigned items (on the record or in bulk from list views)
- Delegate an approval to another user if you’re unavailable (Klevr Approval Admins can do this on your behalf)
- Receive email notifications with links straight to the record
Requesting approval (record owners/requesters)
Open the record and click Request Approval.
If the record isn't ready, you'll see a clear message (e.g., missing required fields). Fix and try again.
When sent, the record moves to Review. You may notice some fields lock to prevent changes while it's being reviewed (if configured).
Approving a record (approvers)
Option A — On the record
- Open the record; if an approval is assigned to you, the Approve button is visible. Click it, choose Approve or Decline, and add comments.
Option B — From the Approvals list
- Go to the list view the Approvals are on, multi‑select items, then approve/decline in bulk.
- Use the link in the notification email to go directly to the record and approve.
Delegation
- If you’re away, open your Approval User record and choose Delegate To (a new approval record is created for the delegate; your one is cancelled, and the chain is fully audited).
- Klevr Approval Administrators can delegate on behalf of approvers if needed.
What happens next
- If approved (final stage): the record is marked approved; status/status reason update; Approved On may be set.
- If declined: the record returns to Draft so it can be corrected and re‑submitted.
- If there are multiple stages: your approval may trigger the next stage automatically (e.g., Managers → Finance → CEO).
Last updated on