To Configure Push Notifications

To configure push notifications, you use the Push Notifications (SM302000) form.

This topic describes how to configure push notifications for the following notification destinations: webhook (HTTP address), message queue, and SignalR hub. For details about how to configure MYOB Advanced to send push notifications to commerce push destination, see Step 1: Defining the Data for Real-Time Synchronization.

You can configure as many push notifications as you wish; there is no limit to their number.

Before You Proceed

You need to define the data query or data queries for which MYOB Advanced should send notifications on data changes. Each data query can be defined by either a generic inquiry or a built-in definition. For details on generic inquiries, see Managing Generic Inquiries. For information on how to create a built-in definition, see To Create a Built-In Definition. For details on defining the data queries, see Recommendations for the Data Queries.

You should also identify the notification destination that your external application will scan, which can be one of the following: webhook (HTTP address), message queue, or SignalR hub. For more information on the notification destinations, see Push Notification Destinations. You should configure your external application so that it can process notifications sent to the destination.

To Send Notifications to an HTTP Address

  1. Open the Push Notifications (SM302000) form.
  2. In the Destination Name box, type the name of the target notification destination, which can be the name of your external application.
  3. In the Destination Type box, select Webhook.
  4. In the Address box, type the HTTP address to which MYOB Advanced should send the push notifications, such as http://localhost:80/main.aspx?pushqueue.
  5. Optional: In the Header Name and Header Value boxes, specify the header of the HTTP POST request in which MYOB Advanced sends the notification.
    Note: Do not specify the Accept and Content-Type headers for the request. The values of these headers are specified automatically by the system.
  6. For each generic inquiry for which you want MYOB Advanced to send notifications on changes in the inquiry results, do the following on the Generic Inquiries tab:
    1. On the table toolbar of the Inquiries table, click Add Row. The new row has the Active check box selected.
    2. In the Inquiry Title column of the added row, select the generic inquiry for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the generic inquiry, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the generic inquiry are tracked, the system produces push notifications for changes of any field in the results of the generic inquiry, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the generic inquiry, push notifications for changes in other fields are useless for you but consume system resources. Therefore, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the generic inquiry, while the row of the Inquiries table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  7. For each built-in definition for which you want MYOB Advanced to send notifications on changes in the results, do the following on the Built-In Definitions tab:
    1. On the table toolbar of the Definitions table, click Add Row. The new row has the Active check box selected.
    2. In the Class Name column of the added row, select the class that defines the data query for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the data query defined by the class, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the data query are tracked, the system produces push notifications for changes of any field in the results of the data query, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the data query, push notifications for changes in other fields are useless for you but consume system resources. Therefore, in this case, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the data query, while the row of the Definitions table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  8. On the form toolbar, click Save.

To Send Notifications to a Message Queue

  1. Open the Push Notifications (SM302000) form.
  2. In the Destination Name box, type the name of the target notification destination, which can be the name of your external application.
  3. In the Destination Type box, select Message Queue.
  4. In the Address box, type the address of the local or remote private Microsoft message queue that you have configured for receiving messages from MYOB Advanced, such as MyComputer\private$\TestQueueForPushNotificatons.
  5. For each generic inquiry for which you want MYOB Advanced to send notifications on changes in the inquiry results, do the following on the Generic Inquiries tab:
    1. On the table toolbar of the Inquiries table, click Add Row. The new row has the Active check box selected.
    2. In the Inquiry Title column of the added row, select the generic inquiry for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the generic inquiry, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the generic inquiry are tracked, the system produces push notifications for changes of any field in the results of the generic inquiry, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the generic inquiry, push notifications for changes in other fields are useless for you but consume system resources. Therefore, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the generic inquiry, while the row of the Inquiries table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  6. For each built-in definition for which you want MYOB Advanced to send notifications on changes in the results, do the following on the Built-In Definitions tab:
    1. On the table toolbar of the Definitions table, click Add Row. The new row has the Active check box selected.
    2. In the Class Name column of the added row, select the class that defines the data query for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the data query defined by the class, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the data query are tracked, the system produces push notifications for changes of any field in the results of the data query, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the data query, push notifications for changes in other fields are useless for you but consume system resources. Therefore, in this case, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the data query, while the row of the Definitions table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  7. On the form toolbar, click Save.

To Send Notifications to a SignalR Hub

  1. Open the Push Notifications (SM302000) form.
  2. In the Destination Name box, type the name of the target notification destination, which can be the name of your external application.
  3. In the Destination Type box, select SignalR Hub. The Address box is filled in automatically with PushNotificationsHub.
  4. For each generic inquiry for which you want MYOB Advanced to send notifications on changes in the inquiry results, do the following on the Generic Inquiries tab:
    1. On the table toolbar of the Inquiries table, click Add Row. The new row has the Active check box selected.
    2. In the Inquiry Title column of the added row, select the generic inquiry for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the generic inquiry, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the generic inquiry are tracked, the system produces push notifications for changes of any field in the results of the generic inquiry, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the generic inquiry, push notifications for changes in other fields are useless for you but consume system resources. Therefore, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the generic inquiry, while the row of the Inquiries table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  5. For each built-in definition for which you want MYOB Advanced to send notifications on changes in the results, do the following on the Built-In Definitions tab:
    1. On the table toolbar of the Definitions table, click Add Row. The new row has the Active check box selected.
    2. In the Class Name column of the added row, select the class that defines the data query for which you want MYOB Advanced to send notifications.
    3. Do one of the following:
      • If you want the system to send push notifications for changes in any field in the results of the data query defined by the class, select the Track All Fields check box in the added row.
        Note: If all fields in the results of the data query are tracked, the system produces push notifications for changes of any field in the results of the data query, which can cause overflow of the push notification queue. If you need to track only particular fields in the results of the data query, push notifications for changes in other fields are useless for you but consume system resources. Therefore, in this case, we recommend that you specify particular fields to be tracked in the Fields table.
      • If you need to track only particular fields in the results of the data query, while the row of the Definitions table is still selected, do the following in the Fields table for each field that you need to track:
        1. On the table toolbar, click Add Row.
        2. In the Table Name column of the added row, select the name of the table that contains the field that the system should track.
        3. In the Field Name column, select the name of the field that the system should track.
  6. On the form toolbar, click Save.