uiskill.sh

Update Customer Status

Change the status of a customer from the customer detail page.

Record Updateatomic0 installs

Install (v0.1.0)

npx uiskill install @fan/update-customer-status

JSON Spec

{
  "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."
}