> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Questionnaire Template and SLA Admin — Admin Guide

> Tenant-admin configuration guide for CE-28-EN-01 (Questionnaire Template and SLA Admin).

## Overview

This guide covers tenant-admin configuration for Questionnaire Template and SLA Admin (spec CE-28-EN-01).

## Initial setup

Before users can submit screenings, a tenant admin must:

1. **Grant the required permissions.** Assign `ce.screening.create` and `ce.screening.view` to the roles that will submit and view screenings. Use Settings → Roles.
2. **Create and activate a questionnaire template.** Navigate to the questionnaire template admin surface and create a template (v1) for each program type your organization uses. Set it to **active** so runtime screening resolves it.
3. **Configure SLA policies.** Set the SLA window and escalation rules for each org/site/program-type combination you need. The runtime lookup resolves the most-specific policy first: org + site + program type → org + program type → org default.

## Configuration options

* Questionnaire template admin: create, version, and activate templates per program type. Activating a new version does not affect existing submissions — those continue to render against the version captured at submission time.
* SLA policy admin: configure response windows and escalation profiles at org, org+program-type, or org+site+program-type granularity.
* Runtime resolution: the system automatically picks the most-specific active template and SLA policy at the time of each screening.

## Permissions

Access to the Contacts module (route `/ce/contacts`) is gated by `ce.contacts.view`. Screening-specific permissions relevant to this feature:

| Key                   | What it allows                                   |
| --------------------- | ------------------------------------------------ |
| `ce.contacts.view`    | Access the Contacts module (page-level gate)     |
| `ce.screening.create` | Submit a new screening                           |
| `ce.screening.manage` | Manage screening templates and SLA configuration |
| `ce.screening.view`   | View screening history and submission detail     |

Grant or revoke these via **Settings → Roles**. All writes to `ce_screening_questionnaires` and `ce_screening_sla_config` are guarded by `organization_id` checks both client-side and via RLS policies, so tenant data cannot cross org boundaries.

## Auditing & monitoring

* *Document what events are emitted and where they appear in audit logs.*
* *Note any platform integration with `fw_domain_events` or related contracts.*

## Troubleshooting

* **Configuration changes don't take effect.** Some settings require a session refresh; users should sign out and back in.
* **Audit events missing.** Verify trigger functions are registered (see `npm run validate:specs`).

## Related

* [User guide](/ce/ce-28-en-01-user-guide)
* Source spec: `specs/ce/specs/CE-28-EN-01*.md`
