Customer & Sales package

Complaint handling with SLAs

Agents log a complaint; the customer tier and an SLA matrix set response and resolution targets, with escalation, compensation approval and CRM case resolution.

Starts from a formIntermediate~15 min setupv1.0.0

About this package

What it does

Complaint handling with SLAs gives every complaint a clear target and an owner. A service agent logs the complaint from a form: customer email, order number, category, severity, description and channel.

The workflow finds the customer in your CRM (tier and lifetime value) and evaluates the Complaint SLA matrix decision table, which sets the first-response hours, resolution days, handler level and how much compensation a handler can offer. It opens a case in the CRM, starts a resolution SLA and sends the customer an acknowledgement with the case number and response target.

The handler investigates in a User Task due on the resolution date, with reminders and escalation to a supervisor if it sits untouched. They record the root cause, resolution and compensation. Compensation over the handler's limit (or a "needs supervisor" outcome) goes to a supervisor, who can approve or send it back. The case is resolved in the CRM and the customer receives the resolution email. Adapt the matrix, limits and CRM paths.

Starts from a form

Starts from a form: a service agent logs the complaint (Run dialog in the app, or your contact-centre tool posting it to the start API or an inbound webhook).

Someone fills in a form to start it: the workflow inputs are the start form (Run dialog in the app, or your own portal posting to the API), and people complete User Task forms along the way.

The flow

Step by step

  1. 1

    Complaint logged

    The agent enters the customer email, order number, category, severity, description and channel.

  2. 2

    Find the customer

    The CRM returns the customer name, tier and lifetime value.

  3. 3

    Set the targets

    The Complaint SLA matrix sets the first-response hours, resolution days, handler level and compensation limit; a case is opened and an SLA started.

  4. 4

    Acknowledge

    The customer gets the case number, the response target and the expected resolution date.

  5. 5

    Investigate and resolve

    The handler records the root cause, resolution and compensation, with reminders and escalation to the supervisor.

  6. 6

    Approve and close

    Compensation over the limit goes to a supervisor; the case is resolved in the CRM and the customer is emailed.

Complaint handling — A service agent logs a complaint; the CRM tier and the SLA matrix set response and resolution targets, a handler investigates under an SLA with reminders and escalation, larger compensation needs supervisor approval, and the case is resolved in the CRM. The same canvas you get in the designer after installing.

Forms

The start form and the task forms

The workflow inputs are the start form: the Run dialog renders them, and your own portal can post the same fields. User Tasks show their fields and outcome buttons to the assignee.

Start form

Complaint handling

Filled in by whoever starts the process

Customer email * customer_email · emailname@company.comCustomer email address (used to find them in the CRM)
Order number order_number · textOrder or invoice number, if the complaint is about one
Category * category · select
deliveryproduct qualitybillingservice
What the complaint is about
Severity * severity · select
lowmediumhighcritical
How serious it is for the customer
Description * description · textWhat happened, in the customer's words
Channel channel · select
phoneemailchatsocial mediain store
Where the complaint came in
Handler (user id) handler_id · textOptional: user id of the complaints handler (overrides the install-time default)
Supervisor (user id) supervisor_id · textOptional: user id of the supervisor who approves compensation

User Task

Investigate and resolve

{{case_number}}: {{category}} complaint from {{customer_name}} ({{severity}}, {{tier}})

Root cause * root_cause · choice
Carrier delayWarehouse errorProduct defectBilling errorProcess gapStaff conduct+2
Resolution summary (sent to the customer) * resolution_summary · text
Compensation amount compensation_amount · numberPrefilled: 0
Customer contacted * customer_contacted · boolean
ResolvedNeeds supervisor

User Task

Supervisor approval

Approve resolution for {{case_number}} ({{customer_name}}): compensation {{compensation_amount}}

Approved compensation * approved_compensation · numberPrefilled: {{compensation_amount}}
Note for the handler supervisor_note · text
ApproveSend back

From your code

Start a run over the API

Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.

REST

shell
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
  -H "Authorization: Bearer $USERTASKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id":"<workflow id>","variables":{"customer_email":"taylor.brooks@example.net","order_number":"SO-558201","category":"delivery","severity":"high","description":"Order arrived nine days late and the box was damaged. One of the three items is missing.","channel":"phone"}}'

CLI

shell
usertasks workflows inputs <workflow id>          # the start form: keys, types, required
usertasks workflows run <workflow id> --input customer_email=taylor.brooks@example.net --input order_number=SO-558201 --input category=delivery --input severity=high … --wait

Inbound webhook

shell
usertasks webhooks create <workflow id>          # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
  -H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
  -d '{"customer_email":"taylor.brooks@example.net","order_number":"SO-558201","category":"delivery","severity":"high","description":"Order arrived nine days late and the box was damaged. One of the three items is missing.","channel":"phone"}'

What's included

8 assets, ready to adapt

TypeNameDetails
Email templateComplaint acknowledgementSent to the customer as soon as the complaint is logged, with the case number and response target.
Email templateComplaint resolvedSent to the customer when the case is resolved.
IntegrationCRM
API referenceCreate casePOST /cases — Open a complaint case on the customer record with the category, severity and SLA targets.
API referenceFind customer by emailGET /customers — Look the customer up by email: id, name, tier and lifetime value.
API referenceResolve casePOST /cases/{{case_id}}/resolution — Close the case with the root cause, resolution summary and any compensation.
Decision tableComplaint SLA matrix9 rules — Response and resolution targets, handler level and compensation limit by category, severity and customer tier. First matching rule wins.
WorkflowComplaint handling25 steps — A service agent logs a complaint; the CRM tier and the SLA matrix set response and resolution targets, a handler investigates under an SLA with reminders and escalation, larger compensation needs supervisor approval, and the case is resolved in the CRM.

Requirements

What you connect it to

Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.

Needs

  • REST API — A REST API integration: set its base URL and credentials on install.
  • Assignees — People in your workspace to receive the User Tasks (picked on install).
  • Email — Email delivery configured for the instance (EMAIL_PROVIDER), used for notifications.

After installing

  1. CRM integration: set the base URL and API token. The references expect GET /customers?email=… (returning data[] with tier and lifetime_value), POST /cases and POST /cases/{id}/resolution; adjust them to your CRM.
  2. Assignees: pick the default complaints handler (runs can pass handler_id) and the supervisor who approves compensation and receives escalations (runs can pass supervisor_id).
  3. Edit the Complaint SLA matrix: response hours, resolution days, handler levels and compensation limits per category, severity and tier.
  4. Email: configure EMAIL_PROVIDER on the instance so the acknowledgement and resolution emails reach customers (the steps continue on error).

Asked for on install

  • Integration “CRM”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://crm.example.com/api· optional
  • Workflow “Complaint handling” assigneesRequired

    • User for step “Investigate and resolve”nodes.10.config.assignee_id
    • User for step “Investigate and resolve”nodes.10.config.escalation_user_id
    • User for step “Supervisor approval”nodes.18.config.assignee_id

Install

Install it in your workspace

Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.

In the app

  1. Download complaint-handling-sla-1.0.0.utpkg.
  2. Open Automations → Packages and drag the file onto the page (or choose Import package). Browse gallery there lists every gallery package without downloading by hand.
  3. Pick the file. The wizard verifies the checksum, every file hash and the signature, and shows the readme.
  4. Review the changes (what is created) and the data rows.
  5. Fill in the requirements, or tick Keep incomplete and finish later with Complete setup.
  6. Done: the workflow is published and active once setup is complete.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/complaint-handling-sla-1.0.0.utpkg
usertasks packages inspect complaint-handling-sla-1.0.0.utpkg       # offline: checksum, hashes, signature
usertasks packages install complaint-handling-sla-1.0.0.utpkg --dry-run
usertasks packages install complaint-handling-sla-1.0.0.utpkg       # prompts for each requirement
usertasks packages install complaint-handling-sla-1.0.0.utpkg --keep-incomplete --yes   # in CI; finish with:
usertasks packages complete complaint-handling-sla -f values.yaml

Verify the download

File SHA-256
21983c7128cfb3d352f77a926bbd48c15ed6e2512c48c729764d55250681a22e
Package checksum (what is signed)
sha256:3c3be755eacf35f9ab36128bfb703791d8c814620baa4ffa1e7591809c4b427f
Signer
Unsigned preview build — compare the SHA-256 above

shasum -a 256 complaint-handling-sla-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.

Versions

Version 1.0.0

  1. v1.0.02026-10-26First release.

Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work

More packages

Related

Browse the whole gallery