# Testing and Debugging

The DSP provides several tools to test and debug campaign delivery.

## Debug mode

In non-production environments, or when debug mode is enabled, the bid response includes additional information:

```json
{
  "id": "response-uuid",
  "seatbid": [...],
  "ext": {
    "lineItems": [...],
    "eligibility": {
      "imp-id": [
        { "lineItemId": 123, "reason": null },
        { "lineItemId": 456, "reason": "targeting:Country:included (expected=[US], actual=FR)" }
      ]
    }
  }
}
```

### Enabling debug mode

* Set `test=1` in the OpenRTB bid request
* Add `nexx360_debug=1` as a URL query parameter on the publisher page

When no bid is returned in debug mode, the response also includes the full `bidRequest` object for inspection.

## Forced parameters

Forced parameters bypass normal eligibility checks, allowing you to test specific line items, creatives, and prices. They can be passed as URL query parameters on the publisher page (`site.page`) or via the OpenRTB request extension (`ext`).

Both hyphen and underscore variants are supported for URL parameters.

| URL parameter      | Underscore variant | Request ext field         | Description                                                  |
| ------------------ | ------------------ | ------------------------- | ------------------------------------------------------------ |
| `forced-line-item` | `forced_line_item` | `nexx360ForcedLineItemId` | Force a specific line item (bypasses all eligibility checks) |
| `forced-creative`  | `forced_creative`  | `nexx360ForcedCreativeId` | Force a specific creative within the forced line item        |
| `forced-price`     | `forced_price`     | `nexx360ForcedPrice`      | Override the bid price (in the target currency)              |

### What forced line item bypasses

When a line item is forced, the following checks are skipped:

* Status check (even `paused` line items will deliver)
* Date range validation
* Media type matching
* All targeting criteria
* Split targeting
* Delivery capping
* Delivery ratio / pacing

### URL parameter example

```
https://example.com/page?forced_line_item=12345&forced_creative=678&forced_price=5.5
```

### Request ext example

```json
{
  "ext": {
    "nexx360ForcedLineItemId": 12345,
    "nexx360ForcedCreativeId": 678,
    "nexx360ForcedPrice": 5.5
  }
}
```

{% hint style="info" %}
Request ext fields take priority over URL parameters when both are provided.
{% endhint %}

## Exchange test creative price override

Independently from the DSP forced parameters above, the exchange supports forcing a test creative at a specific CPM price. This is useful for verifying pricing flows end-to-end without involving the DSP.

| Endpoint type     | Parameter                                                                                                                                                    | Description                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
| VAST / ReachTV    | `nexx360_force_creative_price=10` (URL query param)                                                                                                          | Force a Nexx360 test creative at CPM 10 |
| OpenRTB / Booster | `"nexx360_force_creative_price": 10` (in request `ext`) **or** `?nexx360_force_creative_price=10` appended to the publisher page URL (read from `site.page`) | Force a Nexx360 test creative at CPM 10 |

When set, the test creative is automatically enabled (no need to also pass `force_test_creative=1` or `nexx360_force_creative=1`).

{% hint style="info" %}
On the Booster / OpenRTB endpoints, if both the page URL and the body `ext` are provided, the body value wins.
{% endhint %}

## Use cases

| Scenario                                | Parameters                                                                                                                                             |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Preview a campaign creative             | `forced_line_item` + `forced_creative`                                                                                                                 |
| Test at a specific price point          | `forced_line_item` + `forced_price`                                                                                                                    |
| Debug why a line item isn't bidding     | Enable `nexx360_debug=1` and check `ext.eligibility`                                                                                                   |
| Verify targeting setup                  | Enable debug mode and inspect rejection reasons                                                                                                        |
| Test exchange pricing at a specific CPM | `nexx360_force_creative_price=10` (VAST URL query, or publisher page URL for Booster/OpenRTB) or `"nexx360_force_creative_price": 10` in ext (OpenRTB) |


---

# 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://developer.nexx360.io/campaign-delivery/testing-and-debugging.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.
