Push Notification Destinations

When you configure a push notification on the Push Notifications (SM302000) form of MYOB Advanced, you select the type of the notification destinations, which can be any of the predefined types described in this topic. You can also create your own destination type, as described in To Create a Custom Destination Type in the MYOB Advanced Framework Developer Guide.

Webhook

A webhook is an HTTP address to which MYOB Advanced sends HTTP POST requests with notification information. For this destination type, you specify a valid HTTP address (such as http://localhost:80/main.aspx?pushqueue) in the Address box on the Push Notifications (SM302000) form. For security reasons, you can specify a header of the HTTP request in the Header Name and Header Value boxes.
Note: Do not specify the Accept and Content-Type headers for the request. The values of these headers are specified automatically by the system.

If an integrated application returns an error in reply for a push notification, the push notification is resent. If your application processed the request and sent an error in the reply, your application receives the same push notification again, which can lead to duplicate data in the application. Therefore, you should not reply with an error if a push notification is successfully received.

MYOB Advanced makes at most five attempts to send a push notification automatically. If MYOB Advanced cannot send notifications to the HTTP address, MYOB Advanced logs information on the failed notifications and displays these notifications on the Process Push Notifications (SM502000) form. You can resend the failed notifications for two days, after which the notifications are removed from the MYOB Advanced database. For details on how to resend notifications, see To Process Failed Notifications.

Message Queue

The message queue is a local or remote private Microsoft message queue. You specify the address of the message queue (such as MyComputer\private$\TestQueueForPushNotificatons) in the Address box on the Push Notifications (SM302000) form. For information on how to configure a private Microsoft message queue, see the Microsoft documentation.

The message queue is the most reliable destination type protected from network failures. However, if MYOB Advanced cannot send notifications to the message queue in five attempts, MYOB Advanced logs information about the failed notifications and displays these notifications on the Process Push Notifications (SM502000) form. You can resend the failed notifications for two days, after which the notifications are removed from the MYOB Advanced database. For information on how to resend notifications, see To Process Failed Notifications.

SignalR Hub

The SignalR hub is the destination type implemented in MYOB Advanced by using the ASP.NET SignalR library. The address of this destination type is PushNotificationsHub, which is filled in automatically in the Address box on the Push Notifications (SM302000) form. This destination type can be used if you can expose neither an HTTP address (webhook) nor a message queue to receive push notifications. If MYOB Advanced is configured to send notifications to the SignalR hub, the external application can connect to MYOB Advanced through websoket or a long-polling mechanism and receive notifications through this connection. If multiple external applications are connected to the SignalR hub, they receive notifications simultaneously. For information on how to connect your application to the SignalR hub of MYOB Advanced, see To Connect to the SignalR Hub.

The SignalR hub destination type is not reliable: If the connection fails or there are no clients connected to the SignalR hub when a notification comes, this notification will not be sent and it cannot be resent later.

Commerce Push Destination

The commerce push destination is a local private Microsoft message queue that is used for notifications sent to a commerce connector. The address of this destination type is Commerce, which is filled in automatically in the Address box on the Push Notifications (SM302000) form. For details about commerce push notifications, see Real-Time Synchronization Through Webhooks and Push Notifications in the Plug-In Development Guide.

As mentioned previously, MYOB Advanced makes at most five attempts to send a push notification automatically. If MYOB Advanced cannot send notifications to the commerce push destination for some reason, MYOB Advanced logs information about the failed notifications and displays these notifications on the Process Push Notifications (SM502000) form. You can resend the failed notifications for two days, after which the notifications are removed from the MYOB Advanced database. For information on how to resend notifications, see To Process Failed Notifications.