> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/opentext-smax/create-service-request.md).

# Create Service Request

Creates one OpenText SMAX Service Request (entity type `Request`) for all the assets the workflow collected, through the EMS REST API. The asset list is appended to the request description.

### Before you begin

* An OpenText SMAX tenant and a user (login and password) that may create the entity in the EMS REST API.
* Accepted asset type: `device`. No required columns.
* The device columns you pick in **Edit Columns** are the columns of the asset report in the description.
* Defaults you saved for this job in [Action Center Settings](broken://pages/c8a849ebb9e0ec0dc85759a136bbbb8a5f105a16) pre-fill the node form. Options you leave out are filled from them when you save the node.

### Settings

These are the fields of the job node form.

| Setting                             | Type    | Required | Default | Description                                                                                                                                                                                      |
| ----------------------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| URL                                 | URL     | Yes      | None    | OpenText SMAX base URL. Example: `https://smax.example.com`.                                                                                                                                     |
| Tenant ID                           | Text    | Yes      | None    | SMAX `TENANTID`, used for authentication and in the EMS bulk path.                                                                                                                               |
| Login                               | Text    | Yes      | None    | SMAX username or email used for authentication.                                                                                                                                                  |
| Password                            | Text    | Yes      | None    | SMAX password. Secret. Masked after saving.                                                                                                                                                      |
| Title (DisplayLabel)                | Text    | No       | None    | Ticket title. Defaults to the workflow title if left blank.                                                                                                                                      |
| Description                         | Text    | No       | None    | Ticket description (HTML). The asset report is appended automatically.                                                                                                                           |
| Include Asset Report in Description | Boolean | No       | true    | Append the matched assets (count and columns) to the ticket description.                                                                                                                         |
| Entity Properties                   | JSON    | No       | `{}`    | Additional EMS entity properties merged into the payload. Fields you fill in above take precedence. Example: `{"PhaseId": "Log", "ProcessId": "normal", "RegisteredForActualService": "10916"}`. |
| Requested By (Person ID)            | Text    | No       | None    | SMAX person Id of the requester. Example: `10073`.                                                                                                                                               |
| Urgency                             | Choice  | No       | None    | Choices: `NoDisruption`, `SlightDisruption`, `SevereDisruption`, `TotalLossOfService`. These are the out-of-the-box SMAX values. Send other values through Entity Properties.                    |

### How it works

* The job signs in with `POST <URL>/auth/authentication-endpoint/authenticate/token?TENANTID=<Tenant ID>` and then sends one request to `<URL>/rest/<Tenant ID>/ems/bulk` with a single `Request` entity and the operation `CREATE`. One entity is created for all matched assets.
* Properties start from **Entity Properties**. The fields you fill in above replace the matching properties (Requested By becomes `RequestedByPerson` and Urgency becomes `Urgency`).
* The title is **Title (DisplayLabel)**, else `DisplayLabel` from Entity Properties, else the workflow title.
* The description is **Description**, else `Description` from Entity Properties, else the workflow description. With **Include Asset Report in Description** on, `Hostname Count`, a header row with your columns (**Edit Columns**) and one row per asset are appended. The report is cut to keep the request under about 1 MB, and a line states how many assets were omitted.
* Unless Entity Properties already set it, the request gets `Active` true.
* If SMAX answers with a status other than 200 or 201, or the bulk `completion_status` is not `OK`, the job logs the error and the code does not raise it. A failed sign-in does raise an error.
* The assets pass on to the next node unchanged.

### Example

Open one service request for all matched devices.

| Setting              | Value                      |
| -------------------- | -------------------------- |
| URL                  | `https://smax.example.com` |
| Tenant ID            | `YOUR_TENANT_ID`           |
| Login                | `your-user@example.com`    |
| Password             | `YOUR_API_TOKEN`           |
| Title (DisplayLabel) | `Review matched devices`   |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/6d6d02e4327768ba6444eaf367143267032d1881">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/c8a849ebb9e0ec0dc85759a136bbbb8a5f105a16">Broken link</a></td></tr><tr><td><strong>Create Incident</strong></td><td>Create an Incident in SMAX.</td><td><a href="broken://pages/11272dee827a90723e717247edeaf30567a774b9">Broken link</a></td></tr><tr><td><strong>Create/Update Entity</strong></td><td>Create or update any SMAX entity.</td><td><a href="broken://pages/0a40fff8e33896fab35a2eca0fcd06caaedda69b">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.6.1.
{% endhint %}
