Automation Rules
Automation rules are used to monitor information about SIM cards and data pools. When the conditions are met, the system will send SMS or email notifications to you at the specified interval. Currently, you can monitor the number of days before the physical SIM card expires, as well as the used and remaining data of the SIM card or data pool.
Creating a Rule
Log in to the GSL console and choose Automation Rules in the navigation pane. Click Create Rule.
Parameter |
Description |
---|---|
Rule Name |
You can customize the name of a rule for easy management. |
Rule Type |
Order management, Usage monitoring, Card status monitoring, and Data pool monitoring are available. |
Trigger |
Triggers are classified into the following types:
|
Condition |
Trigger conditions are classified into the following types:
|
Action |
After a rule is triggered, available notification modes are as follows:
|
Filter |
By default, all SIM cards in your account are monitored. You can use a filter to specify the objects to be monitored.
|
Execution Records
Log in to the GSL console, choose Automation Rules in the navigation pane, and click the Execution Records tab.
All rule execution records are displayed. You can view the cards that trigger the rule, triggering conditions, and email addresses or SMS recipients that receive notifications.
Push Addresses
Log in to the GSL console, choose in the navigation pane, and click the tab. Click Add Address, enter information as required, and click Test.
You can view and manage existing push addresses on the Push Addresses page.
Parameter |
Description |
---|---|
Push Address |
URL of the push address. |
Certificate File Name |
Server certificate (in .pem format) corresponding to the URL. |
API Push Packet
Push body parameters
Parameter |
Type |
Description |
---|---|---|
cid |
string |
Container ID. |
ruleType |
int |
Rule types:
|
templateName |
string |
Template names:
|
templateParams |
list |
Template parameter set. It is recommended that you parse the parameter set based on the key value. Other key values may be added later. |
SIM card plan expiration (api_rule_price_plan_expired)
[GSL] Dear {accountName}, your SIM card (container ID: {cid}, plan name: {pricePlanName}) will expire in {daysToExpire} days. Please renew it in time.
{ "cid": "4441380627973120", "ruleType": 1, "templateName": "api_rule_price_plan_expired", "templateParams": [ { "key": "cid", "value": "4441380627973120" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "poolId", "value": "0" }, { "key": "daysToExpire", "value": "9" } ] }
Data usage per period (api_rule_flow_usage_remain)
[GSL] Dear {accountName}, your SIM card (container ID: {cid}, plan name: {pricePlanName}) has less than {remainFlow} MB data. Monitor your usage to avoid disconnection.
{ "cid": "4441380627973120", "ruleType": 1, "templateName": "api_rule_flow_usage_remain", "templateParams": [ { "key": "cid", "value": "4441380627973120" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "remainFlow", "value": "100" } ] }
Card status change (api_rule_sim_status_modify)
[GSL] Dear {accountName}, your SIM card (container ID: {cid}) changed from {oldStatus} to {newStatus} at {modifyTime}.
{ "cid":"2021080621060000T", "ruleType":4, "templateName":"api_rule_sim_status_modify", "templateParams":[ { "key":"cid","value":"2021080621060000T" }, { "key":"modifyTime","value":"2022-05-16 03:24:08" }, { "key":"oldStatus","value":"Inactive" }, { "key":"newStatus","value":"Activatable" } ] }
Pool data usage per period (api_sim_pool_rule_flow_usage_remain)
[GSL] Dear {accountName}, your data pool (pool ID: {poolId}, pool name: {poolName}, plan name: {pricePlanName}) has less than {remainFlow} MB data. Monitor your usage to avoid disconnection.
{ "cid": "4441380627973120", "ruleType": 1, "templateName": "api_sim_pool_rule_flow_usage_remain", "templateParams": [ { "key": "poolId", "value": "4441380627973120" }, { "key": "poolName", "value": "xx data pool" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "remainFlow", "value": "100" } ] }
Email template for forward data pool (sim_pool_rule_flow_usage)
[Huawei Cloud] Dear {Account}, your forward data pool (pool ID: {poolId}, pool name: {poolName}, plan name: {pricePlanName}) has used {usageFlow} MB data. Monitor your usage to avoid disconnection.
{ "cid": "null", "ruleType": 3, "templateName": "api_back_pool_rule_flow_usage_remain", "templateParams": [ { "key": "poolId", "value": "4441380627973120" }, { "key": "poolName", "value": "xx data pool" }, { "key": "pricePlanName", "value": "China Telecom Commercial: tiered data pool" }, { "key": "usageFlow", "value": "100" } ] }
Email template for forward data pool (sim_pool_rule_flow_usage_remain)
[Huawei Cloud] Dear {Account}, your forward data pool (pool ID: {poolId}, pool name: {poolName}, plan name: {pricePlanName}) has less than {remainFlow} MB data. Monitor your usage to avoid disconnection.
{ "cid": "4441380627973120", "ruleType": 1, "templateName": "api_sim_pool_rule_flow_usage_remain", "templateParams": [ { "key": "poolId", "value": "4441380627973120" }, { "key": "poolName", "value": "xx data pool" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "remainFlow", "value": "100" } ] }
Email template for backward data pool (back_pool_rule_flow_usage)
[Huawei Cloud] Dear {Account}, your backward data pool (pool ID: {poolId}, pool name: {poolName}, plan name: {pricePlanName}) has used {usageFlow} MB data. Monitor your usage to avoid excessive fees.
{ "cid": "null", "ruleType": 3, "templateName": "api_back_pool_rule_flow_usage_remain", "templateParams": [ { "key": "poolId", "value": "4441380627973120" }, { "key": "poolName", "value": "xx data pool" }, { "key": "pricePlanName", "value": "China Telecom Commercial: tiered data pool" }, { "key": "usageFlow", "value": "100" } ] }
API push template for backward data pool data usage per period (api_back_pool_rule_flow_usage)
[Huawei Cloud] Dear {Account}, your backward data pool (pool ID: {poolId}, pool name: {poolName}, plan name: {pricePlanName}) has used {usageFlow} MB data. Monitor your usage to avoid excessive fees.
{ "cid": "null", "ruleType": 3, "templateName": "api_back_pool_rule_flow_usage_remain", "templateParams": [ { "key": "poolId", "value": "4441380627973120" }, { "key": "poolName", "value": "xx data pool" }, { "key": "pricePlanName", "value": "China Telecom Commercial: tiered data pool" }, { "key": "usageFlow", "value": "100" } ] }
API Merged Push Packet
Push body parameters
Parameter |
Type |
Description |
---|---|---|
ruleType |
int |
Rule types:
|
templateName |
string |
Template names: api_rule_price_plan_expired: template for SIM card plan expiration api_rule_flow_usage_remain: template for data usage per period api_rule_sim_status_modify: template for card status change |
templateParamsList |
array |
A template parameter set that contains information about a maximum of 500 cards. |
templateParamsList.templateParams |
array |
Template parameter set for individual cards. It is recommended that you parse the parameter set based on the key value. Other key values may be added later. |
{ "ruleType": 1, "templateName": "api_rule_price_plan_expired", "templateParamsList": [ { "templateParams": [ { "key": "cid", "value": "4441380627973120" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "daysToExpire", "value": "9" } ] }, { "templateParams": [...] } ... ] }
Data usage per period (api_rule_flow_usage_remain)
{ "ruleType": 2, "templateName": "api_rule_flow_usage", "templateParamsList": [ { "templateParams": [ { "key": "cid", "value": "4441380627973120" }, { "key": "pricePlanName", "value": "China Mobile: 30 MB/month" }, { "key": "usageFlow", "value": "100" } ] }, { "templateParams": [...] } ... ] }
Card status change (api_rule_sim_status_modify)
{ "ruleType": 4, "templateName": "api_rule_sim_status_modify", "templateParamsList": [ { "templateParams": [ { "key": "cid", "value": "2021080621060000T" }, { "key": "modifyTime", "value": "2022-05-16 03:24:08" }, { "key": "oldStatus", "value": "Inactive" }, { "key": "newStatus", "value": "Activatable" } ] }, { "templateParams": [...] } ... ] }
API Push Failure Notification
If you select API push as the notification type and enable the push failure notification, you will receive a notification in the Message Center when a push fails.
Example:
Dear {accountName}, API push of automation rule {ruleName} failed at {pushTime}. Push URL: {pushUrl}. For details, see the attachment. This email is automatically sent by the GSL system. Please do not reply. Thank you for your support.
- If you select API push and Merge Events and Send, the packet is different from that when Merge Events and Send is not selected.
- Merged push is not available for data pool usage notifications.
- The attachment is the content of the packet that fails to be pushed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot