Change the status of a customer from the customer detail page.
npx uiskill install @fan/update-customer-status{
"id": "crm:customer:update-status",
"kind": "atomic",
"name": "Update Customer Status",
"states": {
"error_handle": {
"if": "@toast(type='error')",
"then": "report_status_update_failure"
},
"pre_condition": "current_page ~= '/customers/*' && record_loaded == true",
"success_criteria": {
"type": "field_value_change",
"field": "status",
"match": "{{status}}"
}
},
"anchors": {
"submit": "@button(text='Confirm')",
"trigger": "@button(text='Edit Status')",
"status_field": "@field(name='status')"
},
"uiskill": "0.1.0",
"category": "Record Update",
"parameters": {
"type": "object",
"required": [
"status"
],
"properties": {
"reason": {
"type": "string",
"description": "Optional reason for status change."
},
"status": {
"enum": [
"active",
"prospect",
"inactive",
"archived"
],
"type": "string",
"description": "Target customer status."
}
}
},
"description": "Change the status of a customer from the customer detail page."
}