Documentation

Badges in Kanban

Scope: catalog Permissions to execute: for all

Description

Badge inside Kanban is a field that has special appearance and allowing to mark Kanban elements that require attention. Adding several badges to an element, only one badge added the latest will be displayed.

The product uses several standard badges for various scenarios.

You can add a configurable activity in deals and other CRM entities. In case, badgeCode for such activity contains code for one of registered badges, then this badge will be displayed in entity kanban with associated activity until the activity is closed.

crm.activity.badge.get

crm.activity.badge.get(code: string)

Badge details.

Parameters

Parameter Description Type
code Badge code

Method returns an array containing badge fields.

Example:

{
  "code": "missedCall",
  "title": {
    "en": "Call status"
  },
  "value": "Missed",
  "type": "failure"
}

crm.activity.badge.list

crm.activity.badge.list()

List of available badges.

No parameters.

Method returns an array, containing list of all registered badges. Each array element contains badge fields.

crm.activity.badge.add

crm.activity.badge.add(code: string, title: string|array, value: string|array, type: string)

Add a badge.

Parameters

Parameter Description Type
code Badge code
title Badge title. Can be both a string and array with strings for various languages.
value Badge title. Can be both a string and array with strings for various languages.
type badge type

Only CRM admin has access to execution of this method.

crm.activity.badge.delete

crm.activity.badge.delete(code: string)

Delete a badge

Parameters

Method Description Type
code Badge code

Only CRM admin has access to execution of this method.

Badge record fields

Method Description Type
code Badge code
title Badge title. Can be both a string and array of strings for various languages. string/array
value Badge title. Can be both a string and array of strings for various languages. string/array
type Badge type string

In case title or value contains an array, the keys must be language codes and values - text with these languages. For example:

{
  "en": "Alarm"
}

In case the translation for the current language is not found, uses English language. If English is not found, uses the first array element.

Type of badge can have the following values:

  • success - Green background
  • failure - Red background
  • warning - Yellow background
  • primary - Blue background
  • secondary - Grey background

© «Bitrix24», 2001-2024