Service - CommerceAccounting Customer Payment: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
Created page with "= Overview = Handle payments by customers. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas <syntaxhighlight lang="JavaScript"> { objectType: "comAccCustomerPaymentLink", canDelete: false, belongTo: { serviceTag: "ComAccLink", objectType: "comAccLink" }, addOnDataStructure: [], storageResources: { "dynamo": { "storageType": "dynamoDB", "tableName": "comAccCustomerPaymentLink", } }, fieldNames: { //..."
 
No edit summary
Line 13: Line 13:
{
{
objectType: "comAccCustomerPaymentLink",
objectType: "comAccCustomerPaymentLink",
    generatedBy: "userGenerated",
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
serviceTag: "ComAccLink",
serviceTag: "CommerceAccountingLink",
objectType: "comAccLink"
objectType: "comAccLinkByBusiness"
},
},
addOnDataStructure: [],
addOnDataStructure: [],
Line 26: Line 27:
     },
     },
     fieldNames: {
     fieldNames: {
// probably have two dynamo tables, one identified by purchaseId, one by journalId
// businessId
// organizationId
// customerId
// accountLinkTag // type of link: ..
// accountId
     },
     },
     identifiers: [
     identifiers: [
{
{
// see above note
type: "partitionKey",
fieldNames: ["businessId", "organizationId", "customerId"],
name: "comAccLinkExpId",
},
{
type: "sortKey",
fieldName: "accountLinkTag"
},
    ]
}
</syntaxhighlight>
 
== comAccCustomerPayment ==
 
<syntaxhighlight lang="JavaScript">
{
objectType: "comAccCustomerPayment",
    generatedBy: "systemGenerated",
canDelete: false,
    addOnDataStructure: [],
storageResources: {
"dynamo": {
"storageType": "dynamoDB",
"tableName": "comAccCustomerPayment",
}
}
    },
    fieldNames: {
// businessId,
// organizationId,
// customerPaymentId,
// record lock eg: prefix: "updateCustomerPayment"
// updateCustomerPayment_status: {requiredOnCreate: true}, // open|lock,
// updateCustomerPayment_uniqueRequestId: {requiredOnCreate: true},
// updateCustomerPayment_timestamp: {requiredOnCreate: true},
journalId: {
type: "string",
optionalOnCreate: true,
canUpdate: true,
storageResourceTags: ["dynamo"],
},
    },
    identifiers: [
{
type: "partitionKey",
fieldNames: ["businessId", "organizationId"],
name: "comAccLinkId",
},
{
type: "sortKey",
fieldName: "customerPaymentId"
},
     ]
     ]
}
}

Revision as of 09:56, 8 August 2026

Overview

Handle payments by customers.

Repository

...

Object Schemas

Additional Information
Per Service Schemas
{
	objectType: "comAccCustomerPaymentLink",
    generatedBy: "userGenerated",
	canDelete: false,
	belongTo: {
		serviceTag: "CommerceAccountingLink",
		objectType: "comAccLinkByBusiness"
	},
	addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccCustomerPaymentLink",
		}
    },
    fieldNames: {
		// businessId
		// organizationId
		// customerId
		// accountLinkTag // type of link: ..
		// accountId
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId", "organizationId", "customerId"],
			name: "comAccLinkExpId",
		},
		{
			type: "sortKey",
			fieldName: "accountLinkTag"
		},
    ]
}

comAccCustomerPayment

{
	objectType: "comAccCustomerPayment",
    generatedBy: "systemGenerated",
	canDelete: false,
    addOnDataStructure: [],
	storageResources: {
		"dynamo": {
			"storageType": "dynamoDB",
			"tableName": "comAccCustomerPayment",
		}
    },
    fieldNames: {
		// businessId,
		// organizationId,
		// customerPaymentId,

		// record lock eg: prefix: "updateCustomerPayment"
		// updateCustomerPayment_status: {requiredOnCreate: true}, // open|lock, 
		// updateCustomerPayment_uniqueRequestId: {requiredOnCreate: true},
		// updateCustomerPayment_timestamp: {requiredOnCreate: true},

		journalId: {
			type: "string",
			optionalOnCreate: true,
			canUpdate: true,
			storageResourceTags: ["dynamo"],
		},
    },
    identifiers: [
		{
			type: "partitionKey",
			fieldNames: ["businessId", "organizationId"],
			name: "comAccLinkId",
		},
		{
			type: "sortKey",
			fieldName: "customerPaymentId"
		},
    ]
}
  • maintains a link between customerPaymentId and journalIds, so can adjust if changes made to payment

Relationships

...

flowSchemas

customerPaymentCreated

  • when creating a customer payment add journal entries

customerPaymentChange

  • make adjustment to journal entries
  • need to check for locked records

Working documents

CommerceAccounting Customer Payment