# Help Page Templates

Use these operations to add and manage help pages for access reviewers, and customize pop-up messages when a review starts, or when rows are signed off.

| Operation                                      | Method | Syntax                                                                          |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------- |
| [Create Help Page](#create-help-page)          | POST   | `{veza_url}/api/preview/awf/help_page_templates`                                |
| [List Help Pages](#list-help-pages)            | GET    | `{veza_url}/api/preview/awf/help_page_templates`                                |
| [Get Help Page](#get-help-page)                | GET    | `{veza_url}/api/preview/awf/help_page_templates/{workflow_id}/{usage}`          |
| [Get Review Help Page](#get-review-help-page)  | GET    | `{veza_url}/api/preview/awf/certification_help_page?certification_id={cert_id}` |
| [Delete help page](#delete-help-page)          | DELETE | `{veza_url}/api/preview/awf/help_page_templates/{workflow_id}/{usage}`          |
| [Update workflow help page](#update-help-page) | PUT    | `{veza_url}/api/preview/awf/help_page_templates`                                |

{% file src="<https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-ac7d9211d6d00f2562a9c81c587eb0809dbae395%2FHelp_Page_Templates_postman_collection.json?alt=media&token=24716020-75a7-4d64-8aa6-578a7c16b955>" %}

## Create help page

Add custom help messages for reviewers by providing the plain text `template_body`, `name`, and an existing `workflow_id` and `usage` where the template will apply. All reviews (`certifications`) for the configuration (`workflow`) will use the new template.

### Template usage

The `usage` field determines how and when the help page will be visible to users. It must be one of the following values:

* `HELP_PAGE`: Reviewers can access help pages from reviewer's interface by clicking the *User Guide* icon. The help page will also appear when viewing the review for the first time.
* `REVIEW_START`: Opens when reviewers start a review.
* `SIGN_OFF`: Opens whenever a row or multiple rows are signed off by a reviewer.

Only one help page can exist at a time for a given workflow and usage. You can manage global help pages by using `00000000-0000-0000-0000-000000000000` as the `workflow_id`. Global help pages for each usage will apply to all reviews for all configurations.

### Template formatting

The template can use markdown and placeholders, for example:

```markdown
# Help for {{WORKFLOW_NAME}}

## Formatting

Formatting text in Markdown:

- *Italic text*
- **Bold text**
- `Code block`
- [Link text](https://example.com)

## Bullet Lists

Bullet lists in Markdown:

- Item 1
- Item 2
- Item 3

## Numbered Lists

Numbered lists in Markdown:

1. First item
2. Second item
3. Third item

## Placeholders

The following placeholders are available:

- {{WORKFLOW_NAME}}
- {{WORKFLOW_URL}}
- {{WORKFLOW_TIME}}
- {{WORKFLOW_OWNER}}
- {{WORKFLOW_DESCRIPTION}}
- {{WORKFLOW_CERT_STARTED_ON_DATE}}
- {{WORKFLOW_CERT_STARTED_ON_TIME}}
- {{WORKFLOW_CERT_CREATED_BY}}
- {{WORKFLOW_CERT_LAST_UPDATED_ON_DATE}}
- {{WORKFLOW_CERT_LAST_UPDATED_ON_TIME}}
- {{WORKFLOW_CERT_LAST_UPDATED_BY}}
- {{WORKFLOW_CERT_COMPLETED_ON_DATE}}
- {{WORKFLOW_CERT_COMPLETED_ON_TIME}}
- {{WORKFLOW_CERT_COMPLETED_BY}}
- {{WORKFLOW_CERT_LAST_ACTIVITY_ON_DATE}}
- {{WORKFLOW_CERT_LAST_ACTIVITY_ON_TIME}}
- {{WORKFLOW_CERT_LAST_ACTIVITY_BY}}
- {{WORKFLOW_CERT_DUE_ON_DATE}}
- {{WORKFLOW_CERT_REVIEWERS}}
```

See [notification-templates](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/notification-templates) for more information about placeholders.

Example request:

```shell
POST {{veza_url}}/api/preview/awf/help_page_templates
```

```json
{
  "value": {
    "workflow_id": "bc2b2daa-3508-4c0c-a0f2-8a2fb0ef59d9",
    "name": "Review Help",
    "template_body": "# {{WORKFLOW_NAME}} Review Guide\n\nWelcome to the {{WORKFLOW_NAME}} review process. Please follow the steps below:\n\n## Review Steps\n\n",
    "usage": "HELP_PAGE"
  }
}
```

## List help pages

Get all configured help page templates.

```shell
GET {{veza_url}}/api/preview/awf/help_page_templates
```

Example response:

```json
{
    "values": [
        {
            "workflow_id": "8c1772da-a7c3-4dc7-8b09-b900af011ee5",
            "name": "Review Start Popup",
            "usage": "REVIEW_START"
        }
    ]
}
```

## Get help page

Returns the current help page template for an existing `workflow_id` and `usage`.

* The `usage` parameter must be specified. For the existing help page template, the usage value should be `HELP_PAGE`.
* To retrieve the tenant-wide default template (if it was set), use an all-zero UUID (`00000000-0000-0000-0000-000000000000`) for the `workflow_id`.

Example request:

```shell
GET {{veza_url}}/api/preview/awf/help_page_templates/{{workflow_id}}/{{usage}}
```

## Get review help page

Returns the current template for a given certification id.

Example request:

```shell
GET {{veza_url}}/api/preview/awf/certification_help_page?certification_id={{cert_id}}
```

Example response:

```json
{
    "content": "# Help for Reviewers\n\n## Instructions:\n\n"
}
```

## Delete help page

Permanently remove the help page template for a `workflow_id` and `usage`. It will no longer apply to reviews for using the configuration, specified by `workflow_id`.

* The `usage` parameter must be specified. For the existing help page template, the usage value should be `HELP_PAGE`.
* To clear the tenant-wide default template, use an all-zero UUID for the `workflow_id`: `00000000-0000-0000-0000-000000000000`.

Example request:

```shell
DELETE {{veza_url}}/api/preview/awf/help_page_templates/{{workflow_id}}/{{usage}}
```

## Update help page

`PUT {{veza_url}}/api/preview/awf/help_page_templates`

Update the help page for the specified `workflow_id` and `usage`:

* To add a tenant-wide default template, use an all-zero UUID for the `workflow_id`: `00000000-0000-0000-0000-000000000000`.
* Updating a template now uses a plain text `template_body`, instead of a base64-encoded string.

Example request:

```json
{
  "value": {
    "name": "Global Sign Off Confirmation",
    "template_body": "string",
    "workflow_id": "00000000-0000-0000-0000-000000000000",
    "usage": "SIGN_OFF"
  }
}
```
