Open MercatoDocsSearch docsAPI reference

User guide

User Tasks

A user task pauses the process for a person's decision or input. Open the work inbox to claim or complete an assigned task and see which case it belongs to.

The Studio defines the task. The work inbox is where an operator acts on it.

The Work Inbox

The Work Inbox at Workflows → Work Inbox (/backend/work-inbox) is where open work lives. It replaces the old My Tasks list; /backend/tasks now redirects there, and individual task URLs (/backend/tasks/<id>) still work exactly as before.

The inbox is one queue over several sources, not a single table. Workflow user tasks are the source the platform ships; other modules can register their own (agent proposals, for example), and rows from every registered source are merged into the same list.

Columns: Work Item, Source, Priority, Status, Assigned To, Due Date, Created.

Filters: My Work / All Work, Source, Module, Entity Type, Role, Priority, Status, Overdue.

Ordering is fixed and deliberate: priority first, then the nearest due date, then oldest first. Work with no priority set ranks with medium, not last – otherwise a handful of deliberately deprioritized items would bury the entire pre-existing backlog.

Overdue is derived, never stored: a due date in the past on an item nobody has finished yet. An item that was closed late is not overdue – it is done.

Claim Next takes the top item you are able to claim and opens it. If two people press it at the same moment they never receive the same item: the claim is a conditional database update, so the second press moves on to the next item instead of failing.

If a source is temporarily unavailable, the inbox tells you the list may be incomplete rather than failing the whole page – you still see every other source's work.

Working a task

Open a task from the inbox (or from a record page, or from a notification) to reach the task detail page.

The page is decision on the left, context on the right:

Claim appears on a task that is offered to a role rather than to you personally. Claiming takes it out of the shared queue; Release puts it back.

Complete submits the form. If the author configured decision buttons, you press one of those instead – pressing a button both completes the task and sends the workflow down that button's route. Which button you pressed is recorded with the completion.

After completing a task you are offered the next task in one click, so a run of similar work does not mean going back to the list each time.

Who can see a task

A task is yours if it was assigned to you, you claimed it, or it is queued to a role you hold. Those are the people who see it in the inbox and the people who can finish it. Holding the "view user tasks" permission gets you into the task list; it no longer shows you everyone else's work.

On top of that, you must be able to view the kinds of records the task is about. A task bound to a deal is only visible to people who may view deals. This is checked for every record the task is bound to, not just one of them – so a task bound to both a deal and a customer needs both.

Note

This checks the type of record, together with your tenant and organization. It does not check individual records: "may view deals" is not "may view this deal". Open Mercato has no record-level permission layer, and this feature does not add one.

A task that is about no records at all – which is every task created before record bindings existed – is visible to whoever it is assigned to, exactly as before.

Seeing other people's work

Three permissions cover supervision:

PermissionWhat it lets you do
View all workflow tasks (workflows.tasks.view_all)See tasks that are not yours. It does not let you finish them.
Reassign workflow tasks (workflows.tasks.reassign)Move a task to someone else, or back to a role queue.
Administer workflow tasks (workflows.tasks.manage)Force-release a claim, cancel, bulk operations, and change the tenant setting below.

The seeing/doing split is deliberate. A supervisor who completes a colleague's task leaves no trace of how it got to them – so instead they reassign it to themselves first, with a reason. That is recorded on the task (who moved it, when, and why) and in the workflow's own event log, so "who approved this?" stays answerable.

Administrators see a Complete button on a task that is not theirs, but pressing it is refused with "Task is assigned to another user". Reassign it first. Reassignment is currently done through the API (POST /api/workflows/tasks/<id>/reassign); a button on the task page is coming.

A task nobody owns

If a task was authored with no assignee and no role queue, nobody can complete it – the Complete action reports "Task is not assigned to anyone; reassign it before acting on it". Reassign it to a person or a queue and it works normally. The Studio warns about this shape while you are authoring, so you usually catch it first.

Restoring the old behaviour temporarily

If your roles are set up in a way that this change disrupts, an administrator can turn the model off for the whole tenant:

PUT /api/workflows/task-settings   { "taskPermissionsBusinessContext": false }

That restores the reading you had before – anyone with "view user tasks" sees every task in the organization again. It restores nothing else: completing someone else's task, claiming a queue you are not in, and anything outside your tenant stay refused, and portal tasks ignore the setting completely.

It is a migration aid and will be removed one release from now. Use the time to grant "view all workflow tasks" to the roles that genuinely need it.

Portal tasks

A task can be assigned to a customer – someone signed in to the customer portal rather than the backoffice.

For the customer, tasks appear under Tasks in the portal, and open to the same instructions / form / decision buttons a backoffice assignee sees. They need the portal.tasks.view permission to see them and portal.tasks.complete to finish them. A new task shows up without a page refresh.

Two rules make portal tasks safe, and they are stricter than the backoffice ones:

Customers never reach the backoffice task pages, and backoffice users never reach the portal ones.

Authoring one currently means editing the definition JSON in the Studio's Code view – there is no picker in the task inspector yet:

"userTaskConfig": {
  "assigneeKind": "customer",
  "assignedTo": "{{context.portalUserId}}",
  "entityBindings": [
    { "entityType": "customers:company", "idPath": "context.companyId" }
  ]
}

assignedTo must resolve to a portal user's id, and at least one binding must name a record that user owns – without it, the task is created but nobody can see it.

Note

Existing installations must grant portal.tasks.view / portal.tasks.complete to their customer roles by hand from the customer-role editor; only newly created tenants get them automatically. Portal permissions are cached for five minutes, so a fresh grant takes a few minutes to take effect for someone already signed in.

Authoring a task

Select a USER_TASK step in the Studio and open its inspector. It is organized as five questions:

What

The task title and the instructions the assignee reads. Both accept context values: type {{context.customer.name}} – or insert one with the variable picker – and it is filled in when the task is created.

Values are resolved once, at task creation. Editing the definition later never retro-changes what a running task says.

About what

The records this task is about. Each binding is a record type (customers:person, sales:order) plus the context path its id comes from (context.customerId).

Bindings do three things: they render the context cards on the task page, they let the inbox filter by entity type, and they let the record's own page show that the work exists.

A binding whose id does not resolve at creation time is dropped, not carried – a task about "order #undefined" is worse than a task about nothing.

Who

How the task is assigned:

Role queues are matched by role name, so renaming a role orphans assignments authored against the old name. Re-pick the role in the definition after a rename.

When

Deadlines are absolute: the moment is computed once at task creation and never recomputed, so a backlogged queue cannot silently extend a deadline.

Limitation: a task inside a parallel branch does not follow its breach route. A branch advances on its own token, and overriding that is a parallel-execution change rather than a task change; the breach is still recorded and the task still escalates.

The legacy escalationRules field is still carried through the editor for older definitions but nothing executes it. Use Deadline + Reminders + When the deadline passes instead.

Decisions

Decision buttons are the ways this task can end. Each is bound to one outgoing route on the canvas, so the button an assignee presses is what routes the run.

Below the buttons: the form fields to collect, which of those the assignee may edit before deciding, and an optional external form key when a module has registered its own renderer for this task.

A task with no decision buttons still completes through the plain form, exactly as before decisions existed.

Pending work on a record page

Records that a task is bound to show a Pending work panel listing the open items about that record, each linking to its task.

Where it appears today – this is enumerated coverage, not universal: customer people, customer companies, deals, and the sales order detail page (as a tab). Adding another record page means wiring that page's injection spot; there is no generic record-page slot to hook into.

On the order page the panel deliberately sits beside – not instead of – the existing order-approval widget. That widget approves in place; the pending-work panel links out and also lists work that is not an approval.

Notifications

Three notifications are sent about tasks:

NotificationWhen
Task assignedA task is created for you, or for a role queue you are in
Task reminder dueA configured reminder offset before the deadline
Task deadline breachedThe deadline passed with the task still open

Each carries a View link to the task.

A task can additionally offer a one-click Complete button directly on the notification – but only when the completion is genuinely unambiguous:

Why the limit is real: a notification action carries only its own id, and the id of the button you pressed cannot be passed through to the completion. With two decisions there is no way to tell Approve from Reject, so offering a one-click button would be guessing. Anything that does not qualify gets the deep link instead – which is always present either way, so a quick action is a shortcut and never the only route to the task.

Example: an approval task

{
  "stepId": "manager-approval",
  "stepName": "Approve {{context.request.title}}",
  "stepType": "USER_TASK",
  "userTaskConfig": {
    "instructions": "Check the amount against the budget for {{context.request.department}}.",
    "assignedToRoles": ["Managers"],
    "entityBindings": [
      { "entityType": "customers:person", "idPath": "context.requesterId", "label": "Requester" }
    ],
    "priority": "high",
    "deadline": { "duration": "P2D" },
    "reminders": [{ "offset": "PT4H" }],
    "onBreach": { "action": "reassign", "reassignTo": "Directors" },
    "formSchema": {
      "properties": { "comments": { "type": "string" } }
    },
    "decisions": [
      { "id": "approve", "label": "Approve", "transitionId": "t_to_approved", "style": "primary" },
      { "id": "reject", "label": "Reject", "transitionId": "t_to_rejected", "style": "destructive" }
    ]
  }
}

What the assignee sees: a task titled with the request's own title, the requester's card beside it, a comments box, and two buttons. Pressing Reject completes the task, records reject as the choice, and sends the run down t_to_rejected. Four hours before the two-day deadline everyone in the Managers queue is reminded; if it passes unfinished, the task is reassigned to Directors and escalated.

Best practices

Authoring

Working

Next Steps

See Also:

Previous: Transitions