Service - CommerceAccounting Link: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Configures the link between a Business in Izara Commerce and an organization in Izara Accounting. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas == comAccLink == <syntaxhighlight lang="JavaScript"> { objectType: "comAccLink", canDelete: false, belongTo: { serviceTag: "User", objectType: "user" }, addOnDataStructure: [], storageResources: { "dynamo": { "storageType": "dynamoDB", "tableName": "co...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 10: Line 10:
; Additional Information: [[Per Service Schemas]]
; Additional Information: [[Per Service Schemas]]


== comAccLink ==
== comAccLinkByBusiness ==


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
objectType: "comAccLink",
objectType: "comAccLinkByBusiness",
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
Line 24: Line 24:
"dynamo": {
"dynamo": {
"storageType": "dynamoDB",
"storageType": "dynamoDB",
"tableName": "comAccLink",
"tableName": "comAccLinkByBusiness",
}
}
     },
     },
     fieldNames: {
     fieldNames: {
// probably have two dynamo tables, one identified by businessId, one by organizationId
// businessId
// organizationId
     },
     },
     identifiers: [
     identifiers: [
{
{
// see above note
// businessId
}
    ]
}
</syntaxhighlight>
 
== comAccLinkByOrganization ==
 
<syntaxhighlight lang="JavaScript">
{
objectType: "comAccLinkByOrganization",
canDelete: false,
belongTo: {
serviceTag: "User",
objectType: "user"
},
addOnDataStructure: [],
storageResources: {
"dynamo": {
"storageType": "dynamoDB",
"tableName": "comAccLinkByOrganization",
}
    },
    fieldNames: {
// organizationId
// businessId
    },
    identifiers: [
{
// organizationId
}
}
     ]
     ]
Line 98: Line 127:
</syntaxhighlight>
</syntaxhighlight>


* 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
* will need to have a plugIn level shared const lib of all accountTags



Latest revision as of 06:55, 18 April 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,
	belongTo: {
		serviceTag: "User",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccLinkByBusiness",
		}
    },
    fieldNames: {
		// businessId		
		// organizationId
    },
    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,
	belongTo: {
		serviceTag: "User",
		objectType: "user"
	},
	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