> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On Customer Custom Attribute Definition Owned Deleted

> A custom attribute definition owned by your application was deleted. Note that only the definition owner can delete a custom attribute definition. This event replaces the deprecated customer.custom_attribute_definition.deleted event.

`square.onCustomerCustomAttributeDefinitionOwnedDeleted` subscribes to `customer.custom_attribute_definition.owned.deleted` for the selected seller. It requires `CUSTOMERS_READ`.

## Example

```ts automations/square-on-customer-custom-attribute-definition-owned-deleted.automation.ts theme={null}
import { automation } from "automate.ax"
import { square } from "automate.ax/square"

export default automation(
  "onCustomerCustomAttributeDefinitionOwnedDeleted",
  () => {
    const event = square.onCustomerCustomAttributeDefinitionOwnedDeleted()

    // Send event to the Square-aware order, CRM, or messaging action you use.
  },
)
```

## Event

A custom attribute definition owned by your application was deleted. Note that only the definition owner can delete a custom attribute definition. This event replaces the deprecated customer.custom\_attribute\_definition.deleted event.

The signal resolves to the official `Square.CustomerCustomAttributeDefinitionOwnedDeletedEvent` payload with `type` narrowed to `customer.custom_attribute_definition.owned.deleted`.
