Documentation

onOfflineEvent

Event that notifies about new offline events with specific frequency.

Application can subscribe to 2 types of events:

  • Standard: event call external URL and action defined by this address is executed.
  • Offline: instead of external URL, event is saved locally on a Bitrix24 account, to be retrieved later by the methods event.offline.*.

Upon saving locally, the onOfflineEvent event calculates the necessity of sending notification and then sends it as standard event to an external URL.

Find more details on offline events Application may not always be able to receive events. It can be hidden by firewalls, operate within intranet and etc. In this case, an offline event mechanism is employed, when the application subscribes to events, but does not specify handler's URL.

Learn more ...
.

Parameters

Parameter Description Available from version
minTimeout Timeout in seconds. Default period is 1 seconds. When parameter value:

When equals to 0, independently from number of events added into offline queue, sends only 1 event to the handler event;
When higher than 0, sends a single event upon first triggering. Then, a pause is made for a minimum of timeout period until a next event is sent.

Example

CRest::call(
    'event.bind',
    [
       'event' => 'ONOFFLINEEVENT',
       'handler' => 'https://example.com/handler.php',
       'options' => [
           'minTimeout' => 30,
       ]
   ]
);

User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix24», 2001-2021