# Using Short Codes for Clients

Short codes are small snippets that perform search-and-replace operations throughout the platform. They are designed to streamline report creation and promote data reuse, saving time and ensuring consistency across reports. Short codes can be utilized within report narratives and finding's rich-text fields to automate specific tasks and provide standardized content.

Short codes can simplify report creation by eliminating the need to modify repetitive or common content sections manually. Users can define code snippets once and reuse them across multiple reports, saving time and ensuring consistency by applying the same language, formatting, or information throughout different reports.

{% hint style="warning" %}
Administrators handle [creating and managing short codes](/plextrac-documentation/product-documentation-1/account-management/account-admin/tenant-settings/short-codes.md). Short codes must have been previously set up by an admin.
{% endhint %}

Short codes can be applied at the client level to all reports related to that client. However, they can also be inserted at the [report level](/plextrac-documentation/product-documentation/reports/short-codes.md) if they are relevant only to a specific report.

## Adding Short Codes

<mark style="background-color:yellow;">Step 1:</mark> From the **Clients** module home page, click **View** under the "Actions" menu for the impacted client to reach the **Details** tab.

<div align="left"><figure><img src="/files/nqFLNo6kDTO4djf3L6pq" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 2:</mark> Click **Edit Client Information**.

<div align="left"><figure><img src="/files/uhIsL2N1Wr6zjEwOtzC0" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 3:</mark> At the bottom of the modal, click **Add Custom Field**.

<div align="left"><figure><img src="/files/uk5pfigoHpdwvUVZWqQI" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 4:</mark> In the first box on the left, enter the label value corresponding to the appropriate short code and insert the text value that will replace the short code in the second box on the right.

<div align="left"><figure><img src="/files/zZhrER14yRWst5mb1qGm" alt=""><figcaption></figcaption></figure></div>

The "Value" box value will replace the short code (i.e., `%%LOCATION%%`) whenever found in the report's narratives or finding's rich-text fields.

{% hint style="warning" %}
The "Label" box value must be in the list of tenant short codes and set to "Client Field" for **Source**. \ <img src="/files/4ZzXrxRoijaZTo1n93Pt" alt="" data-size="original"><br>
{% endhint %}

The **Custom Field** label links the short code to the value (text data) to replace it. For example:

* **Label:** Location
* **Value:** Boise
* **Short Code:** %%Location%%

{% hint style="info" %}
Short Codes used in a report always begin and end with %% and have underscores rather than spaces.
{% endhint %}

<mark style="background-color:yellow;">Step 5:</mark> Click **Submit** when finished.

<div align="left"><figure><img src="/files/BUjfFLRKOMyGzAjEN7TC" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 6:</mark> Use the short code in any report narrative or findings rich-text field for the client.&#x20;

<div align="left"><figure><img src="/files/xY9H54FboBaPkFED5Gzt" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 7:</mark> From the **Narrative** tab of the report, click **Search & Replace** at the top right of the page.

<div align="left"><figure><img src="/files/JKfz9SzgmkbwjFJCNn9E" alt="" width="563"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 8:</mark> A modal appears. Click **Replace Short Codes** to replace all short codes in the report with their corresponding text data.

<div align="left"><figure><img src="/files/M5etV9bZtv7kxLLhOL7D" alt="" width="437"><figcaption></figcaption></figure></div>

<mark style="background-color:yellow;">Step 9:</mark> Click **Confirm**.

<div align="left"><figure><img src="/files/6Mg888XSIz4mnUqHn44R" alt="" width="439"><figcaption></figcaption></figure></div>

After a few minutes, a confirmation message will appear.

<div align="left"><img src="/files/wEhzcx14r8X5x3mirECm" alt=""></div>

<mark style="background-color:yellow;">Step 10:</mark> Validate that the change(s) occurred as desired.&#x20;

If unsuccessful, ask an admin to verify the short code was set up correctly in the **Admin Dashboard**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plextrac.com/plextrac-documentation/product-documentation/clients/using-short-codes-from-the-client-level-in-plextrac.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
