Views:

Related resources:

Tutorials

Reference

How-to guides

If you create your own universe of transaction types, you must nominate a source and a scope for each type.

Note: The source and scope are important when LUSID resolves upserted transactions to transaction types.

A source groups transaction types from the same data provider. For example, if you obtain transaction feeds from both Bloomberg and Goldman Sachs, you have the option to create distinct sets of transaction types processing these transactions and keep them in separate sources. You can choose not to do this and store all your transaction types in the default source provided with LUSID if you wish. Note the following about sources:

  • A source cannot contain two transaction types with the same name.
  • The built-in transaction types provided with LUSID are stored in the default and alt1 sources.
  • A transaction upserted to a portfolio expects its transaction type to be in the default source unless you specify the source field on that transaction. See how to do this.

A scope is a logical repository of transaction types that can be entitled in the same way as scopes throughout LUSID. You have the option to domicile a set of transaction types in a custom scope and only allow particular transaction portfolios to access those transaction types. You can choose not to do this and domicile all your transaction types in the default scope provided with LUSID if you wish, accessible to every portfolio out-of-the-box. Note the following about scopes:

  • The built-in transaction types and built-in sides provided with LUSID are domiciled in the default scope.
  • A portfolio expects upserted transactions to reference transaction types in the default scope unless you specify the transactionTypeScope field on that portfolio. See how to do this.
  • A side is a plug-and-play component of a movement, which itself is a component of a transaction type. Sides ultimately used by transaction types must be domiciled in the same scope.

The following diagrams explore some possible combinations of scopes and sources.

Store custom transaction types in the default source and scope

All your custom transaction types are accessible to every portfolio out-of-the-box. There's no need to set the transactionTypeScope field on portfolios, nor the source field on transactions upserted to those portfolios. 

Custom transaction types can use the built-in sides. We recommend removing the built-in transaction types to avoid unintended clashes.
 


 

Store custom transaction types in a custom source and scope

Your custom transaction types cannot use the built-in sides. If you want the same behavior, you must create new sides with the same definitions in the custom scope.

You must set the transactionTypeScope field on portfolios to the custom scope, and the source field on transactions upserted to those portfolios to the custom source.
 


 

Store custom transaction types in a custom scope and multiple custom sources

You must set the transactionTypeScope field on portfolios to the custom scope, and make sure the source field on transactions upserted to those portfolios references the correct custom source.
 


 

Store custom transaction types in multiple custom scopes and sources

You must make sure the transactionTypeScope field on portfolios references the correct custom scope, and the source field on transactions upserted to those portfolios references the correct custom source.