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 basis 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 have two pryme Intercompany apps for this purpose:

  • 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 prymeIntercompany.

1 - Setup and configuration

Set up and configure pryme Intercompany

Concept parties, topics and subscriptions

Intercompany enabels Business Central companies to share data through massages. For this purpose we have Parties, Topics and Subscriptions.

  • Parties is a Business Central company that shares data with other companies.
  • Topics is a message that publishes data to other parties, and makes it able for the receiving party to request the data.
  • Subscriptions is a message that receives published data from Topics in other Parties.

Parties are set up the same way in both pryme Intercompany apps. Topics and Subscriptions are setup a bit different in the pryme Intercompany Project app. In this app you have pre-defined templates; in the pryme Intercompany Master Data app there are no templates.

Flow

1.1 - Before you start

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

Before you start to set up pryme Intercompany, there are a few things to do and consider.

Party code

All companies must agree on a unique intercompany partner identification code for each company, a Party code. Before setting up the app, decide on a naming strategy and stick to it. Try to avoid just a land code; use the land code in combination with a number, e.g. UK10, UK11, UK12โ€ฆ

Data conflicts

Check if you have any data conflicts in the data that will be shared. Update existing entries, e.g. projectnumbers and resources, to avoid data conflicts.

Master data

Will you manage the master data in one master data company for the entire Group? If not, we recommend you have one company that provides the other companies with the master data.

  • Which tables are you going to transfer?
  • Any restrictions, filters, or mapping needed on field level?
  • Do you have the same codes for the Master data tables in the existing companies? If not, update them to harmonize with the Master data. If you have pryme Intercompany for Projects installed, projects and resources is a part of this app and should not included in the master data.

Make sure that related tables that are used when importing data is a part of the Master data. That saves you time and you avoid errors because of non-existing or wrong data.

Transfer time, expense and item entries between companies

In the pryme Intercompany project app we have two pre-defined templates to transfers time between between companies; Time entries and Project ledger entries (also includes expenses and items). You can use them separately or in combination. It’s good to decide which way to go before start setting up your Topics.

Time entries

This template transfer the time entries to the table External time entries when the time sheet is submitted in the performing company. This makes it possible for the project manager in the selling company to preview the entries. There is also an approval flow for information purpose only. When the time entries are posted in the performing company, project ledger entries are created in both companies.

Project ledger entries

This template transfer posted time, expense and item entries to the project journal, and when posted, project ledger entries are created in the selling company. In this case it’s not possible for the project manager to preview the time entries.

In combination

If you want to preview the time entries, and use the approval flow for information purpose only, but also transfer expenses and item entries, you can use the templates in combitation;

  • 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 subsctiptions in pryme Intercompany

Add your party code

All companies must agree on a unique intercompany partner identification code for each company, a Party code. Decide on a naming strategy and stick to it.

  1. Choose the ๐Ÿ”Ž icon, enter pryme Intercompany setup, and choose the related link.
  2. Enter the Party code in My party code.

Exclude a dimension in the intercompany data

If you have dimensions that are local for the company and shouldnโ€™t be a part of the intercompany data, you can restrict the dimension to be excluded in the Topic message.

  1. Choose the ๐Ÿ”Ž icon, enter Dimensions, and choose the related link.
  2. Turn Skip for Intercompany (IDM) to On/Selected on the dimensions you want to exclude.

Expense payment type

If you are using the preview Project ledger entries functionality that transfers expenses between companies you must add a new Expense payment type. This Expense payment type is only for intercompany transactions.

  1. Choose the ๐Ÿ”Ž icon, enter Expense payment type, and choose 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 choose the related link.
  4. Create a new Expense code for each code you have, and add the Expense payment type just created.
  5. Fill in the fields as necessary. Hover over a field to read a short description.

Permissions

All users that are going to send projects to other companies need 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

Before you start setting up pryme Intercompany projects you must decide which companies should send and which companies should receive projects and time entries.

This is a basic step by step in which order you create Parties, Topics and Subscriptions when setting up pryme Intercompany Projects to transfer projects, time entries and resourses between companies in the same database. If you want to transfer e.g. projects both ways between two companies, you must set up a Topic and Subscription in both companies.

In pryme Intercompany project we have two different pre-defined templates to transfer time; Time entries and Project ledger entries (this template also includes expense and item entries). You can use them separately or in combination. Read more about it here.

The step by step explains in which order you set up Parties, Topics and Subscriptions to transfer projects, time, expenses and item ledger entries one way between two companies. If you transfering the data both ways, you need to 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 company in Business Central sharing data with other companies. A Party can both send and receive data. You must set up all companies you will send data to or receive data from. Before you start setting up the Parties, decide on a naming strategy and stick to it. Try to avoid just a land code; use the land code in combination with a number, e.g. UK10, UK11, UK12.

Set up your standard party code

  1. Choose the ๐Ÿ”Ž icon, enter Pryme Intercompany Setup, and then choose the related link.
  2. Fill in 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 choose the related link.
  2. Fill in the fields as necessary. Hover over a field to read a short description.
  3. Add 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. The Topic doesnโ€™t send data directly; it notifies the subscribers and enables them to pull data from the Topic.

The Topic is where you set up the tables and table definitions; which tables and field should be published. You can also add Conditions if you want to exclude transactions for being transfered.

Topic card

  1. Choose the ๐Ÿ”Ž icon, enter Topics (IDM), and choose 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 have two predefined templates that can be used for transferring time entries; Time entries and Project ledger entries.

Time entries

Transfer time and resourses. The time entries are transferred as soon as they are submitted in to the table External time entries in the receiving company. This makes it possible for a project manager in the selling company to preview the entries. There is also an approval flow for information purpose only. When the time entries are posted in the performing company, project ledger entries are created in both companies.

Project ledger entries

Transfers time (not resourses), expenses and item entries and creates transactions in a project journal, and when posted, the project ledger entries in the selling company are created. When using this template, there is no preview or approval functionality when the time sheet is submitted in the performing company.

You can’t use both templates at the same time for time entries because you will get duplicate project ledger entries. What you can do is to use the templates in combination;

  • Time entries -> Time and resources
  • Project ledger entries -> Expenses and item entries

In this case you must add a Condition to only include Type g/l account and Item.

Topic tables

There is a differance between the two intercompany apps related to setting up the Topic tables.

  • pryme Intercompany Masterdata - you must manually add the tables you want to transfer and make the table definitions. The default value is that all fields are included in the data message.
  • pryme Intercompany project - you have pre-defined templates with tables and table definitions already populated.
  1. Choose 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 PublishAllow users to manually publish records to this topic using an on-demand page action if the conditions are fulfilled. This field is only valid for tables with this special functionality.
ConditionsYou use this field to set filters to include or exclude data Topic record.
Included fieldsIf you want exclude fields in the Topic record, click on this field. Message Data Content (IDM) will open where you enter your restrictions.
  1. Go back to the Topic card and Set status to Ready.
  2. Restart the company. The changelog will now 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. If you want to transfer all entries in a table to the subscribers, use Topic Table -> Create Messages. We suggest you do this on all Master data tables after setting up the Topic to be assure that your data is the same in all companies. Note that this function only adds and updates entries, it never delete a record in the subscribing company. This means you might need to do some cleaning up in the subscribing companies if you have records that are not valid anymore.

Update a topic with new fields

This is the procedure if you want to add a new field in an existing Topic.

  1. Choose the ๐Ÿ”Ž icon, enter Topics (IDM), and choose 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.

When you have created a Topic you proceed and create a Subscription in the company/companies receiving data from the Topic. You have to set up one Subscription for each Party you are receiving data from.

Subscription card

  1. Choose the ๐Ÿ”Ž icon, enter Subscriptions (IDM), and choose the related link.
  2. Fill in the Party code for the sending company and choose the related Topic.
  3. pryme Intercompany Project only.
    • Inv. Setup template the selected invoice template will be applied on all projects. If this field is empty, you must manually add the invoice template on all intercompany projects.
    • Res. price template the transfer pricing list that you want to use for all projects.
  4. The related tables from the Topic are opened under Subscription tables. You can delete a table you donโ€™t want to import. You can add it again, but you can never add a table that is not in the Topic.
  5. If you want to change the field definitions, click on Subscription fields.

Subscription Fields

Subscription fields are used for defining which fields should be imported, how the data should be processed on a field level and if there are any rules importing the field. 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
ValueMap a value one to one to convert from one value to another.
FilterMap and update a field based on a filter setting.
FixedMap to a fixed value that will be valid for all imported transactions.
CurrencyLocal currency will be mapped to/from blank.

Currency mapping

This mapping is used when you have different LCY in your parties. This mapping requires that the field “Currency Code” on each party is defined as well as the “LCY Code” in the General ledger setup.

  • If the currency code is blank in the subscription message the Currency code on the Party code will be picked and mapped into the field.
  • If the currency code in the subscription message is matching the Currency code on the Party code the currency will be mapped 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.FixedYou must always 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, you must 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, you must 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, you must 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, you must 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 choose 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.

When the Topics and Subscriptions are setup you can start transferring data. You can do that manually or create 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 it has 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 choose 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

Subscriptions must to be run manually or by a Job queue. In a testing phase, itโ€™s easier to run them manually, as the Job queue is put On hold every time it has run. but over time, itโ€™s better to create a job queue.

Manually

  1. Choose the ๐Ÿ”Ž icon, enter Subscriptions (IDM), and choose the related link.
  2. Choose the Subscription you want to run and choose 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 choose 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 choose 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 choose 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

When the Topics and Subscriptions are setup, you can start creating intercompany transactions that will be transferred through the IC automation.

Projects

An intercompany project is created the same way as any other project. After the project is created you choose to which company/companies you want to send the project. This means if you have a Topic that publishe data to all companies, you will only transfer the project to the companies that you select.

  1. Choose the ๐Ÿ”Ž icon, enter Project list, and choose the related link.
  2. Choose the project you want to send. Go to Send to company under the Action tab. Note that all users that are going to send projects to other companies need the permission USER IDMYME.
  3. Select to which company/companies you want to send the project.

If you unmark a company in the list, the project will not be deleted in the receiving company. You will just stop sending the updates that are made on the project.

If the company you want to send the project to is not in the list, then:

  1. Check that the receiving company is setup as a Party.
  2. Check and update if the Topic has restrictions to which parties projects should be published.
  3. Update the Subscription (IDM) in the receiving company so the company can receive the project.

If you have Allowed On-Demand Publish = FALSE on the Topic, all projects will be transferred, and you donโ€™t need to choose which project should be transferred.

Time and expenses

There are two different Topics/Subscription for transfering time entries; Time entries and Project ledger entries. You can use them separately or as a combination. If you use them in combination you transfer expenses and item entries with Project ledger entries, and time entries with Time entries.

Regardless which template you use, you create your time entries, expenses and item entries in the performing company the same way as you normally do. The IC automation transfer the entries on the intercompany projects to the company that owns the project.

Time entries

When a time sheet is submitted in the performing company the entries are transferred to External time entries. This table is for information purpose only, and makes it possible for the project manager to preview the time entries as soon as they are submitted. This means that all changes must be done in the performing company.

There are several ways to see the External time entries.

  1. From the project list -> Related -> IDM - > External Time Entries.
  2. From the project plan -> column External time (Not posted)
  3. From the ๐Ÿ”Ž icon -> External time entries. In this case you will see all External time entries where you are a project manager or a person responisble. If you on are a project executive, you will see all transactions but 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 the when approving time in the performing company. Note that it’s for information purpose only, which means that setting the status to Hold or Rejected will not stop the approving or posting of the time entry.

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

Project ledger entries

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.

This template can 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.