Setup in Head Office
In this article
To set up web replication using Azure Storage Account you need the following setup:
Retail Setup
The Preaction Creation by field must have the values Database Triggers:
Scheduler Setup
In the Scheduler Setup page, in the General FastTab, you must configure the following:
- Activate the Replicate using Preactions check box.

This ensures that preactions are created with the correct Location Group Filters that will enable replication based on preactions.
-
Set up the control location in the Azure Storage Control Location field.
Normally, you should select the HEADOFFICE value. This is the source distribution location that is the location holding the control information about data packages.
Note: In the Configuration Packages provided by LS Retail, Distribution Locations are included in the replication jobs, so you need to make sure that the Web Server FastTab in the Distribution Location Card is properly set up. You should use the Test Web Connection action to test that. If the setup is not correct, the POS might not be able to communicate with the Head Office, and you need to review the Web Server FastTab setup for the Azure Storage Control Location, in the POS terminal.
Azure Storage Account Setup
In the Scheduler Setup page, click the Setup action, then click Web Replication Azure Storage Setup.
Here you set up the Azure Storage Account and Container to use:
-
Account Name: Enter the Azure Storage Account name;
-
Container ID: Enter the name for the container that was created in the Azure Storage Account. This container will be used to store the packet (json files) created with the master/setup data to be replicated. If a container was not created, a container with the name in the field will be automatically created when running the replication job;
-
Account Key: Enter the Access Key for the Azure Storage Account. You can get it from the Storage account, under Security + networking -> Access keys -> key1 -> Key.
Note: Before you define access to Azure Storage, you must create a storage account in Azure. Refer to How to: Set Up an Azure Storage Account for detailed instructions on setting up an Azure Blob Storage account.
Web Replication Azure Storage Setup is only required on the HO and should not be replicated to the POS. The required information for the POS to connect to Azure Storage and to the specific file(s) to be fetched is included in the HO response when the POS connects to HO asking for new packages.
Distribution Locations
Source Distribution Location
Create a new distribution location for the source data location (usually this is the headoffice).
Fill in the following fields in the Distribution Location Card as shown:
General FastTab:
-
Code: HEADOFFICE
-
Description: Head Quarters (Cloud)
-
Distribution Group: ALL
Web Server FastTab:
- Web SSL: Enabled
- Web Server SaaS: Enabled
- Web Server Computer Name: api.businesscentral.dynamics.com
- Web Server Version: v2.0
- Web Server Tenant: The SaaS environment tenant ID.
- Web Service Environment Name: Environment name to where the transactional data from the POS is going to be replicated to.
- Web Service Company Name: Company name to where the transactional data from the POS is going to be replicated to.
- Web Service URI: No need to update as it should be automatically filled in when filling the other fields.
- Web Server AuthType: S2S
- Web Service Client ID: The Entra Application (former Azure Active Directory app) ID created for the S2S authentication.
- Web Service Client Secret: The Entra Application client secret.
Web Replication FastTab:
- Web Replication Method: Leave this field as it is.
Note: The Web Replication Method field only applies to distribution locations that receive replicated master/setup data, which are typically the POSs. It tells the web replication module how to deliver data to that location.
Since the HEADOFFICE location is the source of the master/setup data, this field is generally not used for that location. An exception would be when a replication job needs to be configured to replicate data from the POSs to HEADOFFICE, which is not a common requirement.
Note that this does not apply to transaction replication, which relies on the methods described in Send Transactions. The location that holds the control information for the data packages is specified in the Azure Storage Control Location field on the Scheduler Setup page.
If you are following the documentation (see Offline POS) on how to set up a new Offline POS using Update Service, the HEADOFFICE Distribution Location Card is included in the installation process, and the fields in the Web Server FastTab are populated during the POS installation.
POS Distribution Locations
The Web Replication Method field is relevant for the distribution locations that receive the packages. For each Distribution Location related to a POS, define which locations take part in the Azure Storage replication:
- Navigate to the Distribution Location Card, and in the Web Replication FastTab, set the Web Replication Method to Azure Storage.
Note: For the POS Distribution location it is not required to fill in the Web Server FastTab. The only requirement is to set the Web Replication Method as described above. The POS is requesting the package from HO, therefore it is not required for HO to know the URL of the POS.
Web Services
- Go to the Web Services page, and publish a support web request by publishing codeunit 10000772 LSC Web Repl. AzS OData Mgt as OData V4 with service name WebReplAzSODataMgt.
/General Setup_3_800x167.png)
Housekeeping
For information see How to: Azure Storage Housekeeping