Views:

Related resources:

Explanation

Tutorials

Reference

Providing you have suitable access control permissions, you can add one or more general ledger profiles containing mappings to an existing chart of accounts (CoA).

You might want to do this in order to enable breakdown of account activity in a trial balance.

The following methods are available:

Using the LUSID web app

  1. Sign in to the LUSID web app as a user with suitable permissions.
  2. From the top left menu, select Financial Reporting > Mapping.
  3. On the General Ledger Profiles dashboard, select the parent Chart of Accounts from the dropdown (highlighted in red below).
  4. Click the Create general ledger profile button and follow the instructions:

    ​​​​​​​

 

Using the LUSID API

  1. Obtain an API access token.
  2. Call the CreateGeneralLedgerProfile API, specifying the scope and code of the parent CoA in the URL and, in the body of the request:
    • A generalLedgerProfileCode that uniquely identifies the general ledger profile in the CoA.
    • A displayName and, optionally, a description. Note these are informational fields only.
    • In the generalLedgerProfileMappings collection, a set of mappings that match journal entry lines to levels (that is, categories to divide accounts into). Note the order in which mappings are specified is significant; LUSID uses the first matching mapping found. Each mapping must consist 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. More information. 

Note: Once a general ledger profile is created, you cannot change the code, display name 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.

Consider the following example, of a general ledger profile added to a CoA with a scope of Abor and code of Standard (highlighted in red in the URL), and a code itself of STEM (in yellow in the body). The profile has three mappings, evaluated in the order specified. Note the third mapping with a mappingFilter expression of True is a 'catch all' rule that applies levels to unmatched journal entry lines; without this, unmatched journal entry lines would not have any levels:

curl -X POST 'https://<your-domain>.lusid.com/api/api/chartofaccounts/Abor/Standard/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"
      ]
    }
  ]
}'

In the response, LUSID confirms the unique identifier of the general ledger profile in the CoA (highlighted in red):

{
  "chartOfAccountsId": {
    "scope": "Abor",
    "code": "Standard"
  },
  "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"
      ]
    }
  ],
  ...
}