Service - CommerceAccounting Link: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
Mint (talk | contribs)
No edit summary
Line 16: Line 16:
objectType: "comAccLinkByBusiness",
objectType: "comAccLinkByBusiness",
canDelete: false,
canDelete: false,
belongTo: {
serviceTag: "User",
objectType: "user"
},
addOnDataStructure: [
addOnDataStructure: [
      {
{
          type:"rbac"
type:"rbac"
      }
},
 
     ],
     ],
storageResources: {
storageResources: {

Revision as of 07:44, 8 August 2026

Overview

Configures the link between a Business in Izara Commerce and an organization in Izara Accounting.

Repository

...

Object Schemas

Additional Information
Per Service Schemas

comAccLinkByBusiness

{
	objectType: "comAccLinkByBusiness",
	canDelete: false,
	addOnDataStructure: [
		{
			type:"rbac"
		},
    ],
	storageResources: {
        "myGraph":{
            "storageType": "graph",
            "graphServerTag": "GraphHandler"
        },
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccLinkByBusiness",
		}
    },
    fieldNames: {
		 businessId:{
            type: "string",
			requriedOnCreate: true,
			storageResourceTags: ['myGraph','dynamo']
         },		
		 organizationId:{
            type: "string",
			requriedOnCreate: true,
			storageResourceTags: ['myGraph','dynamo']
         }		
    },
    identifiers: [
		{
			// businessId
		}
    ]
}

comAccLinkByOrganization

{
	objectType: "comAccLinkByOrganization",
	canDelete: false,
	belongTo: {
		serviceTag: "User",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccLinkByOrganization",
		}
    },
    fieldNames: {
		// organizationId
		// businessId		
    },
    identifiers: [
		{
			// organizationId
		}
    ]
}

comAccAccountLink

{
	objectType: "comAccAccountLink",
	canDelete: true,
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccAccountLink",
		}
    },
    fieldNames: {
		businessId: {
			fromObjType:{
			  serviceTag: "CommerceAccountingLink",
			  objectType: "comAccLink" 
			},
		},
		organizationId: {
			fromObjType:{
			  serviceTag: "CommerceAccountingLink",
			  objectType: "comAccLink" 
			},
		},
		accountTag: { // this is the granular accounting classification that actions need to add entries to
			type: "string",
			requiredOnCreate: true,
			canUpdate: false,
			userCanUpdate: false,
			storageResourceTags: ["dynamo"],
		},
		accountId: { // accountId from Izara Accounting
			type: "string",
			requiredOnCreate: true,
			canUpdate: true,
			userCanUpdate: true,
			storageResourceTags: ["dynamo"],
		},
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId","organizationId"],
			name: "comAccLinkId",
		},
		{
			type: "sortKey",
			fieldName: "accountTag"
		},
    ]
}
  • sets up which Accounting Accounts are used for different connection tasks
  • example: which Accounting Account is adjusted when stock increases/decreases
  • will need to have a plugIn level shared const lib of all accountTags

Relationships

...

Working documents

CommerceAccounting Link