Get Klasses
/v1/klassesorg.permission.klass.readThe API key or user must hold at least one of them. Legacy roles still work; prefer the others for new keys.
Retrieves all Klasses.
Filter by status
You can filter results based on the status of the Klass. Valid values are enabled, existing_only, and disabled. The default value is enabled.
Klasses
A Klass is a custom object type that you define, such as "Order" or "Subscription", with its own name, icon, color and attributes. Each record of that type is a KObject.
Kustomer's built-in objects cover customers, companies and conversations. A Klass adds a new type of object for data from your own systems: orders, flight bookings, devices, returns. The Klass is the definition; the records themselves are KObjects. For example, the ecomm-order Klass defines what an order looks like, and order #4417 is one KObject of that Klass. Admins manage Klasses in Kustomer's settings, and apps usually ship theirs in the app definition so every org that installs the app gets the same type.
A Klass is created once, then its attributes are defined by setting custom attribute metadata on the resource kobject.<name>, such as kobject.ecomm-order. The attribute names' suffixes set their types, for example orderStatusStr or totalPriceNum.
Key fields
| Field | Meaning |
|---|---|
name |
The system name used in KObject paths, such as /v1/klasses/ecomm-order. Letters, digits, _ and -, unique in the org. It can't be changed after creation, so prefix it with your app or company name. |
displayName |
The label agents see. |
icon, color |
The icon (a Material Design Icons name, such as basket) and color used on timeline cards. |
status |
enabled or disabled. |
klassSchema |
Set to task to make the Klass a task type. Its KObjects then track status (open or done), assignment and completion times. |
mixins |
Agent-facing features to turn on for the Klass's records (see below). |
Mixins
| Mixin | Effect |
|---|---|
creatable |
Agents can create records of this Klass in Kustomer. |
editable |
Agents can edit the records' attributes in Kustomer. |
assignable |
Records can be assigned to users and teams, and used in routing queue rules. |
commentable |
Agents can add comments to the records. |
Which endpoint to use
| To | Call |
|---|---|
| List the org's Klasses | GET /v1/klasses |
| Define a new custom object type | POST /v1/klasses |
| Read or update a Klass | GET or PUT /v1/klasses/{id} |
| Remove a Klass that has no records | DELETE /v1/klasses/{id} |
Klass endpoints take the Klass's ID, while KObject endpoints take its name, so keep both. GET /v1/klasses returns only enabled Klasses by default; pass status (enabled, existing_only or disabled) to list others, or name to find one by name. You can't delete a Klass while any KObjects of it exist, so delete or migrate those first.
Query parameters
Page number of results to return.
1Number of results to return per page.
100Filter by exact or service-specific resource name.
"customer"Filter by resource status.
"enabled"Responses
OK