> For the complete documentation index, see [llms.txt](https://docs.sonoransoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonoransoftware.com/cms/integration-capabilities/in-game-integration-resources/core/core-submodules/clock-in.md).

# Clock In

This module is a in-game way of automatically\* clocking in/out of Sonoran CMS's system.

## Installation / Configuration

{% hint style="info" %}
With core version `v1.4.0` the Clock In resource was converted to a core module and no longer requires manual installation just configuration.
{% endhint %}

### 1. Configure Clock In Module

Locate the clockin module within your `[sonorancms]/sonorancms/server/modules` and open the `clockin_config.json` file

```json
{
    "enableCommand": true,
    "command": "clockin",
    "useAcePermissions": false,
    "qbcore": {
        "use": true,
        "autoClockInJobs": [
            "police",
            "ems",
            "fire"
        ]
    },
    "esx": {
        "use": false,
        "autoClockInJobs": [
            "police",
            "ambulance"
        ]
    },
    "cad": {
        "use": false,
        "note": "This will automatically clock in users when they enter a Police/EMS/Fire CAD panel. This will not correlate to the users actual in-game status, but will allow them to use the CAD without having to manually clock in."
    },
    "ranksWhileCadActive": [
        "00000000-0000-0000-0000-000000000000"
    ]
}
```

## Configuration

| Config Option          | Description                                                                                                                                                                                                                                                                                                         |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enableCommand          | Registers the specified `command` that allows you to toggle clock in/out.                                                                                                                                                                                                                                           |
| command                | If `enableCommand` is `true`, this will be the registered command to toggle clock in/out.                                                                                                                                                                                                                           |
| useAcePermissions      | If `enableCommand` is `true`, this will enable ace permissions for the specific command, must give `command.whateverTheCommandIs`                                                                                                                                                                                   |
| qbcore.use             | Enables qbcore integration                                                                                                                                                                                                                                                                                          |
| qbcore.autoClockInJobs | Will automatically clock in/out the player's Sonoran CMS account with they clock in/out of a job with the name in the array of `autoClockInJobs`                                                                                                                                                                    |
| esx.use                | Enables ESX integration                                                                                                                                                                                                                                                                                             |
| esx.autoClockInJobs    | Will automatically clock in/out the player's Sonoran CMS account with they clock in/out of a job with the name in the array of `autoClockInJobs`                                                                                                                                                                    |
| cad                    | When enabled, it will automatically clock the user in and out when logging into and out of Sonoran CAD.                                                                                                                                                                                                             |
| ranksWhileCadActive    | <p>A list of <a href="/pages/-MdJhEMevOiminoagitR#copy-rank-ids">CMS rank IDs</a> that will be added when the user logs into Sonoran CAD and removes it when logging out of Sonoran CAD.<br>This is used for restricting access to things like Sonoran Radio to only be available to users actively in the CAD.</p> |

### 2. Add your API ID

Ensure all players have added their [API ID](/cms/developer-api-documentation/api-integration/getting-started/api-id-system.md) to the CMS!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sonoransoftware.com/cms/integration-capabilities/in-game-integration-resources/core/core-submodules/clock-in.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
