You can add one or more posting modules containing posting rules to an existing chart of accounts (CoA).
Subsequently, you can create an ABOR configuration module that references the CoA and any of its posting modules.
Using the LUSID web app
Creating an empty posting module
Sign in to the LUSID web app as a user with suitable permissions.
From the top left menu, select Fund Accounting > Mapping.
On the Posting Modules dashboard, select the parent Chart of Accounts from the dropdown.
Click the Create posting module button and follow the instructions to create the module itself:
Adding rules to a posting module
You can add posting rules in the Create Posting Module dialog (above), but it might be easier to navigate to the Posting Rules dashboard instead, selecting the Chart of Accounts and the empty Posting Module from their respective dropdowns, and then clicking the Create posting rule button (see below).
You can add as many posting rules to a posting module as you like. Note the order is significant; LUSID uses the first matching posting rule found. For information on the syntax and allowed values of a rule filter expression, see this article:
Changing the order of existing posting rules
Once created, you can edit a posting module to change the order of existing posting rules using the ‘grab handles’ (in yellow) or up/down arrows (in red):
Using Luminesce
You can use the Lusid.PostingModule.Writer provider to create a posting module and then the Lusid.PostingModule.Rule.Writer provider to set posting rules.
Using the LUSID API
Call the CreatePostingModule API, specifying the scope and code of the parent CoA in the URL and, in the body of the request:
A
code
that uniquely identifies the posting module in the CoA.A
displayName
and, optionally, adescription
. Note these are informational fields only.In the
rules
collection, a set of posting rules. Note the order in which posting rules are specified is significant; LUSID uses the first matching posting rule found. Each posting rule must consist of:A
ruleId
that uniquely identifies the posting rule in the posting module.The code of an
account
to post the credit or debit to. Note you can use Mustache template syntax to parameterise the codes of similar accounts, potentially reducing the number of posting rules. More information.A
ruleFilter
specifying a rule. More information.
Consider the following example, of a posting module added to a CoA with a scope of Abor
and code of Standard
(in the URL), and a code itself of DailyNAV
(in the body). The posting module has three posting rules, evaluated in the order specified:
Editing an existing posting module
Once created, you can edit an existing posting module as follows:
To change the display name or description of the module itself, call the SetPostingModuleDetails API. Note you cannot change the posting module code.
To change the order of existing rules in the module, call the SetPostingModuleRules API. Note you must specify all the rules again, this time in the required order; any omitted from the request are removed.
To insert one or more new posting rules at a specific order, call the PatchPostingModule API. For example, the following request adds a new rule as the second in the list (the index starts at 0):
To add a new rule as the first in the list, specify a
path
of/rules/0
. To add a new rule last, specify/rules/-
. LUSID automatically moves the index position of other rules.Note: It may be easier to change the order of existing posting rules using the LUSID web app.
Parameterising posting rules
You can use Mustache template syntax in the account
field to derive account codes from data attributes of journal entry lines, potentially reducing the number of posting rules.
For example, imagine you have four general ledger accounts in your CoA that share the same purpose but with codes that distinguish between portfolio currency and strategy:
1101-GBP-Growth
1101-USD-Growth
1101-GBP-Income
1101-USD-Income
The following posting rule examines each journal entry line matching the ruleFilter
expression in turn and posts the amount to an appropriate account:
This replaces the following four posting rules with more complicated ruleFilter
expressions: