You can add one or more general ledger profiles, each containing any number of mappings, to an existing chart of accounts (CoA).
Note the order in which mappings are specified in a profile is significant. For each journal entry line, LUSID uses the first matching mapping found to assign journal entry lines to levels in order to break down account activity in a trial balance.
Methods
Call the CreateGeneralLedgerProfile API.
Note in this example, the third mapping with a mappingFilter
expression set to True
is a 'catch all' that applies levels to hitherto unmatched journal entry lines; without this, unmatched journal entry lines would have no levels:
curl -X POST 'https://<your-domain>.lusid.com/api/api/chartofaccounts/CoAs/DailyCoA/generalledgerprofile'
-H 'Content-Type: application/json-patch+json'
-H 'Authorization: Bearer <your-API-access-token>'
-d '{
"generalLedgerProfileCode": "STEM",
"displayName": "STEM",
"description": "STEM profile",
"generalLedgerProfileMappings": [
{
"mappingFilter": "GeneralLedgerAccountCode eq '1-Investments'",
"levels": [
"DefaultCurrency"
]
},
{
"mappingFilter": "EconomicBucket startswith 'PL_' and Properties[Instrument/default/LusidInstrumentId] startswith 'CCY_'",
"levels": [
"SourceType", "EconomicBucket", "ActivityDate"
]
},
{
"mappingFilter": "True",
"levels": [
"Instrument.AssetClass"
]
}
]
}'
Navigate to Fund Accounting > Chart of Accounts, open the General Ledger Profiles tab, select the parent CoA and click the Create general ledger profile button:
Write a Luminesce SQL query using the Lusid.GeneralLedgerProfile.Writer provider to create a general ledger profile and the Lusid.GeneralLedgerProfile.Mapping.Writer provider to set mappings, and execute the query using a tool such as the LUSID web app:
Data fields
This section supplements the API documentation and on-screen help text in the LUSID web app.
A profile is identified by a code
that must be unique within the parent CoA.
You can specify any number of generalLedgerProfileMappings
that match journal entry lines to levels (that is, categories to divide accounts into). Note the order is significant. Each mapping consists of:
A
mappingFilter
expression that describes criteria for matching journal entry lines.Up to five
levels
to apply to journal entry lines matching those criteria, specified as an ordered list of strings. Syntax and allowed values.
Subsequent updates
Once a profile is created, you cannot change the code
, displayName
or description
.
You can specify a new ordered set of mappings using the SetGeneralLedgerProfileMappings API; note the new set replaces the existing set, so include any mappings you want to retain in the request.
You can change the order of mappings in the LUSID web app using the grab handles (in red). You cannot currently patch a profile using the LUSID API.
To delete a profile, call the DeleteGeneralLedgerProfile API.