2Notify Instructions for Partners

Prev Next

2Notify – a Microsoft Dynamics 365 Business Central solution that allows users to receive all necessary information in real time about updates, errors, and training.

What do I need in order to send notifications to my clients?

  1. Create an Entra user in the Microsoft 365. Instructions on how to do this here.
  2. Create or locate the environment from which you will act as the provider and send notifications.
  3. Install 2Notify both in your own environment and in your clients’ environments. You can install it from AppSource.
  4. Create 2Notify categories and assign yourself the necessary 2Notify permissions.
  5. In a test environment or at the client’s site, create your own supplier account.

2Notify categories and permission assignment

In the Supplier environment, go to the 2Notify User Setup page and assign your user the permissions to edit the 2Notify product:

image.png

In the Supplier environment, go to the Notification Categories (2Notify) page and create the desired notification categories (for example: Product Names, Marketing, Information, Updates, etc.):

image.png

That's it - the 2Notify product is now ready to use and deploy to clients.

Creating a supplier account at the client’s site

Important

Before you start installing 2Notify for clients, it must be installed first. We recommend doing this manually, or alternatively, creating dependencies for your own product so that the 2Notify product is installed automatically during installation or update. Read more about this below.

  1. Go to the 2Notify Setup page and, under the Suppliers section, click New:

image.png

This window will open, and you need to fill it in:

image.png

Info

When we have the Business Central environment URL https://businesscentral.dynamics.com/6ffe1a2f-2f82-880d-9abc-8ga150b8884a/2Notify_PROD, then:

  • Entra Tenant Id: 6ffe1a2f-2f82-880d-9abc-8ga150b8884a
  • BC Environment Name: 2Notify_PROD
Field Description
General
Code Enter the supplier name.
Description Provide a description of the supplier.
Authentication Type Select OAuth2.
Blocked Leave empty. If you want to block the supplier, set this to True.
Authentication OAuth2
Entra Tenant Id Specify the Tenant ID of the environment from which notifications will be sent.
BC Environment Name Specify the name of the environment from which notifications will be sent.
Entra App Client Id Enter the App Client ID you created.
Client Secret Enter the Entra App Client Secret code.
API
Notifications API URL This will be filled in automatically after generating URLs using the "Generate URL's" function.
Categories API URL This will be filled in automatically after generating URLs using the "Generate URL's" function.

Once all the data is filled in, click the Generate URL's function:

image.png

When you click this function, you will need to enter the GUID code (Company ID) of the supplier environment's company, which you can find by going to Companies and pressing CTRL + ALT + F1:

image.png

Once everything is filled in and the URLs have been successfully generated, you can export the Supplier file and import it for your other clients:

image.png

2Notify job queues

In order for notification delivery and 2Notify category updates to function properly, job queues must be running on the client side. Each time a client logs in, they will be prompted with a message indicating that one or more 2Notify job queues are not active. With a single click, they will be able to activate them, and notifications will begin to be received.

The message shown to the client looks like this:

image.png

When the client clicks Continue, they are prompted to activate the job queues with a single button click:

image.png

There are two job queues, and they are created automatically when the 2Notify product is installed in Business Central:

image.png

Once the client activates the job queues, notifications and categories will be updated every 240 minutes.

Important

If the job queues stop working, an error will occur, and users logged into Business Central will receive a notification prompting them to re-enable the job queues.

Automatic 2Notify installation for your clients

You can add dependencies to 2Notify in your own product. This way, when installing or updating your product, 2Notify will be installed automatically as well:

Code
{
    "id": "3ed3b7e1-3819-430f-8ace-4eae00778650",
    "name": "2Notify",
    "publisher": "Softera Baltic",
    "version": "25.0.2.0"
}

Additionally, during the installation or update of your product, you can configure it so that the supplier account is automatically created on the client’s side, eliminating the need to do it manually:

Code
procedure Add2NotifySetup()
var
    S2NotifySetup: Record "SLE2N 2Notify Setup";
    S2NotifySupplier: Record "SLE2N Notification Supplier";
    ClientSecret: SecretText;
begin
    if not S2NotifySetup.Get() then begin
        S2NotifySetup.Init();
        S2NotifySetup.Validate("Is Notification Reciever", true);
        S2NotifySetup.Validate("Popup Enabled", true);
        S2NotifySetup.Insert(true);
    end else
        if not S2NotifySetup."Is Notification Supplier" then begin
            S2NotifySetup.Validate("Is Notification Reciever", true);
            S2NotifySetup.Modify(true);
        end;

    if S2NotifySetup."Is Notification Supplier" then
        exit;

    if not S2NotifySupplier.Get('NAME') then begin // Replace 'NAME' with actual supplier code you want to use
        S2NotifySupplier.Init();
        S2NotifySupplier.Validate("Code", 'NAME'); // Replace with actual code
        S2NotifySupplier.Validate(Description, 'Display Name'); // Replace with actual display name
        S2NotifySupplier.Insert(true);
    end;

    S2NotifySupplier.Validate("Authentication Type", Enum::"SLE2N Authentication Type"::OAuth2);
    S2NotifySupplier.Validate("Entra Tenant Id", '00000000-0000-0000-0000-000000000000'); // Replace with actual tenant ID
    S2NotifySupplier.Validate("BC Environment Name", 'Environment_Name'); // Replace with actual environment name
    S2NotifySupplier.Validate("Entra App Client Id", '00000000-0000-0000-0000-000000000000'); // Replace with actual client ID
    ClientSecret := Format('Client_Secret'); // Replace with actual client secret
    S2NotifySupplier.SetClientSecret(ClientSecret);

    S2NotifySupplier."Notifications API URL" := 'url_to_notifications_api'; // Replace with actual API URL
    S2NotifySupplier."Categories API URL" := 'url_to_categories_api'; // Replace with actual API URL
    S2NotifySupplier.Modify(true);
end;