1C: for the programmer

The 1C app is a ready extension TehProfDialogs: nothing has to be programmed for it to work. This page is for when you need more: what you can add yourself and what must not be changed.

What you can extend yourself

A command on another document or catalog. The app opens the window for a counterparty. In your own extension add a command that takes the counterparty from your document and opens the same form with the Контрагент parameter:

&НаКлиенте
Процедура ОбработкаКоманды(ПараметрКоманды, ПараметрыВыполненияКоманды)
	Контрагент = КонтрагентДокумента(ПараметрКоманды);
	ОткрытьФорму("Обработка.TPDialogs_Приложение.Форма.Форма",
		Новый Структура("Контрагент", Контрагент), , Контрагент);
КонецПроцедуры

&НаСервереБезКонтекста
Функция КонтрагентДокумента(Документ)
	Возврат Документ.Контрагент;
КонецФункции

This is an example: put in your own document and attribute. The command parameter is a reference to the document; the counterparty goes into the form parameter.

Your own phone sources. The app collects phones from the contact information of the counterparty, its contact persons and the partner. The simplest way without programming is to keep numbers there, in records of the «Телефон» (Phone) type. If numbers sit in your own attribute or catalog, move them into the contact information with a one-off processing in your own extension. Passing your own phone list to the window is not possible now.

Your own events through the open API. To send messages from your documents and to receive events (an incoming message, a delivery status) use the open API: the key is created in Settings → API. From 1C send through sending messages, receive events through webhooks: for example, create a document on an incoming message or send a payment reminder.

What not to touch

  • The TPDialogs_ common modules are the app’s internals: their calls may change in a new version without notice.
  • Rely only on the form Обработка.TPDialogs_Приложение.Форма.Форма with the Контрагент parameter, as in the example.
  • The app does no data exchange and writes nothing to the base: if you need that, do it through the API in your own extension.

Install TehProf Dialogs in your CRM

Installing the app and connecting WhatsApp by QR code are free. The line subscription is billed separately.