Pushing service updates is a business-to-customer (B2C) message capability. You can use this capability to push real-time updates of orders to users based on codes (which are either HUAWEI IAP order IDs or codes obtained when scenario-specific buttons are tapped on user devices), keeping users informed of their order status and focused on ongoing tasks with glanceable, actionable notifications.
Service updates messages have the following features:
The corresponding real-time event has definite start and end time.
An event or service needs to last for a period of time with the definite start time and end time, rather than an instantaneous event.
For example, ride hailing and food delivery last for a certain period from the start to the end, so they are applicable scenarios of service updates messages. On the contrary, notifications about instantaneous events do not belong to this category.
The corresponding real-time event is time-sensitive.
The message content is a notification of an ongoing event or service. The information is valuable to users only in a specific period.
For example, ride-hailing and food delivery are ongoing, duration-based services. In contrast, when a user purchases an air ticket for a flight in two days, an immediate notification upon purchase is often unnecessary. Instead, a service update message is sent to the user at a predefined interval (determined by actual business requirements) before the flight's scheduled departure.
The corresponding real-time event status keeps changing.
Service updates content needs to be dynamically updated to present users with the latest status of the event.
For example, in the ride hailing scenario, the following status nodes are displayed based on the status changes of the driver and passenger: calling driver, driver on the way, driver arrives at pickup point, heading to destination, pending payment, and payment completed. However, notifications like coupon expiration reminders and call fee top-up reminders do not involve service status changes later and therefore do not belong to service updates messages.
Service updates messages can be displayed in various locations such as the notification panel, lock screen, status bar, and Assistant·TODAY, in either the capsule or widget form. The capsule form is displayed in the status bar, and once tapped, will turn into the floating widget form.
Each scenario template has specific requirements, and only atomic services that meet these criteria are eligible to apply for the corresponding scenario template. (For details about the scenario template parameters, refer to the example in Service Updates Parameters.)
Currently, the following service updates scenario templates are supported.
Scenario ID (sceneId) | Scenario Name | Subscenario ID (subSceneId) | Subscenario Name | Applicable Category | Code Source |
|---|---|---|---|---|---|
10001 | Takeout | 100010001 | Takeout - self-pickup | Food - takeout/fresh food/coffee | HUAWEI IAP order ID |
100010002 | Takeout - delivery | Food - takeout/fresh food/coffee | HUAWEI IAP order ID | ||
10003 | Hotel/Guesthouse check-in | 100030001 | Hotel/Guesthouse check-in | Travel - accommodation/hotel/guesthouse/resort | HUAWEI IAP order ID |
10005 | Number taking and queuing | 100050001 | Number taking | Finance - bank, life service - public service, travel - travel/scenic spot service |
|
100050002 | Registration and treatment | Medical - outpatient appointment/hospital/physical examination |
| ||
100050003 | Queuing for food | Food & drink - restaurant/ordering |
| ||
10011 | Scenic spot reservation | 100110001 | Scenic spot reservation | Travel - scenic spot service/amusement park | HUAWEI IAP order ID |
10018 | Performance reminder | 100180001 | Performance reminder | Entertainment - performance tickets | HUAWEI IAP order ID |
10019 | In-park shuttle | 100190001 | In-park shuttle | Travel - travel/scenic spot service, navigation - transportation & tickets | HUAWEI IAP order ID |
10021 | Ride hailing | 100210001 | Ride hailing | Navigation - cars/ride hailing/taxi/ride sharing/carpooling |
|
10022 | Travel check-in | 100220001 | Check-in route | Travel - travel/trip assistant/travel tips/trip records | HUAWEI IAP order ID |
10023 | Visit reservation | 100230001 | Exhibition venue reservation | Lifestyle |
|
You are required to determine your specific service scenario, and subsequently apply for and integrate the necessary service updates message scenario. For details about available scenarios, please refer to Service Updates Scenario Templates.
You need to apply for the service updates message permission by referring to Applying for the Permission. Once approved, you can start developing.
This code is unique to the service process and serves as the reference identifier for pushing service updates to the corresponding user. There are two methods to obtain the code:
When a user launches the HUAWEI Pay checkout page in your atomic service for payment, you can obtain the payment order ID as the code.
To do so, you need to set the openType of the button component that triggers the service to functionalButtonComponentManager.OpenType.REQUEST_SUBSCRIBE_MESSAGE. When a user taps the button, an authorization code can be obtained.
The system verifies the button component for compliance, including whether the user is misled to tap the button or whether the button is irrelevant to the message card to be activated. Therefore, proper use of the button component is required.
If your atomic service uses a HUAWEI IAP order ID as the code, you need to call the send API on the server side to transfer the initialized message card status and status-related fields (for details, please refer to Pushing the Body of a Service Updates Message) after the payment is complete to activate the code for the first time. In this way, service updates can then be pushed using the send API.
If your atomic service uses the authorization code obtained when a scenario-specific button is tapped as the code, you need to call the send API on the server side to transfer the initialized message card status and status-related fields within 24 hours after the code is obtained to activate the code for the first time. In this way, service updates can then be pushed using the send API.
If the code is not activated within 24 hours after it is obtained, it cannot be used to push service updates messages.
After the code is activated, you can call the send API on the server side to pass the updated message card status and status-related fields (for details, please refer to Pushing the Body of a Service Updates Message). Message card updates are only permitted within the event's validity period. Once the validity period expires, or the event reaches a final status (for example, the status is already "Order completed"), further updates are not allowed.
The specifications of service updates message cards displayed in the notification panel, lock screen, status bar must comply with the live view design specifications. Solutions that do not comply with the design specifications will not be granted the formal permission on service updates messages. To ensure the timeliness of the messages, be sure to update the live view content promptly.
The following uses the self-pickup sub-scenario of the takeout scenario as an example. For details, please refer to the service updates push API.
// Request URL
POST https://push-api.cloud.huawei.com/v1/[projectId]/service_timeline/send
// Request Header
Authorization: Bearer eyJr*****OiIx---****.eyJh*****iJodHR--***.QRod*****4Gp---****
// Request Body
{
"appId": "5**********7",
"toOpenId": "A**********O",
"sceneId": "10001",
"subSceneId": "100010001",
"code": "3**********7",
"content": {
"status": 3,
"expireTime": 60,
"orderTime": 1716191520,
"amount": "¥ 18.00",
"productCount": 1,
"productName": "Mango",
"productImg": "image_test_1",
"merchantName": "Store A",
"pickupNumber": "1668",
"pickupTime": "16:08",
"remainOrders": "5 orders/5 cups",
"waitTime": "10-20 minutes",
"button": {
"type": 1,
"text": "Pickup code",
"action": "https://***",
"uri": "https://***"
},
"clickAction": {
"type": 1,
"action": "https://***",
"uri": "https://***"
},
"appendButtons": [
{
"type": 1,
"text": "Pickup code",
"action": "https://***",
"uri": "https://***"
}
]
}
} For details about the service response codes, please refer to Service Response Codes.


Return to the Manage open capabilities page. The Request button changes to Requesting. The request result will be provided within 1 to 3 working days. Please check the service enabling request information in the interaction center.

After the request is approved, the interaction center will send you a notification, and the status will change from "Requesting" to "Request" (dimmed). The open capability of service updates messages or image resource hosting has been enabled for your app.
