Messages are needed to store and organize process-related information exchange between among executors and customers: notes, calls, emails.. So that all the history of communications around a process is always available there.
Following settings should be done in the configuration, preferably as an include.
Any message has a type that should be added with the records:
messageType.<ID>.title=<TITLE> messageType.<ID>.class=<CLASS>
Где:
<ID> - unique numeric positive ID, must not change after; there are some recommended values provided for each class;
<TITLE> - type’s title;
<CLASS> - the class of the message type.
The following <CLASS> values are supported in the app’s kernel.
Used for appending process notes. Recommended <ID> is 100
Optional config:
# create notes in unread state #messageType.<ID>.create.unread=1 # do not check empty subject on saving #messageType.<ID>.check.empty.subject=0
Example:
messageType.100.title=Note messageType.100.class=MessageTypeNote
The only single possible message type with the <CLASS> recommended to have <ID> is 50 Notifications about calls itself should be provided by Asterisk plugin or external HTTP requests.
Optional config:
messageType.<ID>.offerNumberFromParamId=<OFFER_NUMBER_FROM_PARAM_ID> # disable automatic registering number from <OFFER_NUMBER_FROM_PARAM_ID> parameter on user login #messageType.<ID>.autoNumberRegister=0
Where:
<OFFER_NUMBER_FROM_PARAM_ID> - ID of user text parameter, containing his number.
That number has been occupied by a user during message processing.
<CLASS> | Plugin | Recommended values of <ID> |
---|---|---|
|
1-49 |
|
BGBilling |
200-249 |
The search modes are used to search objects during message processing, those will be linked to a created process.
Search mode added to a message type with configuration:
messageType.<ID>.search.{@inc:cnt}.title=<TITLE> messageType.<ID>.search.{@cnt}.class=<CLASS>
Where:
<TITLE> - the mode’s title, shown in drop-down;
<CLASS> - the class, implementing its logic, can be one of the following values:
Can be used for any message type, provides search customer by title.
Example:
messageType.1.search.{@inc:cnt}.title=Customer by Title messageType.1.search.{@cnt}.class=MessageTypeSearchCustomerByTitle
Automatically running search mode by calling number of MessageTypeCall
Configuration:
messageType.<ID>.search.{@cnt}.commands=<COMMANDS> # optional messageType.<ID>.search.{@cnt}.expressionNumberPreprocess=<JEXL>
Where:
<COMMANDS> - semicolon-separated command, defining searched objects, possible values:
customerByPhoneParam:<PARAM_IDS> - search customers by comma-separated parameters <PARAM_IDS> with type phone;
<JEXL> - JEXL expression for pre-processing the calling number, passed in numberFrom variable.
Example:
messageType.1.search.{@inc:cnt}.title=Customer by Phone messageType.1.search.{@cnt}.class=MessageTypeSearchCall # search customers by phone parameter with ID=10 messageType.1.search.{@cnt}.commands=customerByPhoneParam:10 # if numberFrom has 11 digits length than cut the first symbol of if off messageType.1.search.{@cnt}.expressionNumberPreprocess=if (numberFrom.length() == 11) { numberFrom = numberFrom.substring(1) }; return numberFrom;
<CLASS> | Plugin | Description |
---|---|---|
|
Search customers by sender email |
|
BGBilling |
Поиск договоров по номеру и примечанию |
|
BGBilling |
Поиск договоров по номеру звонящего в MessageTypeCall |
|
BGBilling |
Поиск договоров по адресу отправителя email MessageTypeEmail |
Contact saver allows to store in the system a message’s address, like calling phone number or sender’s email.
Configuration:
messageType.<ID>.saver.class=<CLASS>
Where <CLASS> can take the following values:
Save the calling phone number of MessageTypeCall to parameter with type phone of process or a linked customer
Configuration:
messageType.<ID>.saver.class=MessageTypeContactSaverPhone messageType.<ID>.saver.paramId=<PARAM_ID>
Where:
<PARAM_ID> - the parameter ID type phone
Example:
messageType.1.saver.class=MessageTypeContactSaverPhone messageType.1.saver.paramId=37
Colored message tags allow to separate messages in process tab. Example of configuration:
tag.1.title=Access tag.1.color=red tag.2.title=Requirements tag.2.color=green tag.3.title=TODO tag.3.color=magenta
Message Templates allow to create pre-defined subject and text content, to begin typical messages.
To add a template, add the following configuration block.
message.template.{@inc:cnt}.title=<TITLE> message.template.{@cnt}.subject=<subject> message.template.{@cnt}.text=<text>
All the values are self-explainable, here is the sample of configured template.
// PzdcDoc snippet of: 'MessageTest.config.txt', lines: 33 - 39
message.template.{@inc:cnt}.title=Greetings from BGERP
message.template.{@cnt}.subject=Hello from BGERP
message.template.{@cnt}.text=<<END
Dear Friend,
the Team BGERP wishes you all the best!
END
And how does it look like.
You can see (message Kernel Message Possible Process Unprocessed message) the feature operation in Demo System. The configuration for that has the name Kernel Message Possible Process. |
To configure Possible Processes to be found during message processing add to configuration following blocks:
message.possible.process.<ID>.class=<CLASS> message.possible.process.<ID>.color=<color>
Where:
<ID> - unique block’s numeric ID, found processes are sorted by the IDs
<color> - optional HTML color for table rows with found processes
<CLASS> - search type, one of the following values:
MessagePossibleProcessSearchMessageFrom - processes with messages from the same from address (Email sender or calling number) as the processed message.
MessagePossibleProcessSearchFoundLinks - processes with the same links as found for the processed message.
MessagePossibleProcessSearchFoundLinksCustomerAddressCity - processes with a list parameter values, matching to city IDs of address parameter of found customers. That type requires additional properties set:
processCityParamId, ID of the list parameter.
BGBillingMessagePossibleProcessSearchFoundLinksContractAddressCity - processes with a list parameter values, matching to city IDs of address parameter of found contracts in BGBilling system. That type requires additional properties set:
processCityParamId, ID of the list parameter;
contractAddressParamId.<billingId>, ID of address parameter in BGBilling system with ID <billingId>.
If no block is defined then a single ones with class MessagePossibleProcessSearchMessageFrom is added. |
Recieving new process messages and sending them does scheduler task Kernel Message Exchange. Optional task’s configuration:
messageTypeIds - comma-separated message type IDs for only those the exchange must be executed.
Основное назначение - первичная обработка сообщений с привязкой к вновь созданным, либо существующим процессам. В обработке нуждаются не все сообщения, в данный момент она используется для Email ов и звонков. Обработка звонка открывается автоматически, Email ы необходимо открывать в оснастке вручную.
Уведомление о количестве необработанных сообщений выводится в области уведомлений. |
Сообщение считается обработанным после того, как к нему привязан процесс. Помимо этого сообщение можно удалить. В выпадающем списке можно выбрать фильтр по типу сообщений. В квадратных скобках рядом с типом отображается число необработанных сообщений каждого типа.
При клике по строке открывается обработка сообщения, внешний вид может быть следующим для звонка.
Либо для Email.
In the left bottom area during message processing are shown possible processes, that can be assinged for the message using set links.
Отображение вкладки сообщений должно быть настроено в конфигурации типа процесса.
Для создания сообщения в рамках процесса используйте кнопку Создать.
Доступен фильтр по сообщениям со вложениями и тегам. Теги позволяют маркировать каждое сообщение определёнными метками, позволяющими их позже легко найти, например: "TODO", "Реквизиты".
Кнопка M рядом с каждым сообщением вызывает всплывающее меню с операциями:
Вкл./выкл. разрывы строк - перенос длинных строк в сообщениях либо отображение скроллинга;
Теги - установить теги на выбранное сообщение.
Изменить процесс на - привязать сообщение к другому процессу:
Другой существующий - по коду уже существующего процесса;
Независимую копию текущего - создаётся новый процесс, копия текущего, в него копируются все привязки;
Зависящую копию текущего - создаётся новый процесс, копия текущего и привязанный к нему с типом processDepend;
Порождённую копию текущего - создаётся новый процесс, копия текущего и привязанный к нему с типом processMade;
Ссылаемую копию текущего - создаётся новый процесс, копия текущего и привязанный к нему с типом processLink.
Ответить - создать новое сообщение, являющееся ответом на выбранное и также привязанное к текущему процессу;
Редактировать - редактировать сообщение, если тип поддерживает;
Удалить - удалить сообщение, если тип поддерживает.
Пометку процессов с новыми сообщениями можно реализовать переключением статуса процесса по событию поступления сообщения.