> For the complete documentation index, see [llms.txt](https://docs.noctrastore.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.noctrastore.net/noctra-notify/framework-integration.md).

# Framework integration

Route framework notifications and Text UI helpers through Noctra Notify.

Noctra Notify works without a framework. This page is only needed when you want existing framework helper calls to use it automatically.

{% hint style="warning" %}
Back up the framework file before changing it. A framework update may replace these edits, so keep a copy of your integration.
{% endhint %}

## ESX

Find the client functions that provide notifications and Text UI in your version of `es_extended`, then route them through the exports below.

```lua
function ESX.ShowNotification(message, notificationType, duration, title, position)
    exports.noctra_notify:Notify({
        type = notificationType,
        title = title,
        message = message,
        duration = duration,
        position = position
    })
end

function ESX.TextUI(text, id, title, key, position)
    return exports.noctra_notify:ShowTextUI({
        id = id or 'esx',
        title = title,
        text = text,
        key = key or 'E',
        position = position
    })
end

function ESX.HideUI(id)
    exports.noctra_notify:HideTextUI(id or 'esx')
end
```

Check the argument order used by your ESX version and adapt the wrapper if it differs.

## QBCore

Find `QBCore.Functions.Notify` in your QBCore client functions and replace its contents with:

```lua
function QBCore.Functions.Notify(text, notificationType, duration, title, position)
    exports.noctra_notify:Notify({
        type = notificationType,
        title = title,
        message = text,
        duration = duration,
        position = position
    })
end
```

The QBCore Text UI can use one stable ID so repeated calls update the same prompt:

```lua
local textUiId = 'qbcore'

local function drawText(text, position)
    exports.noctra_notify:ShowTextUI({
        id = textUiId,
        text = text,
        key = 'E',
        position = position
    })
end

local function hideText()
    exports.noctra_notify:HideTextUI(textUiId)
end
```

Keep the original function names and exports expected by your QBCore version.

## Qbox and custom frameworks

No framework bridge is required. Call Noctra Notify directly from client resources, or wrap the exports inside your framework's notification and Text UI helpers.

```lua
Framework.Notify = function(message, notificationType)
    exports.noctra_notify:Notify({
        type = notificationType,
        message = message
    })
end
```

## Recommended approach

For the easiest setup, use the exports directly in your scripts. Only change the framework functions if you want existing scripts to use Noctra Notify automatically. Some scripts do not use the framework functions, so you may need to integrate them manually.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.noctrastore.net/noctra-notify/framework-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
