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

# Issue type updated

> Webhook and Pub/Sub event when an organisation issue type is set or changed

# Issue type updated

RxScale sends `organisation_issue_updated` when a prescription issue is filed with one of your organisation's issue types, or when an open issue of that kind moves to a different issue type.

The default issue type, a catalog rename, and resolving, commenting on, or acknowledging an issue do not send this event.

> [!NOTE]
>
> This is the only event that can be delivered to a Pub/Sub topic. Every other event stays on HTTPS webhooks. Pub/Sub delivery uses the same JSON body as the webhook.

## When it is sent

| `data.change` | Meaning |
| - | - |
| `type_set` | The issue was created with an issue type, or an open issue received an issue type for the first time. `previous_organisation_issue_type_uid` is `null`. |
| `type_changed` | An open issue moved from one issue type to another. `previous_organisation_issue_type_uid` is the previous type. |

Filing the same issue type again does not send another event. A repeated delivery of the same change is the same issue, the same `change`, and the same issue type.

## Payload

The body lists only the fields below. It does not include the doctor's note, comments, attachments, patient contact details, or clinical content. `prescription_uid` identifies the prescription and is not a patient record.

```json theme={null}
{
  "event_type": "organisation_issue_updated",
  "timestamp": 1735689600,
  "payload_version": "1",
  "data": {
    "organisation_uid": "org_123",
    "issue_uid": "iss_123",
    "change": "type_set",
    "status": "OPEN",
    "issue_type": "PRESCRIPTION_ON_HOLD",
    "organisation_issue_type_uid": "oit_123",
    "previous_organisation_issue_type_uid": null,
    "name_de": "Rückfrage Labor",
    "name_en": "Lab query",
    "applies_to": "on_hold",
    "prescription_uid": "rx_123",
    "created_at": 1735689600,
    "updated_at": 1735689600
  }
}
```

`issue_type` is the prescription verdict (`PRESCRIPTION_ON_HOLD` or `PRESCRIPTION_DECLINED`). `name_de` and `name_en` are the labels of the issue type at the moment it was set. Either label is JSON `null` when that language was not set. A later rename of that type does not send a new event and does not change a delivery already queued.

Webhook requests use the headers described in [Events](https://docs.rxscale.com/webhooks/events.md), including `X-Webhook-Signature` when the subscription has a signing secret. A test send of this event does not need a pharmacy order uid.

## Pub/Sub

In the admin portal, choose target type **Pub/Sub** and enter the topic as `project/topic`, using your project **ID** (for example `my-project-id`), not the project number. RxScale publishes to `projects/<project>/topics/<name>`. A project id already saved on another organisation's Pub/Sub subscription is rejected. The same organisation can use its project again. The topic must be in your own Google Cloud project: a topic in RxScale's project is rejected with `Topics in RxScale's own Google Cloud project cannot be used.`, and RxScale never publishes to one.

Grant `roles/pubsub.publisher` on that topic to the RxScale service account named for webhook delivery. The topic must already exist in your project. RxScale does not store a key or a credential for your project. Ask RxScale for the service-account email if it is not already on the topic; do not send a private key.

Other notification types cannot be subscribed as Pub/Sub.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.