Repository: saleor/saleor

Issue:
Order number not available in ORDER_CONFIRMED event
### What I'm trying to achieve
Get all order detail included order number field in ORDER_CONFIRMED event

### Steps to reproduce the problem
<!-- Adding logs from the console, as well as query/response help us fix the bug faster -->
1. Confirm an order
2. The webhook is activated with ORDER_CONFIRMED event
3. Get order information (without order number) 

### What I expected to happen
Get order number in ORDER_CONFIRMED event

### Screenshots and logs
```
{
  "type": "Order",
  "id": "T3JkZXI6Y2RmY2UzMjQtNWEwOC00YjY4LWFjNDQtYjkwYTRiOGY3Njlk",
  "channel": {
    "type": "Channel",
    "id": "Q2hhbm5lbDoz",
    "slug": "default-channel",
    "currency_code": "EUR"
  },
  "shipping_address": null,
  "billing_address": "billing_address",
  "discounts": null,
  "token": "cdfce324-5a08-4b68-ac44-b90a4b8f769d",
  "user_email": "email",
  "created": "2018-01-01T00:00:00+00:00",
  "original": "T3JkZXI6Tm9uZQ==",
  "lines": ["ProductLine"],
  "fulfillments": [],
  "collection_point": null,
  "payments": ["Payment"],
  "shipping_method": null,
  "meta": {
    "issued_at": "2022-07-25T12:11:38.934685+00:00",
    "version": "3.5.0",
    "issuing_principal": { "id": "VXNlcjo5ODM", "type": "user" }
  },
  "private_metadata": {},
  "metadata": {},
  "status": "unfulfilled",
  "language_code": "en",
  "origin": "checkout",
  "shipping_method_name": null,
  "collection_point_name": null,
  "shipping_price_net_amount": "0.00",
  "shipping_price_gross_amount": "0.00",
  "shipping_tax_rate": "0.0000",
  "total_net_amount": "23.00",
  "undiscounted_total_net_amount": "23.00",
  "total_gross_amount": "23.00",
  "undiscounted_total_gross_amount": "23.00",
  "weight": "2.0kg"
}
```

**System information**
<!-- Provide the version of Saleor or whether you're using it from the `main` branch. If using Saleor Dashboard or Storefront, provide their versions too. -->
Saleor version:
- [ ] dev (current main)
- [x] 3.0
- [ ] 2.11
- [ ] 2.10

Operating system:
- [ ] Windows
- [ ] Linux
- [x] MacOS
- [ ] Other



Discussion:
Thanks for flagging this, we'll make sure the number is available. In the meantime, I encourage you to look at [GraphQL subscription queries for webhooks](https://docs.saleor.io/docs/3.x/developer/extending/apps/subscription-webhook-payloads) that allow you to decide what information becomes part of your webhooks payload.

Resolving patch:
diff --git a/saleor/webhook/payloads.py b/saleor/webhook/payloads.py
--- a/saleor/webhook/payloads.py
+++ b/saleor/webhook/payloads.py
@@ -296,6 +296,7 @@ def generate_order_payload(
     extra_dict_data = {
         "id": graphene.Node.to_global_id("Order", order.id),
         "token": str(order.id),
+        "number": order.number,
         "user_email": order.get_customer_email(),
         "created": order.created_at,
         "original": graphene.Node.to_global_id("Order", order.original_id),


Test patch:
diff --git a/saleor/webhook/tests/test_webhook_payloads.py b/saleor/webhook/tests/test_webhook_payloads.py
--- a/saleor/webhook/tests/test_webhook_payloads.py
+++ b/saleor/webhook/tests/test_webhook_payloads.py
@@ -145,6 +145,7 @@ def test_generate_order_payload(
         "id": graphene.Node.to_global_id("Order", order.id),
         "type": "Order",
         "token": str(order.id),
+        "number": order.number,
         "created": parse_django_datetime(order.created_at),
         "status": order.status,
         "origin": order.origin,