> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qawolf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to integrate any build with the QA Wolf SDK

> When you deploy a new version of your application, you can notify QA Wolf so that a test run starts for that deployment.

Deploy notifications signal that an environment is ready to be tested. When QA Wolf receives the notification, it evaluates it against your configured triggers and initiates a run if the conditions match.

<Tip>
  Deployment notifications should be sent only from your primary environment (e.g., staging or production), as defined in your QA Wolf agreement.

  If you want to trigger test runs from additional environments, contact QA Wolf first. Supporting additional environments requires platform configuration and may affect your account setup; such cases are not covered in this document.
</Tip>

<Check>
  Make sure you have:

  * A CI job that runs after your deployment completes successfully
  * Node.js 18 or later available in your CI environment
  * A QA Wolf API key stored as a CI secret (QAWOLF\_API\_KEY)
  * A deployment trigger configured by QA Wolf for your environment
</Check>

## How to install the CI SDK

Install the SDK in the CI job that will notify QA Wolf:

```bash theme={null}
npm install @qawolf/ci-sdk
```

Ensure the job has access to the QAWOLF\_API\_KEY environment variable.

## How to notify QA Wolf of a deployment

After your deployment completes successfully, use the SDK to notify QA Wolf.

```javascript theme={null}
import { makeQaWolfSdk } from "@qawolf/ci-sdk";

const { attemptNotifyDeploy } = makeQaWolfSdk({
  apiKey: process.env.QAWOLF_API_KEY,
});

const result = await attemptNotifyDeploy({
  deploymentType: "staging",
  branch: process.env.BRANCH_NAME,
  sha: process.env.COMMIT_SHA,
  commitUrl: process.env.COMMIT_URL,
});

if (result.outcome !== "success") {
  throw new Error(`Failed to notify QA Wolf: ${JSON.stringify(result)}`);
}
```

<Note>
  The `deploymentType` value must match the deployment trigger configured by QA Wolf.
</Note>

<Tip>
  Including `branch`, `sha`, and `commitUrl` is recommended and improves traceability when reviewing runs.
</Tip>

If the notification succeeds and a matching trigger exists, QA Wolf creates a new deployment run.

## Validation and troubleshooting

* **If the SDK call succeeds but no run appears in QA Wolf:** Confirm that a deployment trigger has been configured for your environment.
* **If authentication fails:** Verify that QAWOLF\_API\_KEY is set correctly and available to the CI job.
* **If Node.js errors occur:** Confirm that Node.js 18 or later is available in the CI environment.
