This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Intercompany

Learn to use Pryme intercompany.

Master data is the foundation for intercompany projects. It refers to customers, resources and projects. Transfer data between different tenants (data bases) regardless of their location. Improve your data quality by sharing it in a reliable way. Forget about manually copying data from one business to another.

Maintain a single copy of master data to ensure consistency of important information that is shared across companies within the group.

Whether in the form of centralised data sharing, or in the form of dynamic data exchange, choose which scenario suits you best. With the first option you act as the primary source of data for the entire group. Where as with the second option you and other companies within the group can easily transfer data to one another as needed. In both cases you’re ensuring that all companies in the group have access to the same accurate and up-to-date information.

This video shows how intercompany data flow between entities

We offer two specialized apps to streamline master data sharing:

  • Pryme Intercompany Data Management is an extension on Microsoft Dynamics 365 Business Central for managing, sharing, and automatically process master data between a free selection of companies.
  • Pryme Intercompany for Projects is an extension that managing and sharing project, resources, and entries for time, expenses and items. This app requires Progressus Advanced Project.

Flow

YouTube channel

Watch our YouTube channel for more information about Pryme Intercompany.

1 - Setup and configuration

Set up and configure Pryme Intercompany

Concept parties, topics and subscriptions

Pryme Intercompany enables Business Central companies to share data seamlessly using Messages. TThis system is built on three key components: Parties, Topics, and Subscriptions.

  • Parties - A Business Central company that exchanges data with other companies via Messages
  • Topics - Messages published by one Party and available for other Parties to subscribe to.
  • Subscriptions - Messages that allow a Party to receive data from a Topic.

Configuration differences

Both apps share the same process for setting up Parties, but not for Topics and Subscriptions

Pryme Intercompany Master Data App:

  • No pre-configured templates.
  • Data exchanges require manual setup for Topics and Subscriptions, offering greater flexibility for custom use cases.

Pryme Intercompany Project App:

  • Pre-defined templates for Topics and Subscriptions tailored to project-related data (e.g., time entries, expenses).
  • Simplifies setup and accelerates implementation for project-specific data sharing.

Flow

1.1 - Before you start

Things to do and consider before you start setting up the Pryme Intercompany app

Before diving into the setup of Pryme Intercompany, ensure that the following key considerations are addressed to ensure smooth implementation and integration.

Party code

  • All companies involved must agree on a unique intercompany partner identification code, also known as a Party Code. This code will help identify each company in the system.
  • Use a consistent and scalable naming system. For example, instead of just using a land code (e.g., “UK”), combine it with a number, such as “UK10,” “UK11,” etc.

Data conflicts

Ensure no data conflicts exist before setting up the app. Review and update existing entries to avoid issues.

Key Areas to Check:

  • Project numbers
  • Resource codes
  • Other shared references

Master data

Determine how master data will be managed across the group. Will one company act as the central master data company for the entire group, or will each company manage its own master data? If choosing a centralized approach, designate one company to provide the master data to the others.

Key Considerations:

  • Tables to transfer - Identify which master data tables need sharing.
  • Field-level restrictions or filters - Ensure that any needed restrictions, filters, or field-level mappings are identified and implemented.
  • Code Harmonization - Do you have consistent coding schemes across the companies for master data? If not, align and update the codes to ensure consistency across the group.

If Pryme Intercompany for Projects is installed, exclude projects and resources from the master data, as these are managed by the app.

Make sure that related tables that are needed when importing data are included in the master data setup. This prevents data errors due to missing or incorrect data, saving time in the long run.

Transfer time, expense and item entries between companies

The Pryme Intercompany project app comes with two predefined templates to transfer time entries and project ledger entries. You can choose to use these templates individually or in combination.

Time entries Template

Functionality:

  • Transfers time entries to the External time entries table when timesheets are submitted by the performing company.
  • The project manager in the selling company can preview the entries, and can approve and comment the entries in an approval flow that is for informational purposes only.
  • After posting, project ledger entries are created in both companies (performing and selling).

Limitations:

  • Only time entries will be transferred. If you move entries between projects using Move entries or a Project journal, these will not be transferred through intercompany automation as they don’t create time entries; only project ledger entries.

Project ledger entries Template

Functionality:

  • Transfers posted time, expense, and item entries to the project journal. When posting these entries, Project ledger entries are created in the selling company.

Limitations:

  • Preview and Approval - Project managers in the selling company will not be able to preview time entries before posting.

Combining Templates

If you want to preview time entries (and use the approval flow) and also transfer expenses and item entries, you can use the templates in combination.

  • Time entries β†’ Time and resources
  • Project ledger entries β†’ Expenses and item entries

1.2 - Basic setup

Learn about the basic set up that needs to be done before you start setting up parties, topics and subscriptions in Pryme Intercompany

Add your party code

Each company needs a unique Party code for identification purposes. Agree on a naming strategy with all companies in the group and ensure consistency in Party code naming. Follow these steps to set it up:

  1. Choose the πŸ”Ž icon, enter Pryme Intercompany setup, and select the related link.
  2. Enter a Party code in My party code.

Exclude a dimension in the intercompany data

If your company uses local dimensions (i.e., only relevant for a specific company) and shouldn’t be shared with other companies, you can exclude the dimensions from the Topic message.

  1. Choose the πŸ”Ž icon, enter Dimensions, and select the related link.
  2. Change Skip for Intercompany (IDM) to On/Selected for any dimension you want to exclude.

Expense payment type

If you are using the Project ledger entries functionality to transfer expenses between companies, you must add an Expense payment type to prevent expenses from posting to the general ledger. The general ledger will be updated when you post the Purchase invoice. This Expense payment type is only for intercompany transactions.

  1. Choose the πŸ”Ž icon, enter Expense payment type, and select the related link.
  2. Create a new expense payment type and set the Expense payment function to Company paid and the Expense posting to NONE.
  3. Choose the πŸ”Ž icon, enter Project expense posting setup, and select the related link.
  4. Create an Expense code for each code you have, and add the newly created Expense payment type.
  5. Fill in the necessary fields. Hover over a field for a short description.

Permissions

Users who are going to send projects to other companies must have the permission USER IDMYME.

1.3 - Step by step Project, Time, Expense, Item

Step by step how to setup Intercompany for Project and Time entries

When setting up Pryme Intercompany Projects, it’s crucial to follow a structured approach to ensure that both the sending and receiving companies are properly configured for transferring projects and time entries. The process involves setting up Parties, Topics, and Subscriptions in the correct order. Below is a step-by-step guide to help you through the setup process.

In Pryme Intercompany Project, you can transfer data using two pre-defined templates. You can use these templates either separately or in combination, depending on the types of data you want to transfer between companies. Read more about it here.

  • Time Entries - This template is used for transferring just the time entries.
  • Project Ledger Entries - This template includes time entries, as well as expenses and item entries.

For two-ways data transfer, set up the Topics and Subscriptions in both companies.

Parties

  1. Create a Party in Company A for Company B.
  2. Create a Party in Company B for Company A.

Project

  1. Create a Topic in Company A. Select the template for Projects.
  2. Create a Subscription in Company B for Projects on the Partycode for company A.
  3. Check and update the table definitions.

Time, alternative 1

The pre-define template Time entries transfer resources and time entries. When a time sheet is submitted the entries are transfered to the External time entries. This makes it possible for a project manager in to preview the entries. There is also an approval flow for information purpose only.

  1. Create a Topic in Company B. Select the template Time entries.
  2. Create a Subscription in Company A for Time entries on the Partycode for company B.
  3. Check and update the table definitions.

Expense and item entries

If you use the template for Time entries, and also want to transfer project ledger entries for expenses and items, use the template Project ledger entries for this purpose.

  1. Create a Topic in Company A . Select the template for Project ledger entries.
  2. Check and update the table definitions. Add a Condition on field Type to only include g/l account and Item in the data message.
  3. Create Expense payment types in Company B and update the Expense posting groups
  4. Create a Subscription in Company B for Project ledger entries on the Partycode for company A.
  5. Check and update the table definitions.

Time alternative 2, including expenses and item entries

If you want to transfer project ledger entries for time, expenses and items, without the possibility for a project manager to preview the time entries, you can use the Project ledger entries. Using this template, the project ledger entries are transfered to a project journal, from where they are posted.

  1. Create a Topic in Company A . Select the template Project ledger entries.
  2. Check and update the table definitions.
  3. Create Expense payment types in Company B and update the Expense posting groups.
  4. Create a Subscription in Company B for Project ledger entries on the Partycode for company A
  5. Check and update the table definitions.

Company ACompany B
Parties
1aCreate a Party for Company B.
1bCreate a Party for Company A.
Project
2aCreate a Topic. Select the template for Projects.
2bCreate a Subscription for Projects from company A and update the table definitions.
Time, alternative 1, via Time sheet (External Time Entries)
3aCreate a Topic. Select the template for Time entries.
3bCreate a Subscription for Time entries from company B and check the table definitions.
Expense and item entries (in addition to Time entries)
4aCreate a Topic. Select the template for Project ledger entries. Update the table definitions. Add a Condition to only include Type g/l account and Item in the data message.
4bCreate Expense payment types and update the Expense posting groups.
4cCreate a Subscription for Project ledger entries from company B and check the table definitions.
Time, alternative 2, via Project ledger entries, includes expenses and items
5aCreate a Topic. Select the template for Project ledger entries. Update the table definitions.
5bCreate Expense payment types and update the Expense posting groups.
5cCreate a Subscription for Project ledger entries from company A and check the table definitions.

1.4 - Parties

Learn how to setup a Party, a company in Business Central sharing data with other companies.

A Party is a Business Central company sharing data with other companies. A Party can send and receive data. You must set up all companies as you will send data to or receive data from. Before you start setting up the Parties, choose a consistent format for Party Codes. Combine a land code with a number for uniqueness and clarity (e.g., UK10, UK10).

Set up your standard party code

  1. Choose the πŸ”Ž icon, enter Pryme Intercompany Setup, and then select the related link.
  2. Enter your party code in My Party code.

Parties

Every company must have a unique party code that identifies the company. Decide on a naming strategy, and stick to it.

  1. Choose the πŸ”Ž icon, enter Parties (IDM), and then choose the related link.
  2. Fill in the fields as necessary. Hover over a field to read a short description.

Party groups

Party Group is a subset of parties and can be used in a Topic to restrict which companies are allowed to receive data.

  1. Choose the πŸ”Ž icon, enter Party Groups (IDM), and select the related link.
  2. Fill in the fields as necessary. Hover over a field to read a short description.
  3. Enter the Code of Parties that should be related under the Parties subpage.

1.5 - Topics

Learn how to set up Topics in Pryme Intercompany, used for publishing data to other Business Central companies.

Topics are used for publishing data to other parties. Topics themselves do not send data directly but act as a notification system that alerts subscribers to pull data.

The Topic defines the types of data (tables and fields) that are available to be transferred to other parties. You can also add Conditions to filter and control which data should be transferred.

Topic card

  1. Choose the πŸ”Ž icon, enter Topics (IDM), and select the related link. Fill in the fields as necessary. Hover over a field to read a short description. Some of the most important fields are as follows:
FieldComment
Message processingPryme Intercompany Masterdata -> Generic
Pryme Intercompany Project -> Project, Time entries or Project ledger entries.
Subscription typeThis field is used to restrict to the Topic to a specific Party or to a group of Parties.
Subscription CodeIf you in Subscription Type choose Party or Group, add the Party or Party group to whom you want to publish the Topic.
  1. Open the Topic Tables action under Related.

Transfer time entries

We provide two predefined templates for transferring time entries; Time entries and Project ledger entries.

Time entries

This template transfers both time and resources. Once time entries are submitted, they are transferred to the External Time Entries table in the receiving company. This enables project managers in the selling company to preview the entries. Additionally, there is an approval flow included for informational purposes.

When time entries are posted in the performing company, project ledger entries are automatically created in both the selling and performing companies.

Project ledger entries

This template transfers time (excluding resources), expenses, and item entries. It creates transactions in a project journal, and when posted, project ledger entries are generated in the selling company. Unlike the Time Entries template, this option does not include preview or approval functionality when the time sheet is submitted in the performing company.

You cannot use both templates simultaneously for time entries, as this will result in duplicate project ledger entries. However, you can use the templates in combination for different purposes:

  • Time Entries: For transferring time and resources.
  • Project Ledger Entries: For transferring expenses and item entries (add a Condition to only include Type g/l account and Item).

Topic tables

There is a differance between the two intercompany apps when it comes to setting up Topic tables.

  • Pryme Intercompany Masterdata - You must manually add the tables you want to transfer and define their table definitions. By default, all fields are included in the data message unless specified otherwise.
  • Pryme Intercompany project - Pre-defined templates are available, with tables and table definitions already populated for you.
  1. Select New and search for the table you want to add.
  2. Fill in the fields as necessary. Hover over a field to read a short description. Some of the most important fields are as follows:
FieldComment
Allow On-Demand PublishEnables users to manually publish records to this topic using an on-demand page action, provided the conditions are fulfilled. This field is valid only for tables with special on-demand functionality.
ConditionsUse this field to set filters that define whether data should be included or excluded in the Topic record.
Included fieldsIf you want to exclude specific fields from the Topic, click this field. It opens Message Data Content (IDM), where you can define your restrictions.
  1. Go back to the Topic card and Set status to Ready.
  2. Restart the company. The changelog will be updated with new and updated entries that will generate Topic records to the subscribers.

Transfer all entries in a table

The intercompany apps only transfers new and updated entries. To ensure consistency across all subscribing companies, you can transfer all entries in a table using the Topic Table -> Create Messages function. Key points to remember:

  • Use this for Master data tables after setting up the Topic to synchronize data across companies.
  • This action adds and updates entries but does not delete records in subscribing companies.
  • If invalid records exist in subscribing companies, manual cleanup may be required.

Update a topic with new fields

To add a new field to an existing Topic, follow these steps:

  1. Choose the πŸ”Ž icon, enter Topics (IDM), and select the related link.
  2. Set the Topic to On hold.
  3. Open the Topic Tables action under Related.
  4. Click on Included fields. Message Data Content (IDM) will open and you can add the field.
  5. Go back to the Topic card and Set status to Ready.
  6. Restart the company.
  7. Add the field in the Subscription. Look here.

1.6 - Subscriptions

Learn how to setup Subscriptions, used for receiving data from other Business Central companies.

After setting up the Topic, the next step is to create a Subscription for each Party in the receiving company/companies. You must create one Subscription per Party (sending company) you are receiving data from.

If you are setting up a Subscription in a multiple Business Central environment, using Azure Service Bus, you must run the Topic in the sending company before you are setting up the Subscription

Subscription card

  1. Choose the πŸ”Ž icon, enter Subscriptions (IDM), and select the related link.
  2. Enter the Party code for the sending company and select the related Topic.
  3. Pryme Intercompany Project only.
    • Inv. Setup template Defines the default invoice template for intercompany projects. Leave blank to add templates manually.
    • Res. price template Specifies the transfer pricing list for projects.
  4. Review and adjust tables under Subscription Tables. Delete tables you do not wish to import. Re-add deleted tables if needed (limited to tables present in the Topic).
  5. Use Subscription Fields to modify field-level data processing, mapping, and rules.

Subscription Fields

Subscription fields allows you to control how data is imported and processed.

When you import a table, you can mapp a field to change the value in it. This is only possible if the field is included in the Topic message.

If you change or mapp a field, we recommend you use the Comment field to document your changes. The field Relation Table Caption specifies the table that is related to the field. If you have values in these fields, the value you import must exist in the related table in the receiving company.

You can map a field four ways, by Value, Filter, Fixed or Currency.

TypeDescription
ValueOne-to-one mapping.
FilterConditional updates based on filters.
FixedAssigns a fixed value to all imported transactions.
CurrencyManages local currency conversions.

Currency mapping

Ensures proper handling of differing local currencies (LCY) between companies. Requires setup of the Currency Code for each Party and the LCY Code in the General Ledger Setup.

  • If the currency code in the subscription message is blank the Currency code from the Party code will be used and mapped into the field.
  • If the currency code in the subscription message matches the Currency code on the Party code, the currency field will be set to blank.

Subscription fields in Pryme Intercompany Project

In the Pryme Intercompany Project app there are fields you must map to get the correct values on the projects in the receiving company.

Project

Table 167 – Job
Target Field NoTarget Field NameMapping valueComment
5Bill-to Customer No.FixedAlways map to the sending company’s customer number in the receiving company.
20Person ResponsibleIs it the same as in the sending company?
23Job posting groupIs it the same as in the sending company?
1011Invoice currency codeCurrencyIf you have an intercompany transfer pricing list in another currency than your LCY, always change the Mapping value to Currency. Read more about Currency mapping here.
2000Sell-to Customer No.FixedIf you don’t have the customer table as Master data, map to the sending company’s customer number in the receiving company.
14045651Resource Invoice typeValueIf the selling company have fixed price agreement with the customer, and the performing company need to maintain regular intercompany billings, mapp this field to T&M
14045655Item Invoice typeValueIf the selling company have fixed price agreement with the customer, and the performing company need to maintain regular intercompany billings, mapp this field to T&M
14045656Expense Invoice typeValueIf the selling company have fixed price agreement with the customer, and the performing company need to maintain regular intercompany billings, mapp this field to T&M
14045674Project Managerx PGSIs it the same resource as in the sending company?
14045753Time sheet currency codeCurrencyIf you have an intercompany transfer pricing list in another currency than your LCY, always change the Mapping value to Currency. Read more about Currency mapping here.
Table 1001 – Job task
Target Field NoTarget Field NameMapping valueComment
14045764Contract Type PGSValueIf the selling company have fixed price agreement with the customer, and the performing company need to maintain regular intercompany billings, you must map this field to T&M
14045709Project Manager PGSIs it the same resource as in the sending company?
Table 14045676 - Permissions PM

This table is not mandatory to transfer. If you don’t need the permissions from the sending company, you can delete the table.

Target Field NoTarget Field NameMapping valueComment
1NoIs it the same resources as in the sending company?

Time

Table 156 – Resource
Target Field NoTarget Field NameMapping valueComment
51Gen Prod Posting GrpIs it the same as in the sending company?
58VAT Prod Posting GrpIs it the same as in the sending company?

Project ledger entries

This is a preview feature that transfer resource, expenses and item ledgers between companies. It is to be tested in a Sandbox environment. Please contact support if you want to use it in a production environment.

Table 210 – Job jounal line
Target Field NoTarget Field NameMapping valueComment
1008Currency codeCurrencyRead more about Currency mapping here.
14045810Expense Payment TypeValueMapp the expense payment types you have in the sending company to the one you created for Intercompay purpose.

Test the setup

When you have created a topic and the corresponding subscription, try to send one entry in the sending company. In the receiving company you can run the subscription manually from the action Run subscription. When everything is working, you can set up a job queue that runs the subscription automatically.

Read more about setting up job queues here.

Update a Subscription after changing the Topic

If you have changed the field definitions on the Topic you must manually update the Subscription.

  1. Choose the πŸ”Ž icon, enter Subscriptions (IDM), and select the related link.
  2. Go to Update Source fields on the Action tab.
  3. Open the Subscription card.
  4. Click on Subscription fields on the table you want to update.
  5. Go to the field you want to add.
  6. In Source field No you add the Table No (same number as in Target field No).

1.7 - Run topics and subscriptions

Learn how to run topics and subscriptions, or setup job queues to run them automatically.

Once the Topics and Subscriptions are setup you can start transferring data. This can be done manually or automatically by a Job queue. If you are testing in a Sandbox, we recommend you run the Topics and Subscriptions manualy, as the Job queue is put On hold every time they complete a run.

Run topics

On the Topic the value Schedule run on Changelog determines if you must run the Topic or not. If the value is FALSE, you must run the Topic manually under Action -> Run topic or set up a Job queue to run it in the background.

  1. Choose the πŸ”Ž icon, enter Topics, and select the related link.
  2. Go to Actions – Create Job Queue Entry
  3. Fill in the fields as necessary. Hover over a field to read a short description.
  4. Set Status to Ready.

Run subscription

Manually

  1. Choose the πŸ”Ž icon, enter Subscriptions (IDM), and select the related link.
  2. Choose the Subscription you want to run and select Run Subscription under the Home action.
  3. If you get questions about updating values, always choose the selected answer.

Job Queue

  1. Choose the πŸ”Ž icon, enter Subscriptions (IDM), and select the related link.
  2. Go to Actions – Create Job Queue Entry.
  3. Fill in the fields as necessary. Hover over a field to read a short description.

Schedule jobs to run automatically.

1.8 - Set up Azure Service Bus

Learn how to setup an Azure Service Bus connection for intercompany data transfer between Business Central companies in different environments.

When using multiple Business Central environments, you can use Azure Service Bus to transfer data between the companies. Azure Service Bus is a cloud-based messaging service that enables you to send messages between applications and services. Azure Service Bus supports a set of cloud-based, message-oriented middleware technologies including reliable message queuing and durable publish/subscribe messaging. For more information, see Azure Service Bus.

Before configuring the connection to Azure Service Bus in Business Central, a namespace must be created in Azure Service Bus. The namespace is the container for all messaging components in Azure Service Bus. The namespace is created in the Azure portal.

To create a namespace in Azure Service Bus

  1. Register an application for API connection: Register an application (MS Learn)
    • Save the Application (client) ID for later
    • Create a Client Secret and save the secret value for later.
  2. Create service bus namespace, see Create a namespace (MS Docs). It must be Standard tier or better.
    • Save the Name of the namespace for later
    • Save the Subscription Id where the Namespace was created for later
    • Under Access control (IAM), add the registered application from step 1 as Role, Azure Service Bus Data Owner: Authenticate and authorize an application (MS learn)

After completion you will have the following values to insert into Business Central:

  • Directory (tenant) ID from Azure AD
  • Application (client) ID from the created App Registration.
  • Client Secret from the created App Registration.
  • Subscription Id where the ASB Namespace was created
  • Azure Service Bus Namespace name from the created Azure Service Bus Namespace

To set up Azure Service Bus in Business Central

  1. Choose the πŸ”Ž icon, enter Azure Service Bus (IDM), and then select the related link.
  2. Fill in the fields as necessary. Hover over a field to read a short description.

To set parties to use Azure Service Bus

  1. Choose the πŸ”Ž icon, enter Parties (IDM), and then select the related link.
  2. Select the party to set up for Azure Service Bus.
  3. Select Azure Service Bus in the Data Transfer Type field.

2 - Process

Learn about how to transfer project, time and expenses in Pryme Intercompany Project

Once Topics and Subscriptions are configured, intercompany transactions can be automatically transferred

Projects

Create an intercompany project as you would any other project. Select the companies to which you want to transfer the project, even if the Topic publishes to all companies.

  1. Choose the πŸ”Ž icon, enter Project list, and select the related link.
  2. Select the project you want to send. Navigate tp Send to company under the Action tab.
  3. Select the companies for transfer. Ensure users have the USER IDMYME permission.

Unmarking a company stops updates to that company but doesn’t delete the project.

If a company you want to send the project to is missing from the list:

  1. Verify the receiving company is set up as a Party.
  2. Confirm that the Topic allows projects for that party.
  3. Update the Subscription (IDM) in the receiving company.

If Allowed On-Demand Publish is set to FALSE on the Topic, all projects transfer automatically without selcection.

Time and expenses

The app provide two Topics/Subscription for transfering of time entries; Time entries and Project ledger entries. These can be used separately or in combination. If you use them in combination, time entries are transferred with Time entries, and expenses and item entries with Project ledger entries.

Time entries

When submitting a time sheet in the performing company, time entries transfers to the External time entries. This table is for information purpose only. All changes to entries must be made in the performing company.

Viewing External time entries.

  1. Project list -> Related -> IDM - > External Time Entries.
  2. Project plan -> column External time (Not posted)
  3. πŸ”Ž -> External time entries. Using this option you will see all External time entries on projects where you are a project manager or a person responisble. If you on are a project executive, you will see all transactions on all projects (you have filters to restrict the view).

You have an approval status and comment in the External time entries. This information is transferred and is visable (for imformation purpose only) the when approving time in the performing company.

When the entries are approved and posted in the performing company, project ledger entries are created in both companies.

Project ledger entries

This preview featurefunction is to be tested in a Sandbox environment. Please contact support if you want to use it in a production environment.

This template transfer time, expense and items entries and enter them in a project- or jobjournal. The journal can be posted automatically or manually when you run the Subscription.

There is no approval flow as you have in the Time entries.

3 - Design Details

Intercompany (Master) Data Management enables Business Central Companies to share data. Data is serialized to Messages and organized in Topics by the Publisher. The Subscriber can then setup Subscriptions on the Topics thereby receive the data.

This section will cover the underlying thoughts and architecture behind IDM.

Messaging pattern

Data is transferred between Companies in so called Messages. A Message that is made available in a Topic by a Publisher is referred to as a Topic Message and a Message that has been received by a Subscriber is known as a Subscription Message.

IDM has been built with inspiration from the Publish-Subscribe pattern as well as the Client-Server pattern making it a hybrid that benefits from strengths in both models. The main sequence for new data to be published is as follows.

  1. User changes some data.
  2. Data change is registered by Publisher.
  3. Publisher serializes changed data into Messages.
  4. Publisher notifies Subscriber about new Messages.
  5. Subscriber requests new Messages from Publisher.
  6. Publisher returns new Messages to Subscriber.
  7. Subscriber saves each received Message.
  8. Subscriber registers information about consumed Messages with Publisher.
  9. Subscriber deserializes and processes each Message.

The above flow is illustrated in the following sequence diagram. Messaging Pattern

The main sequence is a hybrid of Publish-Subscribe and Client-Server and the following table lists key features from each model which have been implemented in the general Messaging Pattern.

PatternHighlights
Publish-Subscribe
  • Publisher serializes data to Messages without direct data transfer.
  • Publisher organizes Messages in Topics.
  • A Topic can have multiple Subscribers.
  • Publisher immediately notifies Subscribers.
  • Subscribers registers Message consumption with Publisher.
Client-Server
  • Messages are transferred by request of Subscriber.
  • Data serialization and Message Processing is aligned between Topic and Subscription.
  • Publisher has knowledge about each Subscriber.
  • Publisher and Topic is kept within the same System.
  • A Publisher can only post Messages to its own Topic.

Publish-Subscribe

Messages are organized in Topics that are made available to multiple Subscribers. A Publisher posts new messages to the Topic and notifies Subscribers as illustrated on the following flow chart.

Publish-Subscribe

This allows for a decoupling between publishing new data and consumption, where Subscribers will receive the new data. Data is serialized and stored as Topic Messages before notifying Subscribers which has the following benefits.

  • Messages can quickly be returned to Subscribers when needed as no further processing is required.
  • Messages can be marked to only be published to a subset of Subscribers.

Each Topic can have multiple Subscribers and the Publisher does not necessarily need to know each Subscriber beforehand.

Client-Server

Data is only transferred when Subscribers requests new Messages from Publisher as shown the below illustration.

Client-Server

In this way the Subscriber can decide when data transfer should take place. The Topic is placed in the Publisher system to allow for the Topic to contain full information about the communications protocol which is managed by the Message Broker.

Message Broker

Functionality in IDM is grouped into the following three main areas.

AreaDescription
Data SerializationConvert data to and from text.
Data TransferNotify Subscriber and transfer Message.
Message ProcessingParse and map Message to data.

IDM has been implemented with extensibility in mind and functions involving these three areas are placed in Codeunit Message Broker IDMYME. In this way it is possible to use any of the predefined interfaces as well as have a partner implement new ones to fit your specific needs while still making use of the overall IDM framework. Each implementation consists of a number of explicitly required functions defined by the AL interface as well as implicitly required Subscriber functions which allows for additional features and differentiations to be implemented with fallback to default functions.

The following sections will describe each of the three interfaces in detail.

Data Serialization

In Business Central data is stored as records in tables and can not be directly transferred to other Companies. Therefore when data is saved as Messages by the Publisher it is first serialized to text and when Messages are processed by the Subscriber it is deserialized back from text to data.

Serialization can be performed in a number of ways and the key point is that serialization and deserialization should be done in more or less the same way when both Publisher and Subscriber is a Business Central Company. IDM therefore provides an interface for Serialization that can both be defined on Topic and Subscription to ensure consistency during integration.

The technical name for the Data Serialization interface is IData Serialization IDMYME and the following table outlines it from a programming point of view.

FunctionTypeAreaDescription
Serialize()InterfaceSerializationInvoked when data is serialized.
Deserialize()InterfaceSerializationInvoked when data is deserialized.

IDM comes with a default Json Serialization but the Data Serialization interface can be extended to match your specific needs.

Data Transfer

In IDM, Data Transfer consists of three areas:

AreaDescription
NotificationPublisher sends notification to Subscriber that new Messages have been published.
Topic MetadataSubscriber receives Topic Metadata from Publisher to understand the Message context.
MessageSubscriber receives Topic Messages from Publisher and saves it as Subscription Messages.

In all three areas, both Publisher and Subscriber must request and respond accordingly to ensure consistency. To help this along Data Transfer has been implemented in a single interface, IData Transfer IDMYME, that is defined on Parties (IDM) in by both Publisher and Subscriber.

and the following table outlines it from a programming point of view.

FunctionTypeAreaDescription
NotifySubscriber()InterfaceNotificationInvoked when a Publisher notifies a Subscriber about new Messages.
FindTopics()InterfaceTopic MetadataInvoked when Subscriber lists Topics from a Publisher.
FindICParties()InterfaceTopic MetadataInvoked when Subscriber lists Parties (IDM) from a Publisher.
RequestNewMessages()InterfaceMessageInvoked when a Subscriber requests new Messages from a Publisher.
RegisterConsumedMessages()InterfaceMessageInvoked when a Subscriber registers Message Consumption with a Publisher.
GetTopicTables()InterfaceTopic MetadataInvoked when a Subscriber lists Topic Tables from a Publisher.

Message Processing

Each Subscription Message is processed by the Subscriber and the default behaviour is to map tables and fields more or less 1:1 resulting in data from Publisher being replicated to Subscriber. However, you might require some specific Message Processing where underlying data or procedures are taking into use and to support this the Message Processing interface has been provided.

The technical name for the Message Processing interface is IMessage Processing IDMYME and the following table outlines it from a programming point of view.

FunctionTypeAreaDescription
ProcessMessage()InterfaceMessage ProcessingInvoked when Message Processing is triggered.
OnInitSubscriptionTables()SubscriberSubscription MetadataFunction OnInitSubscriptionTables in Codeunit Message Broker IDMYME is invoked whenever a Subscription initiates a Subscription Table from Topic Table metadata received from the Publisher. This function is optional and the default initiation will be used if an interface does not implement this function.
OnInitTargetField2SourceField()SubscriberSubscription MetadataFunction OnInitTargetField2SourceField in Codeunit Message Broker IDMYME is invoked whenever a Subscription Field is initiated from a Source Field. This function is optional and the default initiation will be used if an interface does not implement this function.

Enum Message Processing Type

The Role of the Publisher

A Publisher is a Party where a Topic has been created in the its company. The Publisher posts data to a Topic and notifies Subscribers about new Messages. When Subscribers requests new Messages then it is the Publisher that responds to those requests and returns new Topic Messages to Subscribers as well as Topic Metadata.

Topic

Published data is organized in Topics which have the following key features.

FeatureDescription
Data contentTables and Fields to be included is defined on each Topic.
Subscription FilterTopic can be defined to only allow Subscription from some Subscribers.
Message FilterTopic Messages can be filtered to only be available to some Subscribers.
MetadataTopic can provide Metadata to Subscribers to ease the process of setting up new Subscriptions.
Message QueuePublished data is saved as Topic Messages to allow for immediate delivery upon demand where it is returned to Subscribers is chronological order.
NotificationInformation about notification sent to Subscribers is stored in Topic Register.

The Role of the Subscriber

A Party where a Subscription has been created in its company is considered as being a Subscriber. The Subscriber requests new Messages from a Topic at a Publisher and each Message is then saved and later on processed. When receipt is completed then the Subscriber register receipt of Messages back to the Publisher.

Subscription

When a Subscriber wishes to receive data from a Topic a Subscription is created meaning there is a direct correlation between a Topic from a Publisher and a Subscription. Subscription has the following key features.

FeatureDescription
TopicSubscription contains information about Publisher and Topic.
Target dataTarget Tables and -Fields is defined on each Subscription with a mapping from the Topics data content which is referred to as Source Tables and -Fields.
Message QueueReceived data is saved as Subscription Messages to allow for asynchronous Message Processing in chronological order.
ConsumptionInformation about last Message received from Publisher is stored in Subscription Register.

3.1 - Topology

Learn about different configuration of multiple companies in multiple environments

Single environment

Hub and spoke

flowchart TB
    Contoso --> Fabricam
    Contoso --> Northwind
    Contoso --> ProseWare

Mesh

flowchart LR
    Contoso <--> Fabricam
    Contoso --> Northwind 
    Fabricam --> ProseWare   
    Northwind <--> ProseWare
    Northwind --> Fabricam
    Contoso --> ProseWare
flowchart TB
    Contoso --Chart of Accounts--> Fabricam
    ProseWare --Items--> Northwind 
    Contoso --Chart of Accounts--> Northwind     
    Fabricam --Items--> ProseWare       
    Northwind --Resources--> ProseWare    
    Northwind --Resources--> Fabricam    
    Contoso --Chart of Accounts--> ProseWare    
    ProseWare --Items--> Contoso 

Multiple Environments

flowchart TB
    subgraph BC_Env_US
        direction LR
        Contoso 
        Fabricam
    end
    subgraph BC_Env_GB
        direction LR
        Northwind 
        ProseWare
    end
    ASB[(Azure Service Bus)]    
    Contoso<-->ASB
    Fabricam<-->ASB
    Northwind<-->ASB
    ProseWare<-->ASB

5 - Pryme Intercompany Release Notes

3.0 (June 2024)

Application enhancements

External time approval

When external time entries are received, someone in the receiving company must review the entries before final approval in the performing company. An approval status and comment can be set on the external time entry. This will then be transferred back to the original time entry, so the approver of that time entry will know if the time entry can be approved or needs changes.

Fixes and minor adjustments

  • #118 Let the user if you have not filled in the options in Project ledger Entries subscription
  • #123 Error when you send a project without having the admin permission set

2.7 (May 2024)

Application enhancements

Automatic currency mapping

When sending records between companies with different currencies, the system can automatically map the local currency codes.

The mapping type Currency can be used on subscription fields related to currency. The system will then automatically map a blank currency code to the local currency code of the sending party. Records with a currency code matching that of the receiving party will be mapped to blank.

The field “Currency Code” on each party must be defined as well as the “LCY Code” on the general ledger setup.

Fixes and minor adjustments

  • #101 Time sheet currency code is not used when creating the PLE

2.6 (April 2024)

Application enhancements

Easier creation of parties

The Parties page have been restructured. When creating a new party, the system will suggest a name based on the company name.

A new field “My Party Code” have been added to the Pryme Intercompany Setup page. This field is used to set the default party code for the company. The party code is used to identify the company in intercompany transactions.

Conditions for sending records

Previously, the conditions on a topic limited which records were sent to the receiving company when using the “Create Messages” action.

Now the conditions always control which records are sent. If a record has passed the conditions and thus have been sent, it will always be sent in the future even if it no longer passes the conditions. This is needed to support scenarios like conditions based on a status field that is updated after the record is sent.

Easy update of subscription fields

When fields are added to a subscription, the corresponding topics will often need to have the fields added as well. Previously it was not obvious how to do that.

A new action “Update Subscription Field” have been added to the Subscriptions page, the Subscription page and the Subscription Tables page. This action will add the fields to the topics.

Transfer project ledger entries (PREVIEW)

Project Ledger Entries can now be transferred between companies. A topic set up with “Project Ledger Entries processing type will transfer the entries to the company where the project originated. The entries are either automatically posted or created as journal lines for manual review and posting.

Conditions can be set up to control which entries are transferred, like only expense or items. By default, the entries are transferred with the price becoming the cost.

Note that the Time Entries process will still post project ledger entries to the receiving company. So if the Time Entries process is used, the Project Ledger Entries process should not be used for resource entries. In a future version there will be an option to not post external time entries to the project ledger.

This is a preview feature and to be tested in a sandbox environment. Please contact support if you want to use it in a production environment.

Fixes and minor adjustments

  • External time entries now use the quantity to invoice as the quantity to post. This aligns better with the final IC invoicing.
  • Fixed price tasks are now converted to chargeable T&M tasks in the receiving company.
  • The External Time Entries page now filters the entries based on project permissions.
  • The “Send to Company” action have been added to the Project Card and Project Plan.
  • #96 Recreating a subscription with a default fixed mapping fails
  • #98 Lookup in subscription mapping to wrong table
  • #106 You need ADMIN IDMYME to send a project through intercompany

2.5 (February 2024)

Application enhancements

Manage subscriptions in a single card

Subscriptions can now be managed from a single card showing both general settings and the included tables. This makes it easier to see the status of a subscription and to manage the subscription. Special options for different proccessing methods are also managed on the card. The card is available from the Subscriptions page.

Apply a price template to new IC projects

When a new intercompany project is created, a price template can be applied to the project. This makes it easier to ensure that the project is set up correctly from the start. The price template is selected on the Subscription Card page.

Apply an invoice setup template to new IC projects

When a new intercompany project is created, an invoice setup template can be applied to the project. This makes it easier to ensure that the project is set up correctly from the start. The invoice setup template is selected on the Subscription Card page.

More consistent mapping of fields with better performance

The mapping of fields between the sending and receiving companies is now more consistent and has better performance. The default mapping type in subscriptions is now “None”. This relieves the system from unnecessary checking if a mapping exists and makes it easier to understand the mapping. A new mapping type “Fixed” has been added. This is used when the field is always the same receiving companies independent of the value in the sending company. Effectively this can replace the use of mapping with filter from * to a value, but will perform better.

Fixes and minor adjustments

  • #68 Include “Timesheet PGS” for Resource and also way set as false.
  • #85 Default retention policy in new installations set to 2 months.

2.4 (January 2024)

Application enhancements

Subscription progress

The progress of a manual subscription run is now shown from the Subscriptions page. This makes it easier to see the progress of a run and to identify any errors.

External time entries in project plan

External time entries that are not yet approved and posted should be visible to the PM directly without the need to open the list of external time entries. A column in the project plan “External Time (Not Posted)” that specifies the total amount of time on external time entries that are not yet approved and posted has been added.

Fixes and minor adjustments

  • #62 Problem with dimensions on tasks
  • #63 Tasks received via IC can have too many dimensions
  • #64 New customer in sending company stops the subscription in the receiving company
  • #53 Topics - Auto Init Subscriptions doesn’t work
  • #55 External Time Entries - Filter setting is not correct in view Not Posted
  • #76 Time entries on Fixed price becomes chargeable when running subscription
  • #81 Copying a company with Azure Service Bus active can deactivate Azure Service Bus
  • #66 Special permissions are needed to allow logging changes to the Changelog table

2.3 (November 2023)

Application enhancements

The list of data content fields now allows searching. This makes it easier to find fields in long lists.

Fixes and minor adjustments

  • #34 Filter is not working correctly in Topics
  • #35 General fit-n-finish. Included Fields in subscription tables is renamed to Subscription Fields. Source Data Content in subscription tables is renamed to Source Fields.

2.2 (September 2023)

Application enhancements

Skip dimensions for intercompany data

Specific dimensions can be omitted for intercompany data. This is done by setting the Skip for Intercompany (IDM) field on the Dimensions page.

Control re-publishing of intercompany data

When publishing records tables that are also in subscriptions, there is a risk that a received record is published again. This can lead to loops. To avoid this, the new default is that received records are not published again. This can be overridden using the “Allow Republishing” field on the Topic Tables page.

Fixes and minor adjustments

  • #28 Can not open Topics wizard from IDM role center

2.1.1 (September 2023)

Fixes and minor adjustments

  • #6 All dimensions are included for Projects, Tasks and Resources [Intercompany Project only]
  • Table relations are shown for subscription fields
  • Option in Changelog Setup IDM to only log modification when tracked fields are changed. Experimental

2.1 (August 2023)

Application enhancements

Intercompany Project app

New app with predefined processing for intercompany projects and time.

Fixes and minor adjustments

  • Preview posting breaks when a topic table is modified during posting.

6 -