Company Creation Events Lifecycle Guide

This brief guide describes a representative, sample lifecycle for company creation (legal entity) related events. The following diagram shows how other systems, such as the Market Data Microservice, are updated when the company creation process is initiated in the Reference Data Microservice.

Company Creation: Impact on Downstream Systems

Company Group Creation

The following company types exist in group company creation:

Master Company

This is the first company installation, and it owns a complete set of data tables. The master company can also be a lead company.

Lead Company

A lead company is defined on installation by indicating that the financial tables are to be owned by the company being created. It can have its own base currency and COB. It can be set up to share (or not) certain data sets with other companies.

Branch Company

A branch company is always linked to a lead Company. A branch always shares the lead company’s base currency, batch holiday table and COB.A Branch can be linked to only one lead Company.

Scenario

In this scenario, we'll look at company group creation, then move onto create a company, and approve the company initiation.

Lifecycle Diagram

Legend

Legal Entity API

The API URL that's used to carry out this business process.

API action

API request (typically, a command to perform an operation).

Legal Entity Event The event type that's emanated. 
Event Business event emanating after the process is completed by the system. 
Business process Business process in the system.
End of business process Completion of the business process in the system. 

Tip: Click diagram to expand.

Company Creation Lifecycle Diagram

 

Company Group Creation

API
The API that's used to create the new company group.

POST /v1.0.0/reference/companies/companyGroups/{companyGroupId}

 

Event
The event that's emanated at company group creation.

createCompanyGroup.companyGroupCreated

 

Event Payload

companyGroupId

Carries the unique code of the company group based on which the companies will be grouped together.

displayNames

Contains the name used for display

Sample Code: Company Group Creation Event Payload

{
  "specversion": "BBBBBBB",
  "type": "AAAAAAAAA",
  "subject": "DDDDDDDD",
  "source": "eeeee",
  "id": "bbbbbbb",
  "time": "BBBBB",
  "correlationid": "cccccc",
  "serviceid": "ee",
  "channelid": "cc",
  "organizationid": "bbbbbbbb",
  "tenantid": "cccccc",
  "businesskey": "DDDDDDDDD",
  "sequenceno": 1,
  "authorization": "ccccccccc",
  "customfilterid": "eee",
  "operationinstanceid": "ccc",
  "sequenceinstanceid": "e",
  "priority": 1,
  "data": {
   	 
    "sourceSystem": "AAAAAAAAAA",
    "companyGroupId": "BBBB",
    "displayName": "CCCCCCCCC",
   }
}



 

Sample Code: Loan Disbursement Event Payload


{
  "specversion": "BBBBBBB",
  "type": "AAAAAAAAA",
  "subject": "DDDDDDDD",
  "source": "eeeee",
  "id": "bbbbbbb",
  "time": "BBBBB",
  "correlationid": "cccccc",
  "serviceid": "ee",
  "channelid": "cc",
  "organizationid": "bbbbbbbb",
  "tenantid": "cccccc",
  "businesskey": "DDDDDDDDD",
  "sequenceno": 1,
  "authorization": "ccccccccc",
  "customfilterid": "eee",
  "operationinstanceid": "ccc",
  "sequenceinstanceid": "e",
  "priority": 1,
  "data": {
		"transactionCurrency": "DDDDDD",
	    "transactionAmount": "CCCC",
		"contractAmount": "ee",
    
    "baseDetails": [
      {
        "contractReference": "DDDDDD",
        "systemReference": "CCCC",
        "companyReference": "BBBBB",
        "eventName": "",
        "baseEventIdentifier": "b",
        "effectiveDate": "ddddddddd",
        "bookingDate": "EEEE",
        "contractCurrency": "AAAAAA",
        "channel": "BBBBBBBB",
        "branch": "eeeeee",
        "lineOfBusiness": "CCCCCCCC",
        "activityDateTimeStamp": "ccccccccc",
        "transactionReference": "ddddd",
        "reversalIndicator": false,
        "originationReference": "",
        "contractStatus": "BBB",
        "accountId": "BBBBB",
        "overdue": "",
        "feeDetails": [
          {
            "feeName": "DDDDDDD",
            "feeAmount": "",
            "feeCurrency": "bbbbb",
			"adjustFeeAmount": "aaaa",
            "adjustFeeReason": ""
          }
        ],
        "balances": [
          {
            "balanceName": "cccccccc",
            "closingBalance": "A",
            "dateType": "A",
            "debitTotalAmount": "",
            "creditTotalAmount": "bbbbbbbb",
            "timeStamp": "dddd"
          }
        ]
      }
    ],
   
    "context": [
      {
        "contextName": "eeeeeeeee",
        "contextValue": "CCCCC"
      }
    ],
  
    "repaymentDetails": [
      {
        "effectiveDate": "AAAA",
        "schedules": [
          {
            "repaymentType": "B",
            "description": "ddd",
            "paymentMethod": "AAA",
            "paymentFrequency": "dd",
            "paymentFrequencyDescription": "dddddd",
            "payments": [
              {
                "startDate": "bb",
                "endDate": "EEEEEE",
                "numberOfPayments": "e",
                "calculatedPaymentAmount": "AAA"
              }
            ],
            "nextPaymentDate": "EE"
          }
        ]
      }
    ]
  }
}
  



Company Creation

API
The API that's used to initiate new company creation.

POST /v1.0.0/reference/companyInitiation/{companyCode}

 

Event
The event that's emanated when company creation is initiated.

createCompany.companyCreated

 

Event Payload

companyCode

Carries the unique code of the company.

companyName Contains the name used for display.
bankAddress

Name and postal address of the bank.

companyMnemonic Alternative, memorable identifier for referencing the company.
localCountryCode Specifies the local country code for the company.
localCurrency Specifies the local currency for the company.
defaultCustomerCompany Indicates the default company.
subDivisionCode Indicates the subdivision code allocated to a company.
Sample Code: Company Creation Event Payload

{
    "specversion": "BBBBBBB",
    "type": "AAAAAAAAA",
    "subject": "DDDDDDDD",
    "source": "eeeee",
    "id": "bbbbbbb",
    "time": "BBBBB",
    "correlationid": "cccccc",
    "serviceid": "ee",
    "channelid": "cc",
    "organizationid": "bbbbbbbb",
    "tenantid": "cccccc",
    "businesskey": "DDDDDDDDD",
    "sequenceno": 1,
    "authorization": "ccccccccc",
    "customfilterid": "eee",
    "operationinstanceid": "ccc",
    "sequenceinstanceid": "e",
    "priority": 1,
    "data": {
        "sourceSystem": "AAAAAAAAAA",
        "companyCode": "BBBB",
        "companyNames": {
            "companyName": "cccccc"
        },
        "bankAddresses": {
            "bankAddress": "DDDDD"
        },
         "companyMnemonic": "ee",
        "languageId": "cc",
        "localCountryCode": "bbbbbbbb",
        "regionId": "cccccc",
        "localCurrency": "DDDDDDDDD",
        "rateSystem": 1,
        "customerCompany": "ccccccccc",
        "defaultCustomerCompany": "eee",
        "specialCustomerDetails": {
            "specialCustomerFile": "AAAAA",
            "specialCustomerFile": "CCCCCCC"
        },
         "defaultFinancialCompany": "ee",
        "specialFinancialDetails": {
            "specialFinancialFile": "AAAAA",
            "specialFinancialCompany": "CCCCCCC"
        },
        "currencyCompany": "ccc",
        "financialConfigurationCompany": "EEEEEE",
        "nostroCompany": "ccc",
        "nostroSubDivisionCode": "AAAAA",
        "subDivisionCode": "cc",
        "checkdigitType": "bbbbbbbb",
        "accountMask": "cccccc",
        "isBookCompany": "DDDDDDDDD",
        "companyGroupId": 1,
        "officialHolidayId": "ccccccccc",
        "branchHolidayId": "eee",
        "batchHolidayId": "DDDDDDDDD",
        "financialCompany": 1,
        "bankId": "ccccccccc",
        "branchId": "eee",
        "timeZone": "ccccccccc",
        "companyStatus": "eee"
    }
}



Sample Code: Loan Repayment Event Payload

{
  "specversion": "BBBBBBB",
  "type": "AAAAAAAAA",
  "subject": "DDDDDDDD",
  "source": "eeeee",
  "id": "bbbbbbb",
  "time": "BBBBB",
  "correlationid": "cccccc",
  "serviceid": "ee",
  "channelid": "cc",
  "organizationid": "bbbbbbbb",
  "tenantid": "cccccc",
  "businesskey": "DDDDDDDDD",
  "sequenceno": 1,
  "authorization": "ccccccccc",
  "customfilterid": "eee",
  "operationinstanceid": "ccc",
  "sequenceinstanceid": "e",
  "priority": 1,
  "data": {
    "baseDetails": [
      {
        "contractReference": "DDDDDD",
        "systemReference": "CCCC",
        "companyReference": "BBBBB",
        "eventName": "",
        "baseEventIdentifier": "b",
        "effectiveDate": "ddddddddd",
        "bookingDate": "EEEE",
        "contractCurrency": "AAAAAA",
        "channel": "BBBBBBBB",
        "branch": "eeeeee",
        "lineOfBusiness": "CCCCCCCC",
        "activityDateTimeStamp": "ccccccccc",
        "transactionReference": "ddddd",
        "reversalIndicator": false,
        "originationReference": "",
        "contractStatus": "BBB",
        "accountId": "BBBBB",
        "overdue": "",
        "feeDetails": [
          {
            "feeName": "DDDDDDD",
            "feeAmount": "",
            "feeCurrency": "bbbbb",
			"adjustFeeAmount": "aaaa",
            "adjustFeeReason": ""
          }
        ],
        "balances": [
          {
            "balanceName": "cccccccc",
            "closingBalance": "A",
            "dateType": "AAAAA",
            "debitTotalAmount": "bbbbbb",
            "creditTotalAmount": "bbbbbbbb",
            "timeStamp": "dddd"
          }
        ]
      }
    ],
	 "numberOfInstallments": "",
     "paymentHolidays": [
	 {
            "paymentType": "B",
            "description": "ddd",
            "billType": "AAA",
            "billTypeDescription": "dd",
            "holidayStartDate": "dddddd",
            "holidayPeriods": [
              {
                "holidayDate": "bb",
                "originalPaymentAmount": "EEEEEE",
                "newPaymentAmount": "FFFF",
                }
            ],
	 
	 "cancelledHolidays": [
	 {
		 
            "cancelledHolidayDate": "EE",
			"cancelledOriginalPaymentAmount": "AAAA",,
			"cancelledNewPaymentAmount": "BBBB",
			
          }
        ]
      }
	  ]
  }
  
}


Approve Company

API
The API that's used to approve company creation.

PUT /v1.0.0/reference/companyInitiation/{companyCode}

 

Event
The event that's emanated when company creation is approved.

approveCompanyInitiation.companyInitiationApproved

 

Event Payload

Note: See the Company Creation Event payload.