<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://izara.io/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Olive</id>
	<title>Izara Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://izara.io/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Olive"/>
	<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php/Special:Contributions/Olive"/>
	<updated>2026-05-03T08:30:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Search_Results&amp;diff=4312</id>
		<title>Service - Search Results</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Search_Results&amp;diff=4312"/>
		<updated>2026-04-29T11:41:50Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service that handles search result requests, feeding work to [[Service - Search Result (handlers)]]. Takes results from Complex Filter service which are identifier ids only and adds additional fields of information ready for display to end consumer, either directly if no sorting required, or via Sort Result service.&lt;br /&gt;
&lt;br /&gt;
Functions as a cache of Search Result data, so if subsequent matching requests come in they do not need to pass on to Complex Filter or find required data.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-search/izara-core-search-search-results/src/master/&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;SearchType&amp;quot;,&lt;br /&gt;
	configTag: &amp;quot;xx&amp;quot; // {eg: sellOffer/Product/VariantProduct etc..}&lt;br /&gt;
	configValue: {&lt;br /&gt;
		complexFilterServiceName: &amp;quot;xx&amp;quot; // {service name of complex filter that handles this type}&lt;br /&gt;
		complexFilterType: &amp;quot;xx&amp;quot; // optional, if complexFilterType is different to searchType&lt;br /&gt;
		dataHandlerServiceName: &amp;quot;xx&amp;quot; {service name used to create function/queue names for finding data results, often a Manager service for the object}&lt;br /&gt;
		requireRequestProperties: {&lt;br /&gt;
			{requiredData fieldName}: [ // dependant on what requiredData requested&lt;br /&gt;
				&amp;quot;xx&amp;quot;,&lt;br /&gt;
				// .. {properties that must be received in the request for this searchType to process correctly}&lt;br /&gt;
			]&lt;br /&gt;
		},&lt;br /&gt;
		parentDataIdentifierFields: [&lt;br /&gt;
			&amp;quot;xx&amp;quot;, // these are always found with any request for this SearchType to add into ParentDataId table for each found data&lt;br /&gt;
		],&lt;br /&gt;
		childSearchResults: {&lt;br /&gt;
			{childSearchType}: { // searchType of child searchResult, matches filterType for building child complex filter&lt;br /&gt;
				searchResultsServiceName: &amp;quot;xx&amp;quot;, // allows for results to be saved by different deployed services&lt;br /&gt;
				requiredData: { // requiredData we request from the child searchType depending on what requiredData fields are set in the parent's request&lt;br /&gt;
					{parent requiredData fieldName}: [&lt;br /&gt;
						&amp;quot;xx&amp;quot;, // list of child requiredData fields to add&lt;br /&gt;
						// ..&lt;br /&gt;
					],&lt;br /&gt;
					// ..&lt;br /&gt;
				},&lt;br /&gt;
				passOnRequestProperties: [ // parent requestProperties to pass on to the child searchResult request, if not received in parent request will error&lt;br /&gt;
					&amp;quot;xx&amp;quot;, &lt;br /&gt;
					// .. &lt;br /&gt;
				]&lt;br /&gt;
			},&lt;br /&gt;
			// ..&lt;br /&gt;
		}&lt;br /&gt;
		hookBeforeFindDataServiceName: &amp;quot;xx&amp;quot;, // if set will send async request to external service before finding data&lt;br /&gt;
		hookAfterFindDataServiceName: &amp;quot;xx&amp;quot;, // if set will send async request to external service before finding data&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SearchResultMain ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	searchResultId: &amp;quot;xx&amp;quot; // main element for one set of search results&lt;br /&gt;
	searchDetailId: &amp;quot;xx&amp;quot; // hashes of other values that affect result data&lt;br /&gt;
	searchResultMainStatus: &amp;quot;processing&amp;quot;,&lt;br /&gt;
	requiredData: {} // same as request&lt;br /&gt;
	childSearchIds: {&lt;br /&gt;
		{childSearchType}: [{array of childSearchIds}], // array of childSearchIds for this parent searchResultMain, split out by childSearchType&lt;br /&gt;
		// ..&lt;br /&gt;
	}&lt;br /&gt;
	createTime: currentTime.getTime(),&lt;br /&gt;
	expiryTime: expiryTime.getTime(),&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: searchResultId&lt;br /&gt;
* sort key: searchDetailId&lt;br /&gt;
* searchResultId: for standard single filter searches is {searchType}_{filterMainId}&lt;br /&gt;
* searchDetailId: for standard single filter searches is {requestPropertiesHash}_{requiredDataHash}&lt;br /&gt;
* searchResultId: for combined search results is {searchType}_{searchParamsHash}&lt;br /&gt;
* searchDetailId: for combined search results is {requiredDataHash}&lt;br /&gt;
&lt;br /&gt;
== SearchResultParents ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	childSearchId: &amp;quot;xx&amp;quot;, // {searchResultId}_{searchDetailId}&lt;br /&gt;
	parentSearchId: &amp;quot;xx&amp;quot; // {searchResultId}_{searchDetailId}&lt;br /&gt;
	searchResultParentStatus: &amp;quot;processing&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: childSearchId&lt;br /&gt;
* sort key: parentSearchId&lt;br /&gt;
* when a SearchResultMain is finished it checks this table to see if any parents need to be processed&lt;br /&gt;
&lt;br /&gt;
== SearchResultData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	searchId: &amp;quot;xx&amp;quot;, // {searchResultId}_{searchDetailId}&lt;br /&gt;
	dataId: &amp;quot;xx&amp;quot;, // id of element (sellOfferId/productId/variantProduct(type and id))&lt;br /&gt;
	// reconsider this field, does not scale: childData: {}, // only used when childId set in SearchResultMain, saves requiredData results for all matching child records&lt;br /&gt;
	searchResultDataStatus: &amp;quot;processing&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: searchId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
== RequiredData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	requiredDataId: &amp;quot;xx&amp;quot;, // {searchType}_{dataId}_{requestPropertiesHash} OR maybe hash of object of these values?&lt;br /&gt;
	fieldName: &amp;quot;xx&amp;quot;,&lt;br /&gt;
	requiredDataValue: &amp;quot;xx&amp;quot;, // value found for this reqdata field&lt;br /&gt;
	requiredDataStatus: &amp;quot;xx&amp;quot;, // waitingExternalData | complete | invalid&lt;br /&gt;
    createTime: currentTime.getTime(),&lt;br /&gt;
    expiryTime: expiryTime.getTime(),&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: requiredDataId &lt;br /&gt;
* sort key: fieldName&lt;br /&gt;
* one record is one result we can calculate from external services, this can be shared by multiple SearchResultData records&lt;br /&gt;
* requiredDataId includes identifiers that can affect the data's value&lt;br /&gt;
* if keys too long for Dynamo we could hash an object containing all required fields and can add the values of each into the item separately, if needed&lt;br /&gt;
* primary key can be used when result comes back from external service, so that message must include all values needed to make requiredDataId&lt;br /&gt;
* can probably add fields during processing to store extra data for processing this SearchResultData record&lt;br /&gt;
* if we want to find all records for one SearchResultData we could search for just the partition key, but it might return additonal fields used by other searches with different requiredData&lt;br /&gt;
&lt;br /&gt;
== RequiredDataSearchResultData ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	requiredDataId_fieldName: &amp;quot;xx&amp;quot;, // {requiredDataId}_{fieldName}&lt;br /&gt;
	searchId: &amp;quot;xx&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: requiredDataId_fieldName&lt;br /&gt;
* sort key: searchId&lt;br /&gt;
* can extract dataId from requiredDataId_fieldName to find primary key for SearchResultData&lt;br /&gt;
* used to create links between RequiredData results and all SearchResultData that need it&lt;br /&gt;
&lt;br /&gt;
== ParentDataId ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	parentId: &amp;quot;xx&amp;quot;, // {parent searchType}_{parent dataId}_{child searchResultId (searchType and filterMainId)}_{requestPropertiesHash}&lt;br /&gt;
	childDataId: &amp;quot;xx&amp;quot; // {child dataId}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: parentId, identifies one parent dataId matching to a specific childSearchResult, excluding requiredData which is unimportant in this context, only need to specify child searchType/filterMainId/requestPropertiesHash to identify what matching one unique set of parent dataIds&lt;br /&gt;
* sort key: childDataId&lt;br /&gt;
* child filterMainId is required because we will have different ranges of childIds stored depending on what filter was used to find them&lt;br /&gt;
&lt;br /&gt;
= requestProperties =&lt;br /&gt;
&lt;br /&gt;
These are properties that are added to a Search Result request that affect the data found, they may be required or optional. Because these properties can affect the value of data they must be added to SearchResultMain identifiers to differentiate batches of results.&lt;br /&gt;
&lt;br /&gt;
= requireRequestProperties =&lt;br /&gt;
&lt;br /&gt;
Some requiredData fields will need additional properties to be received in the initial request.&lt;br /&gt;
* example: variant/product/sellOffer pricing fields will require locationNodeId/s and browseQuantity&lt;br /&gt;
* example: all translations require language/s&lt;br /&gt;
&lt;br /&gt;
= Moving child SearchResult data to parent = &lt;br /&gt;
* eg: product searchType has sellOffer child searchType data&lt;br /&gt;
* eg: variantProduct searchType has product child searchType data&lt;br /&gt;
* parent must wait for child FindData to complete before can process parents FindData&lt;br /&gt;
* child SearchResult might already have completed before the parent request was received (ie by a different request), need to account for this&lt;br /&gt;
* (old design - can still use if have to, but would be best to separate results so can scale, eg if want to show details about child products, that could pass as a separate Search/Sort set of results including pagination) aggregate multiple child data into the parents data values, but also keep a record of all children in the parents data record&lt;br /&gt;
&lt;br /&gt;
= Multiple Search Results services =&lt;br /&gt;
&lt;br /&gt;
* design to allow for different implementations, eg catalogs can choose which Search Results service it uses&lt;br /&gt;
* could achieve this be having a setting in Catalog handlers or Catalog Manager that records which Search Result service the Catalog uses&lt;br /&gt;
&lt;br /&gt;
= browseQuantity for calculating prices =&lt;br /&gt;
&lt;br /&gt;
* when browsing, a user can define browseQuantity they want to buy (default 1), this would be injected into price calculation to obtain available price for each sellOffer&lt;br /&gt;
* different to filters, eg availableQuantity, which determines which sellOffers are returned. (we might have a method/hook that validates or updates the complex filter so these settings don't conflict, but not needed)&lt;br /&gt;
* added to requestProperties in request&lt;br /&gt;
* I think if we request prices for a SellOffer in a quantity it cannot handle, eg browseQuantity is 100 but selloffer only has 20 remaining, the pricing function should return an error, could then remove (or mark as not enough quantity available) such sellOffers, so they might still exist in search results and maybe sort results but show quantity not/available.&lt;br /&gt;
&lt;br /&gt;
= Notes = &lt;br /&gt;
&lt;br /&gt;
* Consider requests find all possible needed data, even if the current request does not use it, that way subsequent requests can feed off the same processed data, ie standardize requiredData at request level to use cache more often&lt;br /&gt;
* there might be a special case where we find all results with an empty filter, eg for a child Search Result request which is filtered only by the adult results and wants to not filter child results in any way, that would create a record for every item in the child request and include links to all parent dataIds, that data set could be used by any other request that matches searchType/requestPropertiesHash/requiredDataHash. Maybe work that in in the future as a separate check when processing parent requests so not need to send child request, or intentionally maintain that result set. Might be able to find other shared efficient results as well, however having cached results in RequiredData will also reduce a lot of work and maybe mitigate the need for this&lt;br /&gt;
* maybe could optimise querying data even further by copying final data for each RequiredData record into SearchResultData record, so not need to query RequiredData table, but maybe not needed as most consumer queries will point to SortResult&lt;br /&gt;
&lt;br /&gt;
= Normalize Structure SearchResult Request =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    objType: {&lt;br /&gt;
      serviceTag: &amp;quot;XX&amp;quot;,&lt;br /&gt;
      objectType: &amp;quot;xx&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    searchResultId: &amp;quot;hash_filter_main&amp;quot;,&lt;br /&gt;
    searchDetailId: &amp;quot;hash_requiredData_main_all&amp;quot;,&lt;br /&gt;
    requiredDataObjects: {&lt;br /&gt;
      hash_fieldNameObject_A: {&lt;br /&gt;
        fieldName: &amp;quot;xxxx&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      hash_fieldNameObject_B: {&lt;br /&gt;
        fieldName: &amp;quot;xxxx&amp;quot;,&lt;br /&gt;
        linkPathObjectId: &amp;quot;hash_linkPathObject_A&amp;quot;,&lt;br /&gt;
        complexFilterCombinationIds: [ //* optional&lt;br /&gt;
          &amp;quot;hash_filter_of_use_for_combination&amp;quot;&lt;br /&gt;
        ]&lt;br /&gt;
      },&lt;br /&gt;
      hash_fieldNameObject_B: {&lt;br /&gt;
        requiredDataType: 'variantAndOrProductReqData',&lt;br /&gt;
        xxxxRequiredData: 'hash_requiredData_of_xxxx',&lt;br /&gt;
        yyyyRequiredData: 'hash_requirdData_of_yyyy'&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    searchParams: {&lt;br /&gt;
      //* case this request use filter main&lt;br /&gt;
      filterObjectId: &amp;quot;hash_filter_main&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      //* case this request send identifiers and not send request to ComplexFilter Service&lt;br /&gt;
      identifiersArray: [&lt;br /&gt;
        {&lt;br /&gt;
          xxId: &amp;quot;xxxx_1&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          xxId: &amp;quot;xxxx_2&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
      ],&lt;br /&gt;
&lt;br /&gt;
      //* case searchResult generated&lt;br /&gt;
      searchResultGeneratedParam: { //* front end cannot create searchParams --&amp;gt; searchResultGeneratedParam&lt;br /&gt;
        xxxx: { //* sort request of each objType&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;xxxx&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          searchResultId: &amp;quot;11111&amp;quot;,&lt;br /&gt;
          searchDetailId: &amp;quot;22222&amp;quot;,&lt;br /&gt;
          requiredDataObject: {&lt;br /&gt;
            hash_requiredData_of_xxxx: {&lt;br /&gt;
              fieldName: &amp;quot;xxxx&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          searchParams: {&lt;br /&gt;
            filterObjectId: &amp;quot;11111&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          filterElements: {&lt;br /&gt;
            11111: {&lt;br /&gt;
              objType: {&lt;br /&gt;
                serviceTag: &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
                objectType: &amp;quot;xxxx&amp;quot;&lt;br /&gt;
              },&lt;br /&gt;
              filterElement: {&lt;br /&gt;
                filterType: &amp;quot;logical&amp;quot;,&lt;br /&gt;
                partitionKeyValues: {&lt;br /&gt;
                  xxxxId: {&lt;br /&gt;
                    value: &amp;quot;xxxx&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          linkPathObjects: {},&lt;br /&gt;
          linkPathSteps: {},&lt;br /&gt;
          sortFields: [&lt;br /&gt;
            {&lt;br /&gt;
              fieldName: &amp;quot;yyyy&amp;quot;,&lt;br /&gt;
              dataType: &amp;quot;string&amp;quot;,&lt;br /&gt;
              sortOrder: &amp;quot;descending&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        },&lt;br /&gt;
        yyyy: { //* sort request of each objType&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: &amp;quot;YYYY&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          searchResultId: &amp;quot;33333&amp;quot;,&lt;br /&gt;
          searchDetailId: &amp;quot;44444&amp;quot;,&lt;br /&gt;
          requiredDataObject: {&lt;br /&gt;
            hash_requirdData_of_yyyy: {&lt;br /&gt;
              fieldName: &amp;quot;xxxx&amp;quot;,&lt;br /&gt;
              linkPathObjectId: &amp;quot;hash_LinkPathObject_B&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          searchParams: {&lt;br /&gt;
            filterObjectId: &amp;quot;33333&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          filterElements: {&lt;br /&gt;
            33333: {&lt;br /&gt;
              objType: {&lt;br /&gt;
                serviceTag: &amp;quot;YYYY&amp;quot;,&lt;br /&gt;
                objectType: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
              },&lt;br /&gt;
              filterElement: {&lt;br /&gt;
                filterType: &amp;quot;logical&amp;quot;,&lt;br /&gt;
                partitionKeyValues: {&lt;br /&gt;
                  yyyyId: {&lt;br /&gt;
                    value: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          linkPathObjects: {&lt;br /&gt;
            hash_LinkPathObject_B: {&lt;br /&gt;
              initialObjType: {&lt;br /&gt;
                serviceTag: &amp;quot;YYYY&amp;quot;,&lt;br /&gt;
                objectType: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
              },&lt;br /&gt;
              linkSteps: [&lt;br /&gt;
                &amp;quot;linkStep_B_1&amp;quot;,&lt;br /&gt;
                &amp;quot;linkStep_B_2&amp;quot;&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          linkPathSteps: {&lt;br /&gt;
            linkStep_B_1: {&lt;br /&gt;
              pathLinkType: {&lt;br /&gt;
                objType: {&lt;br /&gt;
                  serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
                  objectType: &amp;quot;x&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                relType: {&lt;br /&gt;
                  serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
                  relationshipTag: &amp;quot;hasX&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                direction: &amp;quot;from&amp;quot;&lt;br /&gt;
              },&lt;br /&gt;
              //* setting of links&lt;br /&gt;
            },&lt;br /&gt;
            linkStep_B_2: {&lt;br /&gt;
              pathLinkType: {&lt;br /&gt;
                objType: {&lt;br /&gt;
                  serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
                  objectType: &amp;quot;x&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                relType: {&lt;br /&gt;
                  serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
                  relationshipTag: &amp;quot;hasX&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                direction: &amp;quot;from&amp;quot;&lt;br /&gt;
              },&lt;br /&gt;
              //* setting of links&lt;br /&gt;
            }&lt;br /&gt;
          },&lt;br /&gt;
          sortFields: [&lt;br /&gt;
            {&lt;br /&gt;
              fieldName: &amp;quot;yyyy&amp;quot;,&lt;br /&gt;
              dataType: &amp;quot;string&amp;quot;,&lt;br /&gt;
              sortOrder: &amp;quot;descending&amp;quot;,&lt;br /&gt;
              refFieldNameId: &amp;quot;hash_requirdData_of_yyyy&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    filterElements: { //* other type can see in structure_complexFilter&lt;br /&gt;
      hash_filter_main: {&lt;br /&gt;
        objType: {&lt;br /&gt;
          serviceTag: &amp;quot;XX&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;xx&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        filterElement: {&lt;br /&gt;
          filterType: &amp;quot;logical&amp;quot;,&lt;br /&gt;
          partitionKeyValues: {&lt;br /&gt;
            xxId: {&lt;br /&gt;
              value: &amp;quot;xxx&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      hash_filter_of_use_for_combination: {&lt;br /&gt;
        //* same filter element&lt;br /&gt;
      },&lt;br /&gt;
      hash_filter_of_use_for_perParent: {&lt;br /&gt;
        //* has filter element special&lt;br /&gt;
        objType: {&lt;br /&gt;
          serviceTag: &amp;quot;XX&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;xx&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        filterElement: {&lt;br /&gt;
          filterType: &amp;quot;logical&amp;quot;,&lt;br /&gt;
          partitionKeyValues: {&lt;br /&gt;
            xxId: {&lt;br /&gt;
              valueType: &amp;quot;perParentIdentifiers&amp;quot;, //* special for perParent to add parent identifiers of link from IntemediateIdentifiers table&lt;br /&gt;
              perParentIdentifierFieldname: &amp;quot;xxId&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      ref_filterMainIdA: {&lt;br /&gt;
        //* same filter element&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    linkPathObjects: {&lt;br /&gt;
      hash_linkPathObject_A: {&lt;br /&gt;
        initialObjType: {&lt;br /&gt;
          serviceTag: &amp;quot;XX&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;xx&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        linkSteps: [&lt;br /&gt;
          &amp;quot;linkStep_A_1&amp;quot;,&lt;br /&gt;
          &amp;quot;linkStep_A_2&amp;quot;&lt;br /&gt;
        ]&lt;br /&gt;
      },&lt;br /&gt;
      tttt: {&lt;br /&gt;
        //* same linkPathObject&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    linkPathSteps: {&lt;br /&gt;
      linkStep_A_1: {&lt;br /&gt;
        pathLinkType: {&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;x&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          relType: {&lt;br /&gt;
            serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
            relationshipTag: &amp;quot;hasX&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          direction: &amp;quot;from&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        //* setting of links&lt;br /&gt;
        requestProperties: {&lt;br /&gt;
          tag_xxx: &amp;quot;cccc&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        filterObjectId: &amp;quot;ref_filterMainIdA&amp;quot;,&lt;br /&gt;
        aggregate: 'max',&lt;br /&gt;
        sortFields: [&lt;br /&gt;
          {&lt;br /&gt;
            fieldName: 'xxxx',&lt;br /&gt;
            dataType: 'string',&lt;br /&gt;
            sortOrder: 'descending',&lt;br /&gt;
          },&lt;br /&gt;
          {&lt;br /&gt;
            fieldName: 'tttt',&lt;br /&gt;
            dataType: 'string',&lt;br /&gt;
            sortOrder: 'descending',&lt;br /&gt;
            refFieldNameId: &amp;quot;d1b376c689a2de1370e30f7629edc0cefc8d29f0&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        ],&lt;br /&gt;
        combine: &amp;quot;true&amp;quot;,&lt;br /&gt;
        requiredDataObjects: { //* use for linkPath has linkPath&lt;br /&gt;
          d1b376c689a2de1370e30f7629edc0cefc8d29f0: {&lt;br /&gt;
            fieldName: 'tttt',&lt;br /&gt;
            linkPathObjectId: &amp;quot;tttt&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        },&lt;br /&gt;
        perParentCombinationIds: [&lt;br /&gt;
          {&lt;br /&gt;
            tag: 'tag_yyyy',&lt;br /&gt;
            filterMainId: 'hash_filter_of_use_for_perParent'&lt;br /&gt;
          }&lt;br /&gt;
        ],&lt;br /&gt;
        applyCombinations: [&lt;br /&gt;
          {&lt;br /&gt;
            tag: 'tag_xxxx',&lt;br /&gt;
            filterMainId: 'hash_filter_of_use_for_combination'&lt;br /&gt;
          }&lt;br /&gt;
        ],&lt;br /&gt;
        comparison: &amp;quot;greaterThan&amp;quot;,&lt;br /&gt;
        comparisonSortField: &amp;quot;upToValue&amp;quot;,&lt;br /&gt;
        comparisonSortDataType: &amp;quot;string&amp;quot;,&lt;br /&gt;
        comparisonValue: 20,&lt;br /&gt;
      },&lt;br /&gt;
      linkStep_A_2: {&lt;br /&gt;
        pathLinkType: {&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;x&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          relType: {&lt;br /&gt;
            serviceTag: &amp;quot;X&amp;quot;,&lt;br /&gt;
            relationshipTag: &amp;quot;hasX&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          direction: &amp;quot;from&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        //* setting of links&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= hash linkPath =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchDetailId = 'all_requiredDataHash'&lt;br /&gt;
&lt;br /&gt;
all_requiredDataHash = hash(&lt;br /&gt;
  {&lt;br /&gt;
    requiredDataObjects: { all_fieldNameObjects },&lt;br /&gt;
    linkPathObjects: { all_linkPathObjects }, //*if not have, set default = {}&lt;br /&gt;
    linkPathSteps: { all_linkPathSteps } //*if not have, set default = {}&lt;br /&gt;
  }&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
requiredDataObjects = {&lt;br /&gt;
  hash_fieldNameObject: {&lt;br /&gt;
    fieldName: &amp;quot;A_fieldName&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  hash_fieldNameObject2: {&lt;br /&gt;
    fieldName: &amp;quot;C_fieldName&amp;quot;,&lt;br /&gt;
    linkPathObjectId: &amp;quot;hash_linkPathObject&amp;quot;,&lt;br /&gt;
    complexFilterCombinationIds: [&lt;br /&gt;
      &amp;quot;hash_filter_element_for_complexFilterCombination&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hash_fieldNameObject = hash({&lt;br /&gt;
  fieldName: {&lt;br /&gt;
    fieldName: &amp;quot;fieldName&amp;quot;,&lt;br /&gt;
    linkPathObjectId: &amp;quot;hash_linkPathObject&amp;quot;, //optional, if requiredData has linkPath&lt;br /&gt;
    complexFilterCombinationIds: [&lt;br /&gt;
      &amp;quot;hash_filter_element_for_complexFilterCombination&amp;quot;&lt;br /&gt;
    ] //optional, if requiredData has combination complexFilter&lt;br /&gt;
  },&lt;br /&gt;
  linkPathObjects: {&lt;br /&gt;
    hash_linkPathObject: {&lt;br /&gt;
      initialObjType: { A },&lt;br /&gt;
      linkSteps: [&amp;quot;hash_linkStep1&amp;quot;, &amp;quot;hash_linkStep2&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  linkPathSteps: {&lt;br /&gt;
    hash_linkStep1: {&lt;br /&gt;
      pathLinkType: {&lt;br /&gt;
        objType: { B },&lt;br /&gt;
        relType: { hasB },&lt;br /&gt;
        direction: &amp;quot;&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
&lt;br /&gt;
      //* other settings of each link //* optional&lt;br /&gt;
      filterObjectId: &amp;quot;&amp;quot;,&lt;br /&gt;
      requestProperties: {},&lt;br /&gt;
      aggregate: &amp;quot;&amp;quot;,&lt;br /&gt;
      sortFields: [],&lt;br /&gt;
      requiredDataObjects: {},&lt;br /&gt;
      combine: true | false,&lt;br /&gt;
      perParentCombinationIds: [],&lt;br /&gt;
      applyCombinations: [],&lt;br /&gt;
      comparison: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonSortField: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonSortDataType: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonValue: &amp;quot;&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    hash_linkStep2: {&lt;br /&gt;
      pathLinkType: {&lt;br /&gt;
        objType: { C },&lt;br /&gt;
        relType: { hasC },&lt;br /&gt;
        direction: &amp;quot;&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
&lt;br /&gt;
      //* other settings of each link //* optional&lt;br /&gt;
      filterObjectId: &amp;quot;&amp;quot;,&lt;br /&gt;
      requestProperties: {},&lt;br /&gt;
      aggregate: &amp;quot;&amp;quot;,&lt;br /&gt;
      sortFields: [],&lt;br /&gt;
      requiredDataObjects: {},&lt;br /&gt;
      combine: true | false,&lt;br /&gt;
      perParentCombinationIds: [],&lt;br /&gt;
      applyCombinations: [],&lt;br /&gt;
      comparison: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonSortField: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonSortDataType: &amp;quot;&amp;quot;,&lt;br /&gt;
      comparisonValue: &amp;quot;&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
linkPathObjects = {&lt;br /&gt;
  hash_fieldNameObject2: {&lt;br /&gt;
    initialObjType: {},&lt;br /&gt;
    linkSteps: [&amp;quot;hash_linkStep1&amp;quot;, &amp;quot;hash_linkStep2&amp;quot;]&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
hash_fieldNameObject2 = hash({&lt;br /&gt;
  initialObjType: { A },&lt;br /&gt;
  linkSteps: [&amp;quot;hash_linkStep1&amp;quot;, &amp;quot;hash_linkStep2&amp;quot;]&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
linkPathSteps = {&lt;br /&gt;
  hash_linkStep1: {&lt;br /&gt;
    pathLinkType: {&lt;br /&gt;
      objType: { B },&lt;br /&gt;
      relType: { hasB },&lt;br /&gt;
      direction: &amp;quot;&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    //* other settings of each link //* optional&lt;br /&gt;
    filterObjectId: &amp;quot;&amp;quot;,&lt;br /&gt;
    requestProperties: {},&lt;br /&gt;
    aggregate: &amp;quot;&amp;quot;,&lt;br /&gt;
    sortFields: [],&lt;br /&gt;
    requiredDataObjects: {},&lt;br /&gt;
    combine: true | false,&lt;br /&gt;
    perParentCombinationIds: [],&lt;br /&gt;
    applyCombinations: [],&lt;br /&gt;
    comparison: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonSortField: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonSortDataType: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonValue: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  hash_linkStep2: {&lt;br /&gt;
    pathLinkType: {&lt;br /&gt;
      objType: { C },&lt;br /&gt;
      relType: { hasC },&lt;br /&gt;
      direction: &amp;quot;&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    //* other settings of each link //* optional&lt;br /&gt;
    filterObjectId: &amp;quot;&amp;quot;,&lt;br /&gt;
    requestProperties: {},&lt;br /&gt;
    aggregate: &amp;quot;&amp;quot;,&lt;br /&gt;
    sortFields: [],&lt;br /&gt;
    requiredDataObjects: {},&lt;br /&gt;
    combine: true | false,&lt;br /&gt;
    perParentCombinationIds: [],&lt;br /&gt;
    applyCombinations: [],&lt;br /&gt;
    comparison: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonSortField: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonSortDataType: &amp;quot;&amp;quot;,&lt;br /&gt;
    comparisonValue: &amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
hash_linkStep1 = hash({&lt;br /&gt;
  pathLinkType: {&lt;br /&gt;
    objType: { B },&lt;br /&gt;
    relType: { hasB },&lt;br /&gt;
    direction: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  //* other settings of each link //* optional&lt;br /&gt;
  filterObjectId: &amp;quot;&amp;quot;,&lt;br /&gt;
  requestProperties: {},&lt;br /&gt;
  aggregate: &amp;quot;&amp;quot;,&lt;br /&gt;
  sortFields: [],&lt;br /&gt;
  requiredDataObjects: {},&lt;br /&gt;
  combine: true | false,&lt;br /&gt;
  perParentCombinationIds: [],&lt;br /&gt;
  applyCombinations: [],&lt;br /&gt;
  comparison: &amp;quot;&amp;quot;,&lt;br /&gt;
  comparisonSortField: &amp;quot;&amp;quot;,&lt;br /&gt;
  comparisonSortDataType: &amp;quot;&amp;quot;,&lt;br /&gt;
  comparisonValue: &amp;quot;&amp;quot;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Search Results|Working_documents - Search Results]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Search Results]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4299</id>
		<title>Service - Translations</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4299"/>
		<updated>2026-04-17T07:26:42Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service manages language translations.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-shared/izara-core-shared-translations&lt;br /&gt;
&lt;br /&gt;
= Schemas =&lt;br /&gt;
&lt;br /&gt;
==ObjectSchemas==&lt;br /&gt;
&lt;br /&gt;
=== translationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationText&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationTextId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationTextId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* actual text used, identified by text so shared by all use cases&lt;br /&gt;
* both translationLink and systemTextTranslationLink connect to translation instances&lt;br /&gt;
&lt;br /&gt;
=== translationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;textTag&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* creates a link between a subject node and a translation text&lt;br /&gt;
* when recalculating current translation for a languageCode we add the calculated weighted value to this node as a property&lt;br /&gt;
&lt;br /&gt;
=== systemTextTranslationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;systemTextTranslationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;systemTextTranslationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;systemTextTranslationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== isTranslationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	isTranslationText: {&lt;br /&gt;
		storageResources: {&lt;br /&gt;
			myGraph: {&lt;br /&gt;
				storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
				graphServerTag: &amp;quot;GraphHandler&amp;quot;			&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		links: [&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;translationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;SystemTextTranslationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== hasTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    hasTranslationLink: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
=== defaultTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    defaultTranslationLink: {&lt;br /&gt;
      moveBy: 'systemWithUserId',&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      fieldNames: {&lt;br /&gt;
        originTimestamp: {&lt;br /&gt;
          type: 'number',&lt;br /&gt;
          requiredOnCreate: true,&lt;br /&gt;
          canUpdate: true,&lt;br /&gt;
          validation: {}&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
=== currentTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    currentTranslationLink: {&lt;br /&gt;
      moveBy: 'systemWithUserId',&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      fieldNames: {&lt;br /&gt;
        originTimestamp: {&lt;br /&gt;
          type: 'number',&lt;br /&gt;
          requiredOnCreate: true,&lt;br /&gt;
          canUpdate: true,&lt;br /&gt;
          validation: {}&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
=== supportTranslation ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    supportTranslation: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;systemTextTranslationLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;UserAccount&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;user&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== opposeTranslation ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    opposeTranslation: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;systemTextTranslationLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;UserAccount&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;user&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
* NOTE: Translation generation flow &lt;br /&gt;
* newTranslationLink&lt;br /&gt;
*  -Create translationText entity&lt;br /&gt;
*  - Associate translationLink with subject&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configTag: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;TranslationGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LogicalResults ==&lt;br /&gt;
&lt;br /&gt;
Stores results for any requests to perform logical searches on media links&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	resultId: xxx // eg: filterMainId for a single logical element&lt;br /&gt;
	dataId: xxx // one translationLinkId or one subject nodes identifier (the logical request will set what property should be used)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: resultId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
= Graph database (delete)  = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Translations Graph]] ==&lt;br /&gt;
&lt;br /&gt;
* {textTag} is the name of the text being translated, eg a Catalog subject node will have a textTag &amp;quot;catalogName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== (subject nodes) ====&lt;br /&gt;
&lt;br /&gt;
Subject node schemas are managed by each service that needs translations, normally as a basic schema with identifier properties only.&lt;br /&gt;
&lt;br /&gt;
* nodeIdentifierLabels: matches that specific object being translated, eg: catalog&lt;br /&gt;
* nodeIdentifierProperties: matches that specific object being translated, eg: catalogId&lt;br /&gt;
* nodeProperties: Can store additional properties, not set by translation service&lt;br /&gt;
* node schema should set identifier = true, immutable = true (which includes elementCanBeRemoved = false)&lt;br /&gt;
&lt;br /&gt;
= Complex Filter requests =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	filterType: &amp;quot;XXX&amp;quot; // up to calling service&lt;br /&gt;
	type: &amp;quot;group&amp;quot;,&lt;br /&gt;
	elements: &lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;logical&amp;quot;,&lt;br /&gt;
			logicalTag: &amp;quot;textTag_languageId_text&amp;quot;,&lt;br /&gt;
			resultType: &amp;quot;mediaLinkProperty&amp;quot;&lt;br /&gt;
			textTag: &amp;quot;mediaLinkPropertyValue&amp;quot;,&lt;br /&gt;
			languageId: &amp;quot;en&amp;quot;,&lt;br /&gt;
			text: &amp;quot;Blue&amp;quot;,&lt;br /&gt;
			subjectIdentifierPropertyName: &amp;quot;propertyId&amp;quot;,&lt;br /&gt;
			caseSensitive: true&lt;br /&gt;
		},&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- searches for specific and full text, optional case sensitive&lt;br /&gt;
- finds an identifier property on the subjects node and stores in LogicalResults for the request&lt;br /&gt;
- resultType must exist in request because want it to match filterType and Translation has no way of knowing filterType of request&lt;br /&gt;
&lt;br /&gt;
= SQS queues =&lt;br /&gt;
&lt;br /&gt;
== RecalculateCurrentTranslation ==&lt;br /&gt;
&lt;br /&gt;
Add to this queue the subject nodeIdentifierLabels, subject nodeIdentifierProperties, languageCode&lt;br /&gt;
&lt;br /&gt;
* subject nodeIdentifierLabels&lt;br /&gt;
* subject nodeIdentifierProperties&lt;br /&gt;
* languageCode: see below&lt;br /&gt;
&lt;br /&gt;
This queue does not have a Lambda trigger, we could poll it when resource costs really cheap as it is low importance (and/or have an API endpoint that polls and processes a batch).&lt;br /&gt;
&lt;br /&gt;
= Language codes =&lt;br /&gt;
&lt;br /&gt;
Considering using ISO 639-3 codes and designing a way to substring them to automatically go up the hierarchy if no lower level variants match, an alternative would be to allow users to create ordered lists of preferred translations and share these.&lt;br /&gt;
&lt;br /&gt;
= How translations are found for users =&lt;br /&gt;
&lt;br /&gt;
Plan is to allow users to create ordered lists of prefered languages (and perhaps optionally automatic translating as a last option?), and new users are automatically set to a list depending on their location when signing up.&lt;br /&gt;
&lt;br /&gt;
For each text to translate: work through the list and find the first matching translation, if none found fall back onto the default option.&lt;br /&gt;
&lt;br /&gt;
cache results for efficient resource use.&lt;br /&gt;
&lt;br /&gt;
= System text translations =&lt;br /&gt;
&lt;br /&gt;
System text follows the same Label + UniqueIdProperty system to identify specific translation subjects (one system text output), the labels and unique ids can set in npm modules.&lt;br /&gt;
&lt;br /&gt;
* Label example: hard coded or as a constant in NavBar service: &amp;quot;sysTxtNavBar&amp;quot;&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;sysTxtTag&amp;quot;, value: &amp;quot;SignOut&amp;quot; (can set as a constant in NavBar service)&lt;br /&gt;
&lt;br /&gt;
* Label example: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.sysTxtCatalogManager (&amp;quot;sysTxtCatalogManager&amp;quot;)&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;CatalogName&amp;quot;, value: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.CatalogStandard.catalogName&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Translations|Working_documents - Translations]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Translations]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4298</id>
		<title>Service - Translations</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4298"/>
		<updated>2026-04-17T07:18:32Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service manages language translations.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-shared/izara-core-shared-translations&lt;br /&gt;
&lt;br /&gt;
= Schemas =&lt;br /&gt;
&lt;br /&gt;
==ObjectSchemas==&lt;br /&gt;
&lt;br /&gt;
=== translationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationText&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationTextId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationTextId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* actual text used, identified by text so shared by all use cases&lt;br /&gt;
* both translationLink and systemTextTranslationLink connect to translation instances&lt;br /&gt;
&lt;br /&gt;
=== translationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;textTag&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== systemTextTranslationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;systemTextTranslationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;systemTextTranslationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;systemTextTranslationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== isTranslationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	isTranslationText: {&lt;br /&gt;
		storageResources: {&lt;br /&gt;
			myGraph: {&lt;br /&gt;
				storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
				graphServerTag: &amp;quot;GraphHandler&amp;quot;			&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		links: [&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;translationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;SystemTextTranslationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== hasTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    hasTranslationLink: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
=== defaultTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    defaultTranslationLink: {&lt;br /&gt;
      moveBy: 'systemWithUserId',&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      fieldNames: {&lt;br /&gt;
        originTimestamp: {&lt;br /&gt;
          type: 'number',&lt;br /&gt;
          requiredOnCreate: true,&lt;br /&gt;
          canUpdate: true,&lt;br /&gt;
          validation: {}&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
=== currentTranslationLink ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    currentTranslationLink: {&lt;br /&gt;
      moveBy: 'systemWithUserId',&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      fieldNames: {&lt;br /&gt;
        originTimestamp: {&lt;br /&gt;
          type: 'number',&lt;br /&gt;
          requiredOnCreate: true,&lt;br /&gt;
          canUpdate: true,&lt;br /&gt;
          validation: {}&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: []&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
=== supportTranslation ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    supportTranslation: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;systemTextTranslationLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;UserAccount&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;user&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== opposeTranslation ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    opposeTranslation: {&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;systemTextTranslationLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;UserAccount&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;user&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
* NOTE: Translation generation flow &lt;br /&gt;
* newTranslationLink&lt;br /&gt;
*  -Create translationText entity&lt;br /&gt;
*  - Associate translationLink with subject&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configTag: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;TranslationGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LogicalResults ==&lt;br /&gt;
&lt;br /&gt;
Stores results for any requests to perform logical searches on media links&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	resultId: xxx // eg: filterMainId for a single logical element&lt;br /&gt;
	dataId: xxx // one translationLinkId or one subject nodes identifier (the logical request will set what property should be used)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: resultId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
= Graph database (delete)  = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Translations Graph]] ==&lt;br /&gt;
&lt;br /&gt;
* {textTag} is the name of the text being translated, eg a Catalog subject node will have a textTag &amp;quot;catalogName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{TranslationSharedLib.translationLinkNodeLabel()}&amp;quot;, //eg: translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			translationLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request details&lt;br /&gt;
			}&lt;br /&gt;
			languageId: {&lt;br /&gt;
				immutable: true,&lt;br /&gt;
			}&lt;br /&gt;
			textTag: {&lt;br /&gt;
				immutable: true, // tag of what text is being translated&lt;br /&gt;
			}&lt;br /&gt;
			weight: {&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* creates a link between a subject node and a translation text&lt;br /&gt;
* when recalculating current translation for a languageCode we add the calculated weighted value to this node as a property&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: {TranslationSharedLib.TRANSLATION_GRAPH_NODE_LABEL}, //eg: translation&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			text: {&lt;br /&gt;
				identifier: true,&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== (subject nodes) ====&lt;br /&gt;
&lt;br /&gt;
Subject node schemas are managed by each service that needs translations, normally as a basic schema with identifier properties only.&lt;br /&gt;
&lt;br /&gt;
* nodeIdentifierLabels: matches that specific object being translated, eg: catalog&lt;br /&gt;
* nodeIdentifierProperties: matches that specific object being translated, eg: catalogId&lt;br /&gt;
* nodeProperties: Can store additional properties, not set by translation service&lt;br /&gt;
* node schema should set identifier = true, immutable = true (which includes elementCanBeRemoved = false)&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkHasRelType()&amp;quot;, // eg: has_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkCurrentRelType()}&amp;quot;, // eg: current_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkDefaultRelType()}&amp;quot;, // eg: default_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.isTranslationDefaultRelType()}&amp;quot;,&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: false,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Complex Filter requests =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	filterType: &amp;quot;XXX&amp;quot; // up to calling service&lt;br /&gt;
	type: &amp;quot;group&amp;quot;,&lt;br /&gt;
	elements: &lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;logical&amp;quot;,&lt;br /&gt;
			logicalTag: &amp;quot;textTag_languageId_text&amp;quot;,&lt;br /&gt;
			resultType: &amp;quot;mediaLinkProperty&amp;quot;&lt;br /&gt;
			textTag: &amp;quot;mediaLinkPropertyValue&amp;quot;,&lt;br /&gt;
			languageId: &amp;quot;en&amp;quot;,&lt;br /&gt;
			text: &amp;quot;Blue&amp;quot;,&lt;br /&gt;
			subjectIdentifierPropertyName: &amp;quot;propertyId&amp;quot;,&lt;br /&gt;
			caseSensitive: true&lt;br /&gt;
		},&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- searches for specific and full text, optional case sensitive&lt;br /&gt;
- finds an identifier property on the subjects node and stores in LogicalResults for the request&lt;br /&gt;
- resultType must exist in request because want it to match filterType and Translation has no way of knowing filterType of request&lt;br /&gt;
&lt;br /&gt;
= SQS queues =&lt;br /&gt;
&lt;br /&gt;
== RecalculateCurrentTranslation ==&lt;br /&gt;
&lt;br /&gt;
Add to this queue the subject nodeIdentifierLabels, subject nodeIdentifierProperties, languageCode&lt;br /&gt;
&lt;br /&gt;
* subject nodeIdentifierLabels&lt;br /&gt;
* subject nodeIdentifierProperties&lt;br /&gt;
* languageCode: see below&lt;br /&gt;
&lt;br /&gt;
This queue does not have a Lambda trigger, we could poll it when resource costs really cheap as it is low importance (and/or have an API endpoint that polls and processes a batch).&lt;br /&gt;
&lt;br /&gt;
= Language codes =&lt;br /&gt;
&lt;br /&gt;
Considering using ISO 639-3 codes and designing a way to substring them to automatically go up the hierarchy if no lower level variants match, an alternative would be to allow users to create ordered lists of preferred translations and share these.&lt;br /&gt;
&lt;br /&gt;
= How translations are found for users =&lt;br /&gt;
&lt;br /&gt;
Plan is to allow users to create ordered lists of prefered languages (and perhaps optionally automatic translating as a last option?), and new users are automatically set to a list depending on their location when signing up.&lt;br /&gt;
&lt;br /&gt;
For each text to translate: work through the list and find the first matching translation, if none found fall back onto the default option.&lt;br /&gt;
&lt;br /&gt;
cache results for efficient resource use.&lt;br /&gt;
&lt;br /&gt;
= System text translations =&lt;br /&gt;
&lt;br /&gt;
System text follows the same Label + UniqueIdProperty system to identify specific translation subjects (one system text output), the labels and unique ids can set in npm modules.&lt;br /&gt;
&lt;br /&gt;
* Label example: hard coded or as a constant in NavBar service: &amp;quot;sysTxtNavBar&amp;quot;&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;sysTxtTag&amp;quot;, value: &amp;quot;SignOut&amp;quot; (can set as a constant in NavBar service)&lt;br /&gt;
&lt;br /&gt;
* Label example: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.sysTxtCatalogManager (&amp;quot;sysTxtCatalogManager&amp;quot;)&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;CatalogName&amp;quot;, value: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.CatalogStandard.catalogName&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Translations|Working_documents - Translations]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Translations]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4248</id>
		<title>Service - Translations</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4248"/>
		<updated>2026-03-26T09:08:33Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service manages language translations.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-shared/izara-core-shared-translations&lt;br /&gt;
&lt;br /&gt;
= Schemas =&lt;br /&gt;
&lt;br /&gt;
==ObjectSchemas==&lt;br /&gt;
&lt;br /&gt;
=== translationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationText&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationTextId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationTextId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* actual text used, identified by text so shared by all use cases&lt;br /&gt;
* both translationLink and systemTextTranslationLink connect to translation instances&lt;br /&gt;
&lt;br /&gt;
=== translationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;textTag&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== systemTextTranslationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;systemTextTranslationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;systemTextTranslationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;systemTextTranslationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== isTranslationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	isTranslationText: {&lt;br /&gt;
		storageResources: {&lt;br /&gt;
			myGraph: {&lt;br /&gt;
				storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
				graphServerTag: &amp;quot;GraphHandler&amp;quot;			&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		links: [&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;translationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;SystemTextTranslationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
* NOTE: Translation generation flow &lt;br /&gt;
* newTranslationLink&lt;br /&gt;
*  -Create translationText entity&lt;br /&gt;
*  - Associate translationLink with subject&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configTag: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;TranslationGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LogicalResults ==&lt;br /&gt;
&lt;br /&gt;
Stores results for any requests to perform logical searches on media links&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	resultId: xxx // eg: filterMainId for a single logical element&lt;br /&gt;
	dataId: xxx // one translationLinkId or one subject nodes identifier (the logical request will set what property should be used)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: resultId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
= Graph database (delete)  = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Translations Graph]] ==&lt;br /&gt;
&lt;br /&gt;
* {textTag} is the name of the text being translated, eg a Catalog subject node will have a textTag &amp;quot;catalogName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{TranslationSharedLib.translationLinkNodeLabel()}&amp;quot;, //eg: translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			translationLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request details&lt;br /&gt;
			}&lt;br /&gt;
			languageId: {&lt;br /&gt;
				immutable: true,&lt;br /&gt;
			}&lt;br /&gt;
			textTag: {&lt;br /&gt;
				immutable: true, // tag of what text is being translated&lt;br /&gt;
			}&lt;br /&gt;
			weight: {&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* creates a link between a subject node and a translation text&lt;br /&gt;
* when recalculating current translation for a languageCode we add the calculated weighted value to this node as a property&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: {TranslationSharedLib.TRANSLATION_GRAPH_NODE_LABEL}, //eg: translation&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			text: {&lt;br /&gt;
				identifier: true,&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== (subject nodes) ====&lt;br /&gt;
&lt;br /&gt;
Subject node schemas are managed by each service that needs translations, normally as a basic schema with identifier properties only.&lt;br /&gt;
&lt;br /&gt;
* nodeIdentifierLabels: matches that specific object being translated, eg: catalog&lt;br /&gt;
* nodeIdentifierProperties: matches that specific object being translated, eg: catalogId&lt;br /&gt;
* nodeProperties: Can store additional properties, not set by translation service&lt;br /&gt;
* node schema should set identifier = true, immutable = true (which includes elementCanBeRemoved = false)&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkHasRelType()&amp;quot;, // eg: has_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkCurrentRelType()}&amp;quot;, // eg: current_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkDefaultRelType()}&amp;quot;, // eg: default_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.isTranslationDefaultRelType()}&amp;quot;,&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: false,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Complex Filter requests =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	filterType: &amp;quot;XXX&amp;quot; // up to calling service&lt;br /&gt;
	type: &amp;quot;group&amp;quot;,&lt;br /&gt;
	elements: &lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;logical&amp;quot;,&lt;br /&gt;
			logicalTag: &amp;quot;textTag_languageId_text&amp;quot;,&lt;br /&gt;
			resultType: &amp;quot;mediaLinkProperty&amp;quot;&lt;br /&gt;
			textTag: &amp;quot;mediaLinkPropertyValue&amp;quot;,&lt;br /&gt;
			languageId: &amp;quot;en&amp;quot;,&lt;br /&gt;
			text: &amp;quot;Blue&amp;quot;,&lt;br /&gt;
			subjectIdentifierPropertyName: &amp;quot;propertyId&amp;quot;,&lt;br /&gt;
			caseSensitive: true&lt;br /&gt;
		},&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- searches for specific and full text, optional case sensitive&lt;br /&gt;
- finds an identifier property on the subjects node and stores in LogicalResults for the request&lt;br /&gt;
- resultType must exist in request because want it to match filterType and Translation has no way of knowing filterType of request&lt;br /&gt;
&lt;br /&gt;
= SQS queues =&lt;br /&gt;
&lt;br /&gt;
== RecalculateCurrentTranslation ==&lt;br /&gt;
&lt;br /&gt;
Add to this queue the subject nodeIdentifierLabels, subject nodeIdentifierProperties, languageCode&lt;br /&gt;
&lt;br /&gt;
* subject nodeIdentifierLabels&lt;br /&gt;
* subject nodeIdentifierProperties&lt;br /&gt;
* languageCode: see below&lt;br /&gt;
&lt;br /&gt;
This queue does not have a Lambda trigger, we could poll it when resource costs really cheap as it is low importance (and/or have an API endpoint that polls and processes a batch).&lt;br /&gt;
&lt;br /&gt;
= Language codes =&lt;br /&gt;
&lt;br /&gt;
Considering using ISO 639-3 codes and designing a way to substring them to automatically go up the hierarchy if no lower level variants match, an alternative would be to allow users to create ordered lists of preferred translations and share these.&lt;br /&gt;
&lt;br /&gt;
= How translations are found for users =&lt;br /&gt;
&lt;br /&gt;
Plan is to allow users to create ordered lists of prefered languages (and perhaps optionally automatic translating as a last option?), and new users are automatically set to a list depending on their location when signing up.&lt;br /&gt;
&lt;br /&gt;
For each text to translate: work through the list and find the first matching translation, if none found fall back onto the default option.&lt;br /&gt;
&lt;br /&gt;
cache results for efficient resource use.&lt;br /&gt;
&lt;br /&gt;
= System text translations =&lt;br /&gt;
&lt;br /&gt;
System text follows the same Label + UniqueIdProperty system to identify specific translation subjects (one system text output), the labels and unique ids can set in npm modules.&lt;br /&gt;
&lt;br /&gt;
* Label example: hard coded or as a constant in NavBar service: &amp;quot;sysTxtNavBar&amp;quot;&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;sysTxtTag&amp;quot;, value: &amp;quot;SignOut&amp;quot; (can set as a constant in NavBar service)&lt;br /&gt;
&lt;br /&gt;
* Label example: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.sysTxtCatalogManager (&amp;quot;sysTxtCatalogManager&amp;quot;)&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;CatalogName&amp;quot;, value: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.CatalogStandard.catalogName&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Translations|Working_documents - Translations]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Translations]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4247</id>
		<title>Service - Translations</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=4247"/>
		<updated>2026-03-26T08:55:50Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service manages language translations.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-shared/izara-core-shared-translations&lt;br /&gt;
&lt;br /&gt;
= Schemas =&lt;br /&gt;
&lt;br /&gt;
==ObjectSchemas==&lt;br /&gt;
&lt;br /&gt;
=== translationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationText&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationTextId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationTextId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* actual text used, identified by text so shared by all use cases&lt;br /&gt;
* both translationLink and systemTextTranslationLink connect to translation instances&lt;br /&gt;
&lt;br /&gt;
=== translationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;textTag&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== systemTextTranslationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;systemTextTranslationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;systemTextTranslationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;systemTextTranslationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;systemGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== isTranslationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	isTranslationText: {&lt;br /&gt;
		storageResources: {&lt;br /&gt;
			myGraph: {&lt;br /&gt;
				storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
				graphServerTag: &amp;quot;GraphHandler&amp;quot;			&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		links: [&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;translationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;SystemTextTranslationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configTag: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;TranslationGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LogicalResults ==&lt;br /&gt;
&lt;br /&gt;
Stores results for any requests to perform logical searches on media links&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	resultId: xxx // eg: filterMainId for a single logical element&lt;br /&gt;
	dataId: xxx // one translationLinkId or one subject nodes identifier (the logical request will set what property should be used)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: resultId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
= Graph database (delete)  = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Translations Graph]] ==&lt;br /&gt;
&lt;br /&gt;
* {textTag} is the name of the text being translated, eg a Catalog subject node will have a textTag &amp;quot;catalogName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{TranslationSharedLib.translationLinkNodeLabel()}&amp;quot;, //eg: translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			translationLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request details&lt;br /&gt;
			}&lt;br /&gt;
			languageId: {&lt;br /&gt;
				immutable: true,&lt;br /&gt;
			}&lt;br /&gt;
			textTag: {&lt;br /&gt;
				immutable: true, // tag of what text is being translated&lt;br /&gt;
			}&lt;br /&gt;
			weight: {&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* creates a link between a subject node and a translation text&lt;br /&gt;
* when recalculating current translation for a languageCode we add the calculated weighted value to this node as a property&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: {TranslationSharedLib.TRANSLATION_GRAPH_NODE_LABEL}, //eg: translation&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			text: {&lt;br /&gt;
				identifier: true,&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== (subject nodes) ====&lt;br /&gt;
&lt;br /&gt;
Subject node schemas are managed by each service that needs translations, normally as a basic schema with identifier properties only.&lt;br /&gt;
&lt;br /&gt;
* nodeIdentifierLabels: matches that specific object being translated, eg: catalog&lt;br /&gt;
* nodeIdentifierProperties: matches that specific object being translated, eg: catalogId&lt;br /&gt;
* nodeProperties: Can store additional properties, not set by translation service&lt;br /&gt;
* node schema should set identifier = true, immutable = true (which includes elementCanBeRemoved = false)&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkHasRelType()&amp;quot;, // eg: has_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkCurrentRelType()}&amp;quot;, // eg: current_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkDefaultRelType()}&amp;quot;, // eg: default_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.isTranslationDefaultRelType()}&amp;quot;,&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: false,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Complex Filter requests =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	filterType: &amp;quot;XXX&amp;quot; // up to calling service&lt;br /&gt;
	type: &amp;quot;group&amp;quot;,&lt;br /&gt;
	elements: &lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;logical&amp;quot;,&lt;br /&gt;
			logicalTag: &amp;quot;textTag_languageId_text&amp;quot;,&lt;br /&gt;
			resultType: &amp;quot;mediaLinkProperty&amp;quot;&lt;br /&gt;
			textTag: &amp;quot;mediaLinkPropertyValue&amp;quot;,&lt;br /&gt;
			languageId: &amp;quot;en&amp;quot;,&lt;br /&gt;
			text: &amp;quot;Blue&amp;quot;,&lt;br /&gt;
			subjectIdentifierPropertyName: &amp;quot;propertyId&amp;quot;,&lt;br /&gt;
			caseSensitive: true&lt;br /&gt;
		},&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- searches for specific and full text, optional case sensitive&lt;br /&gt;
- finds an identifier property on the subjects node and stores in LogicalResults for the request&lt;br /&gt;
- resultType must exist in request because want it to match filterType and Translation has no way of knowing filterType of request&lt;br /&gt;
&lt;br /&gt;
= SQS queues =&lt;br /&gt;
&lt;br /&gt;
== RecalculateCurrentTranslation ==&lt;br /&gt;
&lt;br /&gt;
Add to this queue the subject nodeIdentifierLabels, subject nodeIdentifierProperties, languageCode&lt;br /&gt;
&lt;br /&gt;
* subject nodeIdentifierLabels&lt;br /&gt;
* subject nodeIdentifierProperties&lt;br /&gt;
* languageCode: see below&lt;br /&gt;
&lt;br /&gt;
This queue does not have a Lambda trigger, we could poll it when resource costs really cheap as it is low importance (and/or have an API endpoint that polls and processes a batch).&lt;br /&gt;
&lt;br /&gt;
= Language codes =&lt;br /&gt;
&lt;br /&gt;
Considering using ISO 639-3 codes and designing a way to substring them to automatically go up the hierarchy if no lower level variants match, an alternative would be to allow users to create ordered lists of preferred translations and share these.&lt;br /&gt;
&lt;br /&gt;
= How translations are found for users =&lt;br /&gt;
&lt;br /&gt;
Plan is to allow users to create ordered lists of prefered languages (and perhaps optionally automatic translating as a last option?), and new users are automatically set to a list depending on their location when signing up.&lt;br /&gt;
&lt;br /&gt;
For each text to translate: work through the list and find the first matching translation, if none found fall back onto the default option.&lt;br /&gt;
&lt;br /&gt;
cache results for efficient resource use.&lt;br /&gt;
&lt;br /&gt;
= System text translations =&lt;br /&gt;
&lt;br /&gt;
System text follows the same Label + UniqueIdProperty system to identify specific translation subjects (one system text output), the labels and unique ids can set in npm modules.&lt;br /&gt;
&lt;br /&gt;
* Label example: hard coded or as a constant in NavBar service: &amp;quot;sysTxtNavBar&amp;quot;&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;sysTxtTag&amp;quot;, value: &amp;quot;SignOut&amp;quot; (can set as a constant in NavBar service)&lt;br /&gt;
&lt;br /&gt;
* Label example: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.sysTxtCatalogManager (&amp;quot;sysTxtCatalogManager&amp;quot;)&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;CatalogName&amp;quot;, value: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.CatalogStandard.catalogName&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Translations|Working_documents - Translations]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Translations]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=2025-04-17_-_LinkPath_structure_and_examples&amp;diff=4187</id>
		<title>2025-04-17 - LinkPath structure and examples</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=2025-04-17_-_LinkPath_structure_and_examples&amp;diff=4187"/>
		<updated>2026-03-18T07:42:33Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Service - Search Results]]&lt;br /&gt;
&lt;br /&gt;
= requiredData normalize structure =&lt;br /&gt;
* component =&amp;gt; requiredDataObjects , linkPathObjects, linkPathSteps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  requiredDataObjects: {&lt;br /&gt;
     hash_requiredDataObjectA: { //* normal requiredData&lt;br /&gt;
       fieldName: &amp;quot;fieldname if main objType or last fieldName for linkPath&amp;quot;,&lt;br /&gt;
     },&lt;br /&gt;
     hash_requiredDataObjectB: { //* has LinkPath&lt;br /&gt;
       fieldName: &amp;quot;fieldname if main objType or last fieldName for linkPath&amp;quot;,&lt;br /&gt;
       linkPathObjectId: &amp;quot;hash_linkPathA&amp;quot;,&lt;br /&gt;
       complexFilterCombinationIds: [ //* has applyCombinations&lt;br /&gt;
         &amp;quot;xxxxx&amp;quot;,&lt;br /&gt;
         &amp;quot;xxxxx&amp;quot;&lt;br /&gt;
       ]&lt;br /&gt;
     }&lt;br /&gt;
  },&lt;br /&gt;
  linkPathObjects: {&lt;br /&gt;
    hash_linkPathA: {&lt;br /&gt;
      initialObjType: {&lt;br /&gt;
        serviceTag: &amp;quot;ProductManager&amp;quot;,&lt;br /&gt;
        objectType: &amp;quot;product&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      linkSteps: [&lt;br /&gt;
        &amp;quot;hash_linkStepB_1&amp;quot;,&lt;br /&gt;
        &amp;quot;hash_linkStepB_2&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  linkPathSteps: {&lt;br /&gt;
    hash_linkStepB_1: {&lt;br /&gt;
      pathLinkType: {&lt;br /&gt;
         objType: {&lt;br /&gt;
           serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
           objectType: &amp;quot;sellOffer&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         relType: {&lt;br /&gt;
           serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
           relationshipTag: &amp;quot;hasSellOffer&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         direction: &amp;quot;from&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
&lt;br /&gt;
      //------ conditions by link ------// : optional&lt;br /&gt;
      filterElementId: &amp;quot;ref_filterMainIdA&amp;quot;,&lt;br /&gt;
      aggregate: &amp;quot;max&amp;quot;,&lt;br /&gt;
      sortFields: [&lt;br /&gt;
        {&lt;br /&gt;
          fieldName: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
          dataType: &amp;quot;string&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      ],&lt;br /&gt;
    },&lt;br /&gt;
    hash_linkStepB_2: {&lt;br /&gt;
      pathLinkType: {&lt;br /&gt;
         objType: {&lt;br /&gt;
           serviceTag: &amp;quot;SellOfferPlan&amp;quot;,&lt;br /&gt;
           objectType: &amp;quot;sellOfferPlan&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         relType: {&lt;br /&gt;
           serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
           relationshipTag: &amp;quot;usesSellOfferPlan&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         direction: &amp;quot;from&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      //------ conditions by link ------//&lt;br /&gt;
      filterElementId: &amp;quot;ref_filterMainIdA&amp;quot;,&lt;br /&gt;
      aggregate: &amp;quot;max&amp;quot;,&lt;br /&gt;
      sortFields: [&lt;br /&gt;
        {&lt;br /&gt;
          fieldName: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
          dataType: &amp;quot;string&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      ],&lt;br /&gt;
      requiredDataObjects: [ //* for use to create linkPath in linkPath&lt;br /&gt;
        {&lt;br /&gt;
          fieldName: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
      combine: &amp;quot;true&amp;quot;,&lt;br /&gt;
      comparison: &amp;quot;greaterThan&amp;quot;,&lt;br /&gt;
      comparisonSortField: &amp;quot;upToValue&amp;quot;,&lt;br /&gt;
      comparisonSortDataType: &amp;quot;string&amp;quot;,&lt;br /&gt;
      comparisonValue: &amp;quot;50&amp;quot;,&lt;br /&gt;
      requestProperties: {&lt;br /&gt;
        tag_xxxx: &amp;quot;value&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      perParentCombinationIds: [&lt;br /&gt;
        {&lt;br /&gt;
          tag: &amp;quot;tag_xxxxx&amp;quot;,&lt;br /&gt;
          filterMainId: &amp;quot;xxxxx&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      ],&lt;br /&gt;
      applyCombinations: [&lt;br /&gt;
        {&lt;br /&gt;
          tag: &amp;quot;tag_xxxxx&amp;quot;,&lt;br /&gt;
          filterMainId: &amp;quot;xxxxx&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ProcessSearchResultMessage ==&lt;br /&gt;
* Fetch and Sort Product Sizes by Language with Fallback&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Need to fetch all sizes, sorted by language order 'en', 'th'.&lt;br /&gt;
If a translation is missing for any language in sortArray: ['en', 'th'],&lt;br /&gt;
fallback to the defaultTranslationLink of that productAttribute.&lt;br /&gt;
ProductAttributeLabel with labelId = 'Id_X' represents a size.&lt;br /&gt;
identifiersIdArray contains all productAttributeIds linked to ProductAttributeLabel where labelId='Id_X'.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let processSearchResultMessage = {&lt;br /&gt;
  objType: {&lt;br /&gt;
    serviceTag: 'ProductAttribute',&lt;br /&gt;
    objectType: 'productAttribute'&lt;br /&gt;
  },&lt;br /&gt;
  requiredData: [&lt;br /&gt;
    {&lt;br /&gt;
      fieldName: 'text', //all sizes by languageId, where text is the identifiers of the translation objectType, which is the final link step of this requiredData&lt;br /&gt;
      linkPath: [&lt;br /&gt;
        {&lt;br /&gt;
          link: {&lt;br /&gt;
            relType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              relationshipTag: 'hasTranslationLink'&lt;br /&gt;
              // Must use hasTranslationLink because it will be automatically added by inserting a filterElement with logicalType: &amp;quot;translateIds&amp;quot;&lt;br /&gt;
              // where identifiers come from identifiersIdArray (Process-ComplexFilter), along with a filterElement of type: &amp;quot;logicalOperator&amp;quot; and operator: &amp;quot;and&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              objectType: 'translationLink'&lt;br /&gt;
            },&lt;br /&gt;
            direction: 'from'&lt;br /&gt;
          },&lt;br /&gt;
          aggregate: 'min',   //if 'min' sorts languages in order 'en', 'th', //if max sorts languages in order 'th', 'en&lt;br /&gt;
          sortFields: {&lt;br /&gt;
            fieldName: 'languageId',&lt;br /&gt;
            dataType: 'array',&lt;br /&gt;
            sortArray: ['en', 'th']  // sorts languages according to sortArray&lt;br /&gt;
          },&lt;br /&gt;
          filterElements: [&lt;br /&gt;
            {&lt;br /&gt;
              type: 'group',&lt;br /&gt;
              elements: [&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'traversal',&lt;br /&gt;
                  traversals: [&lt;br /&gt;
                    {&lt;br /&gt;
                      fields: {&lt;br /&gt;
                        languageId: { anyValue: ['en', 'th'] },&lt;br /&gt;
                        textTag: 'productAttributeValue'&lt;br /&gt;
                      },&lt;br /&gt;
                      link: {&lt;br /&gt;
                        relationshipDirection: 'from',&lt;br /&gt;
                        relType: {&lt;br /&gt;
                          serviceTag: 'Translations',&lt;br /&gt;
                          relationshipTag: 'currentTranslationLink'&lt;br /&gt;
                        }&lt;br /&gt;
                      }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                      objType: {&lt;br /&gt;
                        serviceTag: 'ProductAttribute',&lt;br /&gt;
                        objectType: 'productAttribute'&lt;br /&gt;
                      }&lt;br /&gt;
                    }&lt;br /&gt;
                  ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'logicalOperator', operator: 'or'&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'traversal',&lt;br /&gt;
                  traversals: [&lt;br /&gt;
                    {&lt;br /&gt;
                      fields: {&lt;br /&gt;
                        textTag: 'productAttributeValue'&lt;br /&gt;
                      },&lt;br /&gt;
                      link: {&lt;br /&gt;
                        relationshipDirection: 'from',&lt;br /&gt;
                        relType: {&lt;br /&gt;
                          serviceTag: 'Translations',&lt;br /&gt;
                          relationshipTag: 'defaultTranslationLink'&lt;br /&gt;
                        }&lt;br /&gt;
                      }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                      objType: {&lt;br /&gt;
                        serviceTag: 'ProductAttribute',&lt;br /&gt;
                        objectType: 'productAttribute'&lt;br /&gt;
                      }&lt;br /&gt;
                    }&lt;br /&gt;
                  ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          link: {&lt;br /&gt;
            relType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              relationshipTag: 'isTranslation'&lt;br /&gt;
            },&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              objectType: 'translation'&lt;br /&gt;
            },&lt;br /&gt;
            direction: 'from'&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  filter: {&lt;br /&gt;
    objType: {&lt;br /&gt;
      serviceTag: 'ProductAttribute',&lt;br /&gt;
      objectType: 'productAttribute'&lt;br /&gt;
    },&lt;br /&gt;
    elements: [&lt;br /&gt;
      {&lt;br /&gt;
        type: 'complexFilter',&lt;br /&gt;
        complexFilter: {&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: 'ProductAttribute',&lt;br /&gt;
            objectType: 'ProductAttributeLabel'&lt;br /&gt;
          },&lt;br /&gt;
          relType: {&lt;br /&gt;
            serviceTag: 'ProductAttribute',&lt;br /&gt;
            relationshipTag: 'isProductAttributeLabel'&lt;br /&gt;
          },&lt;br /&gt;
          direction: 'from',&lt;br /&gt;
          elements: [&lt;br /&gt;
            {&lt;br /&gt;
              type: 'logical',&lt;br /&gt;
              fieldName: 'labelId',&lt;br /&gt;
              comparison: 'equals',&lt;br /&gt;
              value: 'Id_X'&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  requestProperties: {},&lt;br /&gt;
  identifiersIdArray: [&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_1',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_1'&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_2',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_2'&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_3',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_3'&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== example search and sort request ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;objType&amp;quot;:{&lt;br /&gt;
      &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;,&lt;br /&gt;
      &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;searchResultId&amp;quot;:&amp;quot;8e5fecd40a27e47f89cd2743916c0044f0f69bc6&amp;quot;,&lt;br /&gt;
   &amp;quot;searchDetailId&amp;quot;:&amp;quot;3462d3248d3af9406554f1c218b63442d26ac2e5&amp;quot;,&lt;br /&gt;
   &amp;quot;requiredDataObjects&amp;quot;:{&lt;br /&gt;
      &amp;quot;4c8e7879d26e6fa7ab85ded25a79a541754c5a3c&amp;quot;:{&lt;br /&gt;
         &amp;quot;fieldName&amp;quot;:&amp;quot;productId&amp;quot;,&lt;br /&gt;
         &amp;quot;linkPathObjectId&amp;quot;:&amp;quot;1a8a3f9c2c3ea5eaad1f42385362de5dd11cde8a&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;c799f11507529f0fb6fa712568596d24b6507d40&amp;quot;:{&lt;br /&gt;
         &amp;quot;fieldName&amp;quot;:&amp;quot;sellOfferHandlerServiceTag&amp;quot;,&lt;br /&gt;
         &amp;quot;linkPathObjectId&amp;quot;:&amp;quot;5909f82f27bd6c1f921e95b88a65b6e4727a6532&amp;quot;,&lt;br /&gt;
         &amp;quot;complexFilterCombinationIds&amp;quot;:[&lt;br /&gt;
            &amp;quot;88d9c5b9ab36d8c3ebf17e8322541b9c64cae25b&amp;quot;,&lt;br /&gt;
            &amp;quot;51509dea0a7ba2746dbd24769b8e777f1411f3ff&amp;quot;,&lt;br /&gt;
            &amp;quot;d7a7f875254e856b4205075826631ec042b4c821&amp;quot;,&lt;br /&gt;
            &amp;quot;b96447ae98c95858694ca5ec407750c559825930&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
      }&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;searchParams&amp;quot;:{&lt;br /&gt;
      &amp;quot;filterObjectId&amp;quot;:&amp;quot;8e5fecd40a27e47f89cd2743916c0044f0f69bc6&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;filterElements&amp;quot;:{&lt;br /&gt;
      &amp;quot;8e5fecd40a27e47f89cd2743916c0044f0f69bc6&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;,&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;sellOfferId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;equals&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;sellOfferId_001&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;d92ca4f68dc0d474cfdc10a6c702a5c7224a822c&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;rateTableId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;highLow&amp;quot;,&lt;br /&gt;
            &amp;quot;valueType&amp;quot;:&amp;quot;perParentIdentifier&amp;quot;,&lt;br /&gt;
            &amp;quot;perParentIdentifierFieldname&amp;quot;:&amp;quot;sellOfferId&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;cd378bc32fbc9a46929c9a9d590e7d77243a839c&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;rateTableId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;lessThanEquals&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;cccc&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;0c287df25d6ff203be7cc9faa2390f6ab0df3878&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;operation&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementLeft&amp;quot;:&amp;quot;d92ca4f68dc0d474cfdc10a6c702a5c7224a822c&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementRight&amp;quot;:&amp;quot;cd378bc32fbc9a46929c9a9d590e7d77243a839c&amp;quot;,&lt;br /&gt;
            &amp;quot;operator&amp;quot;:&amp;quot;AND&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;e0b8534452e98796f144c83a221764ef32db5ab6&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;Locations&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;locationNode&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;childComplexFilter&amp;quot;,&lt;br /&gt;
            &amp;quot;childFilterElementId&amp;quot;:&amp;quot;0c287df25d6ff203be7cc9faa2390f6ab0df3878&amp;quot;,&lt;br /&gt;
            &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
               &amp;quot;relType&amp;quot;:{&lt;br /&gt;
                  &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
                  &amp;quot;relationshipTag&amp;quot;:&amp;quot;disabledDeliversTolocationNode&amp;quot;&lt;br /&gt;
               },&lt;br /&gt;
               &amp;quot;objType&amp;quot;:{&lt;br /&gt;
                  &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
                  &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
               },&lt;br /&gt;
               &amp;quot;direction&amp;quot;:&amp;quot;to&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;requestProperties&amp;quot;:{}&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;88d9c5b9ab36d8c3ebf17e8322541b9c64cae25b&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferPlan&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOfferPlan&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;currencyId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;lessThan&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;bbbb&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;51509dea0a7ba2746dbd24769b8e777f1411f3ff&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferPlan&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOfferPlanUserPaymentMethodLink&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;sellOfferPlanUserPaymentMethodLinkId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;lessThan&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;bbbb&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;a5491ba3deb74e523741c8cfeb845f49db444a9c&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;Locations&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;locationNode&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;locationNodeId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;lessThan&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;cccc&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;7820aef170ae6c3e723382d6bc81d7b12a674974&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;logical&amp;quot;,&lt;br /&gt;
            &amp;quot;fieldName&amp;quot;:&amp;quot;rateTableId&amp;quot;,&lt;br /&gt;
            &amp;quot;comparison&amp;quot;:&amp;quot;highLow&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;:&amp;quot;aaaa&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;554fc368ec36c13a93e3c71c8081951060965bb2&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;Locations&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;locationNode&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;childComplexFilter&amp;quot;,&lt;br /&gt;
            &amp;quot;childFilterElementId&amp;quot;:&amp;quot;7820aef170ae6c3e723382d6bc81d7b12a674974&amp;quot;,&lt;br /&gt;
            &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
               &amp;quot;relType&amp;quot;:{&lt;br /&gt;
                  &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
                  &amp;quot;relationshipTag&amp;quot;:&amp;quot;deliversToLocationNode&amp;quot;&lt;br /&gt;
               },&lt;br /&gt;
               &amp;quot;objType&amp;quot;:{&lt;br /&gt;
                  &amp;quot;serviceTag&amp;quot;:&amp;quot;DeliveryMethodRAT&amp;quot;,&lt;br /&gt;
                  &amp;quot;objectType&amp;quot;:&amp;quot;rateTable&amp;quot;&lt;br /&gt;
               },&lt;br /&gt;
               &amp;quot;direction&amp;quot;:&amp;quot;to&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;requestProperties&amp;quot;:{}&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;d7a7f875254e856b4205075826631ec042b4c821&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;Locations&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;locationNode&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;operation&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementLeft&amp;quot;:&amp;quot;a5491ba3deb74e523741c8cfeb845f49db444a9c&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementRight&amp;quot;:&amp;quot;554fc368ec36c13a93e3c71c8081951060965bb2&amp;quot;,&lt;br /&gt;
            &amp;quot;operator&amp;quot;:&amp;quot;OR&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;b96447ae98c95858694ca5ec407750c559825930&amp;quot;:{&lt;br /&gt;
         &amp;quot;objType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferPlan&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOfferPlanUserPaymentMethodLink&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;filterElement&amp;quot;:{&lt;br /&gt;
            &amp;quot;filterType&amp;quot;:&amp;quot;operation&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementLeft&amp;quot;:&amp;quot;5faa4000cfb72e7aa28603a7740c212f6d6db5e0&amp;quot;,&lt;br /&gt;
            &amp;quot;filterElementRight&amp;quot;:&amp;quot;a1aa8d2907f8b6f24e7b66116129838e978bcaee&amp;quot;,&lt;br /&gt;
            &amp;quot;operator&amp;quot;:&amp;quot;OR&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;linkPathObjects&amp;quot;:{&lt;br /&gt;
      &amp;quot;1a8a3f9c2c3ea5eaad1f42385362de5dd11cde8a&amp;quot;:{&lt;br /&gt;
         &amp;quot;initialObjType&amp;quot;:{&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;,&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;linkSteps&amp;quot;:[&lt;br /&gt;
            &amp;quot;fa9a637eb09df71d939b3d914eb9ee27ae83048e&amp;quot;,&lt;br /&gt;
            &amp;quot;d3e2d36cab6d9441db10a7c983834cf9196398b3&amp;quot;,&lt;br /&gt;
            &amp;quot;fa9a637eb09df71d939b3d914eb9ee27ae83048e&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;2794814ec253fc93496bfcb50ea18ebfe640bf4d&amp;quot;:{&lt;br /&gt;
         &amp;quot;initialObjType&amp;quot;:{&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;linkSteps&amp;quot;:[&lt;br /&gt;
            &amp;quot;fa9a637eb09df71d939b3d914eb9ee27ae83048e&amp;quot;,&lt;br /&gt;
            &amp;quot;11704ae9a828b4709300964e2e0361bad13db5c3&amp;quot;,&lt;br /&gt;
            &amp;quot;964050f23f92b45a1ea573a573c50ae3ca2bae18&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;5909f82f27bd6c1f921e95b88a65b6e4727a6532&amp;quot;:{&lt;br /&gt;
         &amp;quot;initialObjType&amp;quot;:{&lt;br /&gt;
            &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;,&lt;br /&gt;
            &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;linkSteps&amp;quot;:[&lt;br /&gt;
            &amp;quot;fa9a637eb09df71d939b3d914eb9ee27ae83048e&amp;quot;,&lt;br /&gt;
            &amp;quot;634dd9295fcb1834de0a6ed1f1ab8a9fa06c4d7f&amp;quot;,&lt;br /&gt;
            &amp;quot;d3fc84fa4444406cef2de49baf53d38ab86cd2e0&amp;quot;,&lt;br /&gt;
            &amp;quot;2b0537fa34ee1d259488fce12204dd549e1c98a3&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
      }&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;linkPathSteps&amp;quot;:{&lt;br /&gt;
      &amp;quot;fa9a637eb09df71d939b3d914eb9ee27ae83048e&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasSellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;ProductManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;product&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;to&amp;quot;&lt;br /&gt;
         }&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;d3e2d36cab6d9441db10a7c983834cf9196398b3&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasSellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;from&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;comparison&amp;quot;:&amp;quot;lessThan&amp;quot;,&lt;br /&gt;
         &amp;quot;comparisonSortField&amp;quot;:&amp;quot;productId&amp;quot;,&lt;br /&gt;
         &amp;quot;comparisonSortDataType&amp;quot;:&amp;quot;string&amp;quot;,&lt;br /&gt;
         &amp;quot;comparisonValue&amp;quot;:&amp;quot;eeee&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;634dd9295fcb1834de0a6ed1f1ab8a9fa06c4d7f&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasSellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;from&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;aggregate&amp;quot;:&amp;quot;min&amp;quot;,&lt;br /&gt;
         &amp;quot;sortFields&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;fieldName&amp;quot;:&amp;quot;SellOfferManager_CalCombinedPricingUniqueRequestId&amp;quot;,&lt;br /&gt;
               &amp;quot;dataType&amp;quot;:&amp;quot;string&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;requiredDataObjects&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;fieldName&amp;quot;:&amp;quot;SellOfferManager_CalCombinedPricingUniqueRequestId&amp;quot;,&lt;br /&gt;
               &amp;quot;linkPathObjectId&amp;quot;:&amp;quot;2794814ec253fc93496bfcb50ea18ebfe640bf4d&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ]&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;d3fc84fa4444406cef2de49baf53d38ab86cd2e0&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasOrderPrice&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;orderPrice&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;from&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;requestProperties&amp;quot;:{&lt;br /&gt;
            &amp;quot;tag_sellOfferPlan&amp;quot;:&amp;quot;bbbb&amp;quot;,&lt;br /&gt;
            &amp;quot;tag_sellOfferPlanDeliveryMethodLink&amp;quot;:&amp;quot;bbbb&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;perParentCombinationIds&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_deliverTo&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;e0b8534452e98796f144c83a221764ef32db5ab6&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;applyCombinations&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_sellOfferPlanUserPaymentMethodLink&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;51509dea0a7ba2746dbd24769b8e777f1411f3ff&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ]&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;2b0537fa34ee1d259488fce12204dd549e1c98a3&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasOrderPrice&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;to&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;requestProperties&amp;quot;:{&lt;br /&gt;
            &amp;quot;tag_deliverTo&amp;quot;:&amp;quot;aaaa&amp;quot;,&lt;br /&gt;
            &amp;quot;tag_sellOfferPlanDeliveryMethodLink&amp;quot;:&amp;quot;bbbb&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;applyCombinations&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_sellOfferPlan&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;88d9c5b9ab36d8c3ebf17e8322541b9c64cae25b&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_sellOfferPlanUserPaymentMethodLink&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;51509dea0a7ba2746dbd24769b8e777f1411f3ff&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ]&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;11704ae9a828b4709300964e2e0361bad13db5c3&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasSellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;sellOffer&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;from&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;aggregate&amp;quot;:&amp;quot;average&amp;quot;,&lt;br /&gt;
         &amp;quot;sortFields&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;fieldName&amp;quot;:&amp;quot;sellOfferHandlerServiceTag&amp;quot;,&lt;br /&gt;
               &amp;quot;dataType&amp;quot;:&amp;quot;string&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;requiredDataObjects&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;fieldName&amp;quot;:&amp;quot;sellOfferHandlerServiceTag&amp;quot;,&lt;br /&gt;
               &amp;quot;linkPathObjectId&amp;quot;:&amp;quot;cae7f8604e62fd4ac09146f5bdd512d9db668c70&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;combine&amp;quot;:true&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;964050f23f92b45a1ea573a573c50ae3ca2bae18&amp;quot;:{&lt;br /&gt;
         &amp;quot;pathLinkType&amp;quot;:{&lt;br /&gt;
            &amp;quot;relType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;relationshipTag&amp;quot;:&amp;quot;hasOrderPrice&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;objType&amp;quot;:{&lt;br /&gt;
               &amp;quot;serviceTag&amp;quot;:&amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
               &amp;quot;objectType&amp;quot;:&amp;quot;orderPrice&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;direction&amp;quot;:&amp;quot;from&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;requestProperties&amp;quot;:{&lt;br /&gt;
            &amp;quot;tag_sellOfferPlan&amp;quot;:&amp;quot;aaaa&amp;quot;,&lt;br /&gt;
            &amp;quot;tag_sellOfferPlanDeliveryMethodLink&amp;quot;:&amp;quot;bbbb&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         &amp;quot;applyCombinations&amp;quot;:[&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_deliverTo&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;d7a7f875254e856b4205075826631ec042b4c821&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
               &amp;quot;tag&amp;quot;:&amp;quot;tag_sellOfferPlanUserPaymentMethodLink&amp;quot;,&lt;br /&gt;
               &amp;quot;filterMainId&amp;quot;:&amp;quot;b96447ae98c95858694ca5ec407750c559825930&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
         ],&lt;br /&gt;
         &amp;quot;comparison&amp;quot;:&amp;quot;highLow&amp;quot;,&lt;br /&gt;
         &amp;quot;comparisonSortField&amp;quot;:&amp;quot;sellOfferHandlerServiceTag&amp;quot;,&lt;br /&gt;
		 &amp;quot;comparisonSortDataType&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
         &amp;quot;comparisonValue&amp;quot;:&amp;quot;aaaa&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;sortFields&amp;quot;:[&lt;br /&gt;
      {&lt;br /&gt;
         &amp;quot;fieldName&amp;quot;:&amp;quot;productId&amp;quot;,&lt;br /&gt;
         &amp;quot;dataType&amp;quot;:&amp;quot;string&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
         &amp;quot;fieldName&amp;quot;:&amp;quot;productId&amp;quot;,&lt;br /&gt;
         &amp;quot;dataType&amp;quot;:&amp;quot;array&amp;quot;,&lt;br /&gt;
         &amp;quot;sortArray&amp;quot;:[&lt;br /&gt;
            &amp;quot;ffff&amp;quot;,&lt;br /&gt;
            &amp;quot;eeee&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
      }&lt;br /&gt;
   ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Working documents| 2025-04-17]]&lt;br /&gt;
[[Category:Working documents - Search Results| 2025-04-17]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=3971</id>
		<title>Service - Translations</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Translations&amp;diff=3971"/>
		<updated>2026-01-16T07:14:46Z</updated>

		<summary type="html">&lt;p&gt;Olive: /* systemTextTranslationLink */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Service manages language translations.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-core-shared/izara-core-shared-translations&lt;br /&gt;
&lt;br /&gt;
= Schemas =&lt;br /&gt;
&lt;br /&gt;
==ObjectSchemas==&lt;br /&gt;
&lt;br /&gt;
=== translationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationText&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationTextId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationTextId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;userGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* actual text used, identified by text so shared by all use cases&lt;br /&gt;
* both translationLink and systemTextTranslationLink connect to translation instances&lt;br /&gt;
&lt;br /&gt;
=== translationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;translationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;translationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;textTag&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;translationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;userGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== systemTextTranslationLink ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;objectType&amp;quot;: &amp;quot;systemTextTranslationLink&amp;quot;,&lt;br /&gt;
  &amp;quot;storageResources&amp;quot;: {&lt;br /&gt;
    &amp;quot;graph&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageType&amp;quot;: &amp;quot;graph&amp;quot;,&lt;br /&gt;
      &amp;quot;graphServerTag&amp;quot;: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    // probably has dynamo storage for flow status such as recalulate weight&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;addOnDataStructure&amp;quot;: [],&lt;br /&gt;
  &amp;quot;fieldNames&amp;quot;: {&lt;br /&gt;
    &amp;quot;systemTextTranslationLinkId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;languageId&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;weight&amp;quot;: {&lt;br /&gt;
      &amp;quot;storageResourceTags&amp;quot;: [&lt;br /&gt;
        &amp;quot;graph&amp;quot;&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
	identifiers: [&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;identifier&amp;quot;,&lt;br /&gt;
			fieldName: &amp;quot;systemTextTranslationLinkId&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	],&lt;br /&gt;
  &amp;quot;generatedBy&amp;quot;: &amp;quot;userGenerated&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relationships ==&lt;br /&gt;
&lt;br /&gt;
=== isTranslationText ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	isTranslationText: {&lt;br /&gt;
		storageResources: {&lt;br /&gt;
			myGraph: {&lt;br /&gt;
				storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
				graphServerTag: &amp;quot;GraphHandler&amp;quot;			&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		links: [&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;translationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				storageResourceTags: [&amp;quot;myGraph&amp;quot;],&lt;br /&gt;
				from: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;SystemTextTranslationLink&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
				},&lt;br /&gt;
				to: {&lt;br /&gt;
					objType: {&lt;br /&gt;
						serviceTag: &amp;quot;Translations&amp;quot;,&lt;br /&gt;
						objectType: &amp;quot;TranslationText&amp;quot;&lt;br /&gt;
					},&lt;br /&gt;
					linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			},&lt;br /&gt;
&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables (delete) =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configKey: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configTag: &amp;quot;TranslationGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;TranslationGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LogicalResults ==&lt;br /&gt;
&lt;br /&gt;
Stores results for any requests to perform logical searches on media links&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	resultId: xxx // eg: filterMainId for a single logical element&lt;br /&gt;
	dataId: xxx // one translationLinkId or one subject nodes identifier (the logical request will set what property should be used)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* partition key: resultId&lt;br /&gt;
* sort key: dataId&lt;br /&gt;
&lt;br /&gt;
= Graph database (delete)  = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Translations Graph]] ==&lt;br /&gt;
&lt;br /&gt;
* {textTag} is the name of the text being translated, eg a Catalog subject node will have a textTag &amp;quot;catalogName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{TranslationSharedLib.translationLinkNodeLabel()}&amp;quot;, //eg: translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			translationLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request details&lt;br /&gt;
			}&lt;br /&gt;
			languageId: {&lt;br /&gt;
				immutable: true,&lt;br /&gt;
			}&lt;br /&gt;
			textTag: {&lt;br /&gt;
				immutable: true, // tag of what text is being translated&lt;br /&gt;
			}&lt;br /&gt;
			weight: {&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* creates a link between a subject node and a translation text&lt;br /&gt;
* when recalculating current translation for a languageCode we add the calculated weighted value to this node as a property&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: {TranslationSharedLib.TRANSLATION_GRAPH_NODE_LABEL}, //eg: translation&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			text: {&lt;br /&gt;
				identifier: true,&lt;br /&gt;
			},&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== (subject nodes) ====&lt;br /&gt;
&lt;br /&gt;
Subject node schemas are managed by each service that needs translations, normally as a basic schema with identifier properties only.&lt;br /&gt;
&lt;br /&gt;
* nodeIdentifierLabels: matches that specific object being translated, eg: catalog&lt;br /&gt;
* nodeIdentifierProperties: matches that specific object being translated, eg: catalogId&lt;br /&gt;
* nodeProperties: Can store additional properties, not set by translation service&lt;br /&gt;
* node schema should set identifier = true, immutable = true (which includes elementCanBeRemoved = false)&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkHasRelType()&amp;quot;, // eg: has_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* every translationLink will have this relationship&lt;br /&gt;
* is never removed, but those with low weighted links can be ignored over time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkCurrentRelType()}&amp;quot;, // eg: current_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* the currently used translationLink for the language the link points to&lt;br /&gt;
* only one should exist per subject node and textTag/languageCode combination, but each language for each textTag will have it's own current relationship&lt;br /&gt;
* this relationship will not exist for languages that have no translations&lt;br /&gt;
* can be removed/added when RecalculateCurrentTranslation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.translationLinkDefaultRelType()}&amp;quot;, // eg: default_translationLink&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* sets the default translationLink to use when no translationLink for the requested language/s exist&lt;br /&gt;
* can be changed but each subject/textTag must have 1&lt;br /&gt;
* initially set to the first translation created, later can move it around eg to English if English gets added later&lt;br /&gt;
* could create logic that goes through a sorted list of languages and applies the first languageCode found as the default&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{TranslationSharedLib.isTranslationDefaultRelType()}&amp;quot;,&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: false,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Complex Filter requests =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	filterType: &amp;quot;XXX&amp;quot; // up to calling service&lt;br /&gt;
	type: &amp;quot;group&amp;quot;,&lt;br /&gt;
	elements: &lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			type: &amp;quot;logical&amp;quot;,&lt;br /&gt;
			logicalTag: &amp;quot;textTag_languageId_text&amp;quot;,&lt;br /&gt;
			resultType: &amp;quot;mediaLinkProperty&amp;quot;&lt;br /&gt;
			textTag: &amp;quot;mediaLinkPropertyValue&amp;quot;,&lt;br /&gt;
			languageId: &amp;quot;en&amp;quot;,&lt;br /&gt;
			text: &amp;quot;Blue&amp;quot;,&lt;br /&gt;
			subjectIdentifierPropertyName: &amp;quot;propertyId&amp;quot;,&lt;br /&gt;
			caseSensitive: true&lt;br /&gt;
		},&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- searches for specific and full text, optional case sensitive&lt;br /&gt;
- finds an identifier property on the subjects node and stores in LogicalResults for the request&lt;br /&gt;
- resultType must exist in request because want it to match filterType and Translation has no way of knowing filterType of request&lt;br /&gt;
&lt;br /&gt;
= SQS queues =&lt;br /&gt;
&lt;br /&gt;
== RecalculateCurrentTranslation ==&lt;br /&gt;
&lt;br /&gt;
Add to this queue the subject nodeIdentifierLabels, subject nodeIdentifierProperties, languageCode&lt;br /&gt;
&lt;br /&gt;
* subject nodeIdentifierLabels&lt;br /&gt;
* subject nodeIdentifierProperties&lt;br /&gt;
* languageCode: see below&lt;br /&gt;
&lt;br /&gt;
This queue does not have a Lambda trigger, we could poll it when resource costs really cheap as it is low importance (and/or have an API endpoint that polls and processes a batch).&lt;br /&gt;
&lt;br /&gt;
= Language codes =&lt;br /&gt;
&lt;br /&gt;
Considering using ISO 639-3 codes and designing a way to substring them to automatically go up the hierarchy if no lower level variants match, an alternative would be to allow users to create ordered lists of preferred translations and share these.&lt;br /&gt;
&lt;br /&gt;
= How translations are found for users =&lt;br /&gt;
&lt;br /&gt;
Plan is to allow users to create ordered lists of prefered languages (and perhaps optionally automatic translating as a last option?), and new users are automatically set to a list depending on their location when signing up.&lt;br /&gt;
&lt;br /&gt;
For each text to translate: work through the list and find the first matching translation, if none found fall back onto the default option.&lt;br /&gt;
&lt;br /&gt;
cache results for efficient resource use.&lt;br /&gt;
&lt;br /&gt;
= System text translations =&lt;br /&gt;
&lt;br /&gt;
System text follows the same Label + UniqueIdProperty system to identify specific translation subjects (one system text output), the labels and unique ids can set in npm modules.&lt;br /&gt;
&lt;br /&gt;
* Label example: hard coded or as a constant in NavBar service: &amp;quot;sysTxtNavBar&amp;quot;&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;sysTxtTag&amp;quot;, value: &amp;quot;SignOut&amp;quot; (can set as a constant in NavBar service)&lt;br /&gt;
&lt;br /&gt;
* Label example: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.sysTxtCatalogManager (&amp;quot;sysTxtCatalogManager&amp;quot;)&lt;br /&gt;
* UniqueIdProperty example: &amp;quot;CatalogName&amp;quot;, value: [[NPM module - izara-market-shared#CatalogManagerLib]].constants.CatalogStandard.catalogName&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Translations|Working_documents - Translations]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Translations]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Cart&amp;diff=3902</id>
		<title>Service - Cart</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Cart&amp;diff=3902"/>
		<updated>2026-01-06T10:41:34Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Manages a shopping cart of sell offers prior to confirming as order/s.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-market-services/izara-market-orders-cart&lt;br /&gt;
&lt;br /&gt;
= DynamoDB tables =&lt;br /&gt;
&lt;br /&gt;
== [[Standard Config Table Per Service]] ==&lt;br /&gt;
&lt;br /&gt;
=== Configuration tags ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configTag: &amp;quot;SellOfferManagerServiceName&amp;quot;&lt;br /&gt;
	configKey: &amp;quot;SellOfferManagerServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;SellOfferManager&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configTag: &amp;quot;DeliveryMethodManagerServiceName&amp;quot;&lt;br /&gt;
	configKey: &amp;quot;DeliveryMethodManagerServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;DeliveryMethodManager&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configTag: &amp;quot;PaymentMethodManagerServiceName&amp;quot;&lt;br /&gt;
	configKey: &amp;quot;PaymentMethodManagerServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;PaymentMethodManager&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configTag: &amp;quot;SellOfferPlanServiceName&amp;quot;&lt;br /&gt;
	configKey: &amp;quot;SellOfferPlanServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;SellOfferPlan&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	configTag: &amp;quot;OrderGraphServiceName&amp;quot;&lt;br /&gt;
	configKey: &amp;quot;OrderGraphServiceName&amp;quot;&lt;br /&gt;
	configValue: xxx // eg: &amp;quot;OrderGraph&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Graph database = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Orders Graph]] ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{CartPlanLib.CART_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			cartId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			totalQuantity: {},&lt;br /&gt;
			totalValue: {}, // will be in the currency of the deliveryMethod selected (sellOffer/sellOfferPlans must match deliveryMethod currency or are invalid)&lt;br /&gt;
			name: {},&lt;br /&gt;
			status: {}, // validating|valid|invalid|partiallyValid&lt;br /&gt;
			timeValidated: {}, // date last time validated&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{CartPlanLib.CART_SELLOFFERLINK_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;cartSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			cartSellOfferLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			quantity: {},&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{CartPlanLib.CARTORDER_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;cartOrder&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			cartOrderId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			status: {}, // processing|complete|error&lt;br /&gt;
			errors: {}, // array of errors found&lt;br /&gt;
			totalQuantity: {},&lt;br /&gt;
			totalValue: {}, // will be in the currency of the deliveryMethod selected (when change deliveryMethod need to re-calculate cart)&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createHasCompletedCartGraphRelationshipType()}&amp;quot;, // &amp;quot;hasWorking_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createHasCompletedCartGraphRelationshipType()}&amp;quot;, // &amp;quot;hasCompleted_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createHasDeletedCartGraphRelationshipType()}&amp;quot;, // &amp;quot;hasDeleted_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links a user to a cart&lt;br /&gt;
* a cart can either be working, completed, or deleted&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createHasActiveCartGraphRelationshipType()}&amp;quot;, // &amp;quot;hasActive_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* all users should have one cart that is active&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.cartPaymentMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;cart_paymentMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links a cart to it's current paymentMethod setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.cartDeliveryMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;cart_deliveryMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links a cart to it's current deliveryMethod setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.cartShipToAddressGraphRelationshipType()}&amp;quot;, // &amp;quot;cart_shipToAddress&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links a cart to it's current ship to address setting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    hasCartSellOfferLink: {&lt;br /&gt;
      canChangeToRelTypes: [&lt;br /&gt;
        {&lt;br /&gt;
          serviceTag: &amp;quot;Cart&amp;quot;,&lt;br /&gt;
          relationshipTag: &amp;quot;disabledCartSellOfferLink&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      ],&lt;br /&gt;
      fieldNames: {&lt;br /&gt;
        originTimestamp: {&lt;br /&gt;
          type: 'number',&lt;br /&gt;
          requiredOnCreate: true,&lt;br /&gt;
          canUpdate: true,&lt;br /&gt;
          validation: {}&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Cart&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;cart&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Cart&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;cartSellOfferLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;,&lt;br /&gt;
            requiredOnCreate: true&lt;br /&gt;
          },&lt;br /&gt;
          canDelete: false&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  {&lt;br /&gt;
    disabledCartSellOfferLink: {&lt;br /&gt;
      fieldNames: {},&lt;br /&gt;
      storageResources: {&lt;br /&gt;
        graph: {&lt;br /&gt;
          storageType: &amp;quot;graph&amp;quot;,&lt;br /&gt;
          graphServerTag: &amp;quot;GraphHandler&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      links: [&lt;br /&gt;
        {&lt;br /&gt;
          storageResourceTags: [&amp;quot;graph&amp;quot;],&lt;br /&gt;
          from: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Cart&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;cart&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;one&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          to: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;Cart&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;cartSellOfferLink&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            linkType: &amp;quot;many&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          canDelete: false&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* When deleting cartSellOfferLink, change the relationship from hasCartSellOfferLink to disabledCartSellOfferLink.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createCartSellOfferLinkIsSellOfferGraphRelationshipType()}&amp;quot;, // &amp;quot;cartSellOfferLinkIs_sellOffer&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links cartSellOfferLink to one sellOffer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createCarthasCartOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;has_cartOrder&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{CartPlanLib.createCartOrderHasCartSellOfferLinkGraphRelationshipType()}&amp;quot;, // &amp;quot;cartOrderHas_cartSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		elementCanBeRemoved: true,&lt;br /&gt;
		allPropertiesImmutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the request to create/change this relationship was sent&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* links a cartSellOfferLink to a cartOrder&lt;br /&gt;
&lt;br /&gt;
= Cart Orders =&lt;br /&gt;
&lt;br /&gt;
* One cart can have many sellOffers from many sellers, or sell offers that don't combineWins, that cannot be purchased as a single order&lt;br /&gt;
* When validating split out into multiple orders according to what can be combined into a single payment/order&lt;br /&gt;
&lt;br /&gt;
== Grouping into orders ==&lt;br /&gt;
&lt;br /&gt;
* Done when validating cart&lt;br /&gt;
* Go through each selloffer:&lt;br /&gt;
*# does it offer the cart's paymentMethod? If not is invalid&lt;br /&gt;
*# does its offer the cart's deliveryMethod? If not is invalid&lt;br /&gt;
*# does the quantity chosen validate sellOffer available qty/minimum quantity? If not is invalid&lt;br /&gt;
*# if no sellOffers valid then cart status is invalid. If some sellOffers invalid then cart status is partiallyValid&lt;br /&gt;
*# if sellOffer does not combine then it gets put into it's own order&lt;br /&gt;
*# do all sellOfferPlans for all sellOffers use the same valueType/valueId (either from deliveryMethod or from sellOfferPlanDeliveryMethodLink), if not must split out&lt;br /&gt;
*# split sellOffers by seller and stock location&lt;br /&gt;
&lt;br /&gt;
= Data model notes =&lt;br /&gt;
&lt;br /&gt;
* Consider cart details transient and of low importance, no need to have record of changes&lt;br /&gt;
&lt;br /&gt;
= Ideas = &lt;br /&gt;
&lt;br /&gt;
* cart service could have function for testing multiple prices, find all payment methods and delivery methods offered by all sell offers in cart, then find total price for each combination (maybe also check all delivery methods ship to selected destination?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Cart|Cart]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Cart]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3618</id>
		<title>Service - Orders</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3618"/>
		<updated>2025-11-14T09:22:58Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Manages submitted orders.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-market-services/izara-market-orders-orders&lt;br /&gt;
&lt;br /&gt;
= Graph database = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Orders Graph]] ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			totalQuantity: {},&lt;br /&gt;
			totalValue: {},&lt;br /&gt;
			currencyId: {},&lt;br /&gt;
			orderStatus: {}, // validating|valid&lt;br /&gt;
			sellerStatus: {}, // processing|shipped|delivered&lt;br /&gt;
			timeOfOrder: {}, // date order submitted&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_SELLOFFERLINK_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderSellOfferLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			quantity: {},&lt;br /&gt;
			orderTotal: {},&lt;br /&gt;
			subTotal: {}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* orderTotal: The unit price of the product (from sellOfferPrices).&lt;br /&gt;
*subTotal: The total price for that item, calculated as orderTotal × quantity.&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createPlacedOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;placed_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the buyer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createSoldOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;sold_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the seller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderPaymentMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_paymentMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to paymentMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderDeliveryMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_deliveryMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to deliveryMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderShipToAddressGraphRelationshipType()}&amp;quot;, // &amp;quot;order_shipToAddress&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the ship to address used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createHasOrderSellOfferLinkGraphRelationshipType()}&amp;quot;, // &amp;quot;has_orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderSellOfferLinkIsSellOfferGraphRelationshipType()}&amp;quot;, // &amp;quot;orderSellOfferLinkIs_sellOffer&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links orderSellOfferLink to one sellOffer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createFromCartOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;from_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links order to cart used to submit this order&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Orders|Orders]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Orders]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3617</id>
		<title>Service - Orders</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3617"/>
		<updated>2025-11-14T09:19:49Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Manages submitted orders.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-market-services/izara-market-orders-orders&lt;br /&gt;
&lt;br /&gt;
= Graph database = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Orders Graph]] ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			totalQuantity: {},&lt;br /&gt;
			totalValue: {},&lt;br /&gt;
			currencyId: {},&lt;br /&gt;
			orderStatus: {}, // validating|valid&lt;br /&gt;
			sellerStatus: {}, // processing|shipped|delivered&lt;br /&gt;
			timeOfOrder: {}, // date order submitted&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_SELLOFFERLINK_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderSellOfferLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			quantity: {},&lt;br /&gt;
			orderTotal: {},&lt;br /&gt;
			subTotal: {}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
orderTotal: The unit price of the product (from sellOfferPrices).&lt;br /&gt;
subTotal: The total price for that item, calculated as orderTotal × sellOfferQuantity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createPlacedOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;placed_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the buyer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createSoldOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;sold_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the seller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderPaymentMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_paymentMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to paymentMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderDeliveryMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_deliveryMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to deliveryMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderShipToAddressGraphRelationshipType()}&amp;quot;, // &amp;quot;order_shipToAddress&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the ship to address used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createHasOrderSellOfferLinkGraphRelationshipType()}&amp;quot;, // &amp;quot;has_orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderSellOfferLinkIsSellOfferGraphRelationshipType()}&amp;quot;, // &amp;quot;orderSellOfferLinkIs_sellOffer&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links orderSellOfferLink to one sellOffer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createFromCartOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;from_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links order to cart used to submit this order&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Orders|Orders]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Orders]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3616</id>
		<title>Service - Orders</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=Service_-_Orders&amp;diff=3616"/>
		<updated>2025-11-14T08:56:09Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Manages submitted orders.&lt;br /&gt;
&lt;br /&gt;
= Repository =&lt;br /&gt;
&lt;br /&gt;
https://bitbucket.org/izara-market-services/izara-market-orders-orders&lt;br /&gt;
&lt;br /&gt;
= Graph database = &lt;br /&gt;
&lt;br /&gt;
== [[Service - Orders Graph]] ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			totalQuantity: {},&lt;br /&gt;
			totalValue: {},&lt;br /&gt;
			currencyId: {},&lt;br /&gt;
			orderStatus: {}, // validating|valid&lt;br /&gt;
			sellerStatus: {}, // processing|shipped|delivered&lt;br /&gt;
			timeOfOrder: {}, // date order submitted&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	nodeLabel: &amp;quot;{OrderLib.ORDER_SELLOFFERLINK_GRAPH_NODE_LABEL}&amp;quot;, // &amp;quot;orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		identifier: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		restrictRelationships: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			orderSellOfferLinkId: {&lt;br /&gt;
				identifier: true, // create unique id from request params and uniqueMessageId&lt;br /&gt;
			},&lt;br /&gt;
			quantity: {},&lt;br /&gt;
			orderTotal: {},&lt;br /&gt;
			subTotal: {}&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createPlacedOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;placed_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the buyer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createSoldOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;sold_order&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the seller&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderPaymentMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_paymentMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to paymentMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderDeliveryMethodGraphRelationshipType()}&amp;quot;, // &amp;quot;order_deliveryMethod&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to deliveryMethod used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderShipToAddressGraphRelationshipType()}&amp;quot;, // &amp;quot;order_shipToAddress&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* links an order to the ship to address used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createHasOrderSellOfferLinkGraphRelationshipType()}&amp;quot;, // &amp;quot;has_orderSellOfferLink&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createOrderSellOfferLinkIsSellOfferGraphRelationshipType()}&amp;quot;, // &amp;quot;orderSellOfferLinkIs_sellOffer&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links orderSellOfferLink to one sellOffer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relationshipType: &amp;quot;{OrderLib.createFromCartOrderGraphRelationshipType()}&amp;quot;, // &amp;quot;from_cart&amp;quot;&lt;br /&gt;
	schema: {&lt;br /&gt;
		immutable: true,&lt;br /&gt;
		restrictProperties: true,&lt;br /&gt;
		properties: {&lt;br /&gt;
			originTimestamp: //timestamp the order was made&lt;br /&gt;
		},&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Links order to cart used to submit this order&lt;br /&gt;
&lt;br /&gt;
= Working documents =&lt;br /&gt;
&lt;br /&gt;
[[:Category:Working_documents - Orders|Orders]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Backend services| Orders]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=2025-04-17_-_LinkPath_structure_and_examples&amp;diff=3590</id>
		<title>2025-04-17 - LinkPath structure and examples</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=2025-04-17_-_LinkPath_structure_and_examples&amp;diff=3590"/>
		<updated>2025-10-27T08:10:05Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Service - Search Results]]&lt;br /&gt;
&lt;br /&gt;
= reqiuredData structure =&lt;br /&gt;
* requiredData as array that have multiple feildName to findData&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    fieldName: &amp;quot;fieldname if main objType or last fieldName for linkPath&amp;quot;,&lt;br /&gt;
    combinationComplexFilter: {&lt;br /&gt;
      [combinationA]: {&lt;br /&gt;
       //* complexFilter as normalize structure&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    linkPath: [&lt;br /&gt;
      {&lt;br /&gt;
        link: {&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: &amp;quot;ServciceTag&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;linkObjectType1&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          relType: {&lt;br /&gt;
            serviceTag: &amp;quot;ServiceTag&amp;quot;,&lt;br /&gt;
            objectType: &amp;quot;hasLinkObjectType1&amp;quot;&lt;br /&gt;
          },&lt;br /&gt;
          direction: &amp;quot;to&amp;quot; | &amp;quot;from&amp;quot;,&lt;br /&gt;
          requestProperties: {&lt;br /&gt;
           orderQuantity: 2,&lt;br /&gt;
           //...&lt;br /&gt;
         }&lt;br /&gt;
        },&lt;br /&gt;
        //== condition ==&lt;br /&gt;
        filterElements: [],&lt;br /&gt;
        aggregate: &amp;quot;max&amp;quot; | &amp;quot;min&amp;quot; | &amp;quot;average&amp;quot;,&lt;br /&gt;
        sortFields: {&lt;br /&gt;
          fieldName: &amp;quot;fieldname if main objType or last fieldName for linkPath&amp;quot;,&lt;br /&gt;
          dataType: &amp;quot;string&amp;quot; | &amp;quot;number&amp;quot; | &amp;quot;array&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        combine: true | false,&lt;br /&gt;
        perParentComplexFilters: {&lt;br /&gt;
          [combinationTagB]: {&lt;br /&gt;
            //* complexFilter as normalize structure&lt;br /&gt;
          }&lt;br /&gt;
        },&lt;br /&gt;
        applyCombinations: [&lt;br /&gt;
          //* tag only in combinationComplexFilters&lt;br /&gt;
          &amp;quot;combinationTagA&amp;quot;&lt;br /&gt;
        ],&lt;br /&gt;
        comparison: &amp;quot;lessThan&amp;quot; | &amp;quot;gearterThan&amp;quot; | &amp;quot;lessThanEquals&amp;quot; | &amp;quot;greaterThanEquals&amp;quot; | &amp;quot;high&amp;quot; | &amp;quot;low&amp;quot; | &amp;quot;highLow&amp;quot;,&lt;br /&gt;
        comparisonValue: &amp;quot;value&amp;quot;,&lt;br /&gt;
        comparisonSortField: &amp;quot;fieldName&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      //...&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[&lt;br /&gt;
 {&lt;br /&gt;
  fieldName: &amp;quot;price&amp;quot;,&lt;br /&gt;
    combinationComplexFilters: {&lt;br /&gt;
    locationNode: {&lt;br /&gt;
      //* complexFilter as normalize structure&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  linkPath: [&lt;br /&gt;
    {&lt;br /&gt;
      link: {&lt;br /&gt;
        objType: {&lt;br /&gt;
          serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;sellOffer&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        relType: {&lt;br /&gt;
          serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;sellOffer&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        direction: &amp;quot;from&amp;quot;,&lt;br /&gt;
        requestProperties: {&lt;br /&gt;
         orderQuantity: 2,&lt;br /&gt;
         //...&lt;br /&gt;
       }&lt;br /&gt;
      },&lt;br /&gt;
      filterElements: [ //* must change to normalize structure&lt;br /&gt;
        {&lt;br /&gt;
          type: &amp;quot;logical&amp;quot;, //example&lt;br /&gt;
          fieldName: &amp;quot;price&amp;quot;,&lt;br /&gt;
          comparison: &amp;quot;greaterThan&amp;quot;,&lt;br /&gt;
          value: 50&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          type: &amp;quot;complexFilter&amp;quot;,&lt;br /&gt;
          complexFilter: {&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
              objectType: &amp;quot;sellOffer&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
            //...&lt;br /&gt;
            //.. maybe ref. from main filter&lt;br /&gt;
          }&lt;br /&gt;
        },&lt;br /&gt;
        //...&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      link: {&lt;br /&gt;
        objType: {&lt;br /&gt;
          serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;sellOffer&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        relType: {&lt;br /&gt;
          serviceTag: &amp;quot;SellOfferManager&amp;quot;,&lt;br /&gt;
          objectType: &amp;quot;hasOrderPrice&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        direction: &amp;quot;from&amp;quot;,&lt;br /&gt;
        requestProperties: {&lt;br /&gt;
         orderQuantity: 2,&lt;br /&gt;
         deliveryMethodIds: [&lt;br /&gt;
          &amp;quot;deliveryMethodId_chiangMai&amp;quot;&lt;br /&gt;
         ]&lt;br /&gt;
         //...&lt;br /&gt;
       }&lt;br /&gt;
      },&lt;br /&gt;
      //== condition ==&lt;br /&gt;
      //filterElements&lt;br /&gt;
      aggregate: &amp;quot;max&amp;quot;,&lt;br /&gt;
      sortFields: {&lt;br /&gt;
        fieldName: &amp;quot;price&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;number&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      combine: true,&lt;br /&gt;
      perParentComplexFilters: {&lt;br /&gt;
        sellOfferPlan: {&lt;br /&gt;
          //* complexFilter as normalize structure&lt;br /&gt;
        },&lt;br /&gt;
        sellOfferPlanDeliveryMethodLink: {&lt;br /&gt;
          //* complexFilter as normalize structure&lt;br /&gt;
        },&lt;br /&gt;
        sellOfferPlanUserPaymentMethodLink: {&lt;br /&gt;
          //* complexFilter as normalize structure&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
      applyCombinations: [&lt;br /&gt;
        //* tag only in combinationComplexFilters&lt;br /&gt;
        &amp;quot;locationNode&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
      // comparison: &amp;quot;greaterThan&amp;quot;,&lt;br /&gt;
      // comparisonValue: &amp;quot;50&amp;quot;,&lt;br /&gt;
      // comparisonSortField: &amp;quot;upToValue&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    //...&lt;br /&gt;
  ]&lt;br /&gt;
 },&lt;br /&gt;
 //...&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ProcessSearchResultMessage ==&lt;br /&gt;
* Fetch and Sort Product Sizes by Language with Fallback&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Need to fetch all sizes, sorted by language order 'en', 'th'.&lt;br /&gt;
If a translation is missing for any language in sortArray: ['en', 'th'],&lt;br /&gt;
fallback to the defaultTranslationLink of that productAttribute.&lt;br /&gt;
ProductAttributeLabel with labelId = 'Id_X' represents a size.&lt;br /&gt;
identifiersIdArray contains all productAttributeIds linked to ProductAttributeLabel where labelId='Id_X'.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let processSearchResultMessage = {&lt;br /&gt;
  objType: {&lt;br /&gt;
    serviceTag: 'ProductAttribute',&lt;br /&gt;
    objectType: 'productAttribute'&lt;br /&gt;
  },&lt;br /&gt;
  requiredData: [&lt;br /&gt;
    {&lt;br /&gt;
      fieldName: 'text', //all sizes by languageId, where text is the identifiers of the translation objectType, which is the final link step of this requiredData&lt;br /&gt;
      linkPath: [&lt;br /&gt;
        {&lt;br /&gt;
          link: {&lt;br /&gt;
            relType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              relationshipTag: 'hasTranslationLink'&lt;br /&gt;
              // Must use hasTranslationLink because it will be automatically added by inserting a filterElement with logicalType: &amp;quot;translateIds&amp;quot;&lt;br /&gt;
              // where identifiers come from identifiersIdArray (Process-ComplexFilter), along with a filterElement of type: &amp;quot;logicalOperator&amp;quot; and operator: &amp;quot;and&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              objectType: 'translationLink'&lt;br /&gt;
            },&lt;br /&gt;
            direction: 'from'&lt;br /&gt;
          },&lt;br /&gt;
          aggregate: 'min',   //if 'min' sorts languages in order 'en', 'th', //if max sorts languages in order 'th', 'en&lt;br /&gt;
          sortFields: {&lt;br /&gt;
            fieldName: 'languageId',&lt;br /&gt;
            dataType: 'array',&lt;br /&gt;
            sortArray: ['en', 'th']  // sorts languages according to sortArray&lt;br /&gt;
          },&lt;br /&gt;
          filterElements: [&lt;br /&gt;
            {&lt;br /&gt;
              type: 'group',&lt;br /&gt;
              elements: [&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'traversal',&lt;br /&gt;
                  traversals: [&lt;br /&gt;
                    {&lt;br /&gt;
                      fields: {&lt;br /&gt;
                        languageId: { anyValue: ['en', 'th'] },&lt;br /&gt;
                        textTag: 'productAttributeValue'&lt;br /&gt;
                      },&lt;br /&gt;
                      link: {&lt;br /&gt;
                        relationshipDirection: 'from',&lt;br /&gt;
                        relType: {&lt;br /&gt;
                          serviceTag: 'Translations',&lt;br /&gt;
                          relationshipTag: 'currentTranslationLink'&lt;br /&gt;
                        }&lt;br /&gt;
                      }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                      objType: {&lt;br /&gt;
                        serviceTag: 'ProductAttribute',&lt;br /&gt;
                        objectType: 'productAttribute'&lt;br /&gt;
                      }&lt;br /&gt;
                    }&lt;br /&gt;
                  ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'logicalOperator', operator: 'or'&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                  type: 'traversal',&lt;br /&gt;
                  traversals: [&lt;br /&gt;
                    {&lt;br /&gt;
                      fields: {&lt;br /&gt;
                        textTag: 'productAttributeValue'&lt;br /&gt;
                      },&lt;br /&gt;
                      link: {&lt;br /&gt;
                        relationshipDirection: 'from',&lt;br /&gt;
                        relType: {&lt;br /&gt;
                          serviceTag: 'Translations',&lt;br /&gt;
                          relationshipTag: 'defaultTranslationLink'&lt;br /&gt;
                        }&lt;br /&gt;
                      }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                      objType: {&lt;br /&gt;
                        serviceTag: 'ProductAttribute',&lt;br /&gt;
                        objectType: 'productAttribute'&lt;br /&gt;
                      }&lt;br /&gt;
                    }&lt;br /&gt;
                  ]&lt;br /&gt;
                }&lt;br /&gt;
              ]&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          link: {&lt;br /&gt;
            relType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              relationshipTag: 'isTranslation'&lt;br /&gt;
            },&lt;br /&gt;
            objType: {&lt;br /&gt;
              serviceTag: 'Translations',&lt;br /&gt;
              objectType: 'translation'&lt;br /&gt;
            },&lt;br /&gt;
            direction: 'from'&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  filter: {&lt;br /&gt;
    objType: {&lt;br /&gt;
      serviceTag: 'ProductAttribute',&lt;br /&gt;
      objectType: 'productAttribute'&lt;br /&gt;
    },&lt;br /&gt;
    elements: [&lt;br /&gt;
      {&lt;br /&gt;
        type: 'complexFilter',&lt;br /&gt;
        complexFilter: {&lt;br /&gt;
          objType: {&lt;br /&gt;
            serviceTag: 'ProductAttribute',&lt;br /&gt;
            objectType: 'ProductAttributeLabel'&lt;br /&gt;
          },&lt;br /&gt;
          relType: {&lt;br /&gt;
            serviceTag: 'ProductAttribute',&lt;br /&gt;
            relationshipTag: 'isProductAttributeLabel'&lt;br /&gt;
          },&lt;br /&gt;
          direction: 'from',&lt;br /&gt;
          elements: [&lt;br /&gt;
            {&lt;br /&gt;
              type: 'logical',&lt;br /&gt;
              fieldName: 'labelId',&lt;br /&gt;
              comparison: 'equals',&lt;br /&gt;
              value: 'Id_X'&lt;br /&gt;
            }&lt;br /&gt;
          ]&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  requestProperties: {},&lt;br /&gt;
  identifiersIdArray: [&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_1',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_1'&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_2',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_2'&lt;br /&gt;
      }&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      identifiersId: 'hashOfIdentifiersObject_3',&lt;br /&gt;
      identifiers: {&lt;br /&gt;
        productAttributeId: 'productAttributeId_uuid_3'&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Working documents| 2025-04-17]]&lt;br /&gt;
[[Category:Working documents - Search Results| 2025-04-17]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
	<entry>
		<id>https://izara.io/wiki/index.php?title=2025-01-23_-_Standard_Object_and_Relationship_Data_Structures&amp;diff=3277</id>
		<title>2025-01-23 - Standard Object and Relationship Data Structures</title>
		<link rel="alternate" type="text/html" href="https://izara.io/wiki/index.php?title=2025-01-23_-_Standard_Object_and_Relationship_Data_Structures&amp;diff=3277"/>
		<updated>2025-06-03T10:26:57Z</updated>

		<summary type="html">&lt;p&gt;Olive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
Standard structure and definition of object. &lt;br /&gt;
&lt;br /&gt;
= Definition =&lt;br /&gt;
&lt;br /&gt;
== objType ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
	objectType: &amp;quot;yyy&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
use to identify which serviceTag that object schema located&lt;br /&gt;
* serviceTag: service tag that stored object schema&lt;br /&gt;
* objectType: name of object schema&lt;br /&gt;
&lt;br /&gt;
== objTypeConcat ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serviceTag&amp;gt;_&amp;lt;objectType&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* objTypeConcat: &amp;quot;serviceTag&amp;quot; + &amp;quot;_&amp;quot; + &amp;quot;objectType&amp;quot;&lt;br /&gt;
* now use as the name of node label in graph database&lt;br /&gt;
&lt;br /&gt;
== objTypeId ==&lt;br /&gt;
* hash of objType object&lt;br /&gt;
&lt;br /&gt;
== relType ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
	relationshipTag: &amp;quot;yyy&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
use to identify which serviceTag that relationship schema  located&lt;br /&gt;
* serviceTag: service tag that stored object schema&lt;br /&gt;
* relationshipTag: name of relationship schema&lt;br /&gt;
&lt;br /&gt;
== relTypeConcat ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serviceTag&amp;gt;_&amp;lt;relationshipTag&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* relTypeConcat: &amp;quot;serviceTag&amp;quot; + &amp;quot;_&amp;quot; + &amp;quot;relationshipTag&amp;quot;&lt;br /&gt;
* now use as the name of relationshipType in graph database&lt;br /&gt;
&lt;br /&gt;
== relTypeId ==&lt;br /&gt;
* hash of relType object&lt;br /&gt;
&lt;br /&gt;
== relTypeAndDirection ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	relType: {&lt;br /&gt;
		serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
		relationshipTag: &amp;quot;yyy&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	relationshipDirection: &amp;quot;to&amp;quot; // &amp;quot;from&amp;quot; || &amp;quot;to&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== linkType ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  firstObjType: {&lt;br /&gt;
    serviceTag: &amp;quot;xx&amp;quot;,&lt;br /&gt;
    objectType: &amp;quot;yy&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
  secondObjType: {&lt;br /&gt;
    serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
    objectType: &amp;quot;yyy&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  relType: {&lt;br /&gt;
    serviceTag: &amp;quot;xxxx&amp;quot;,&lt;br /&gt;
    relationshipTag: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  relationshipDirection: &amp;quot;to&amp;quot; // &amp;quot;from&amp;quot; || &amp;quot;to&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
use to identify relationship between 2 objectSchema&lt;br /&gt;
&lt;br /&gt;
== linkTypeId ==&lt;br /&gt;
create hash id from linkType&lt;br /&gt;
&lt;br /&gt;
== pathLinkType ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  objType: {&lt;br /&gt;
    serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
    objectType: &amp;quot;yyy&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  relType: {&lt;br /&gt;
    serviceTag: &amp;quot;xxxx&amp;quot;,&lt;br /&gt;
    relationshipTag: &amp;quot;yyyy&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  relationshipDirection: &amp;quot;to&amp;quot; // &amp;quot;from&amp;quot; || &amp;quot;to&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* pathLinkType is used at each step of traversal/path&lt;br /&gt;
* when joined with the previous objType/baseObjType can be used to create linkType (and request linkConfig)&lt;br /&gt;
&lt;br /&gt;
== flowType ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	serviceTag: &amp;quot;xxx&amp;quot;,&lt;br /&gt;
	flowTag: &amp;quot;yyy&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
use to identify which serviceTag that flow schema is located&lt;br /&gt;
&lt;br /&gt;
== identifiers ==&lt;br /&gt;
An object that has fieldName’s identifiers inside&lt;br /&gt;
=== example identifiers ===&lt;br /&gt;
* example identifiers inside objectSchema&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
identifiers:[&lt;br /&gt;
  {    &lt;br /&gt;
    type: &amp;quot;partitionKey&amp;quot;,&lt;br /&gt;
    fieldNames: [&amp;quot;xx&amp;quot;,&amp;quot;yy&amp;quot;],&lt;br /&gt;
    name: &amp;quot;zz&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* example identifiers object&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{    &lt;br /&gt;
  xx:&amp;quot;xx value&amp;quot;,&lt;br /&gt;
  yy:&amp;quot;yy value&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above identifiers is the value of fieldNames that part of identifiers &lt;br /&gt;
&lt;br /&gt;
== identifiersBase ==&lt;br /&gt;
concatenated identifiers object &lt;br /&gt;
=== example identifiersBase ===&lt;br /&gt;
* example identifiers inside objectSchema&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
identifiers:[&lt;br /&gt;
  {    &lt;br /&gt;
    type: &amp;quot;partitionKey&amp;quot;,&lt;br /&gt;
    fieldNames: [&amp;quot;xx&amp;quot;,&amp;quot;yy&amp;quot;],&lt;br /&gt;
    name: &amp;quot;zz&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* example identifiersBase object&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{    &lt;br /&gt;
  zz:&amp;quot;xxValue_yyValue&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above identifiersBase is the value of each identifier of objectSchema &lt;br /&gt;
&lt;br /&gt;
== identifiersId ==&lt;br /&gt;
hash of identifiers object &lt;br /&gt;
&lt;br /&gt;
== identifiersConcat ==&lt;br /&gt;
string that concatenate all identifiers&lt;br /&gt;
* Note!: Will ordered concatenate value by objectSchema.identifiers array &lt;br /&gt;
&lt;br /&gt;
== objInstanceBase ==&lt;br /&gt;
result from dynamoDB that contains relevant and not relevant data of objectSchema &lt;br /&gt;
* identifiers from in objInstanceBase will concatenated or not concatenated depending on objectSchema&lt;br /&gt;
* izContext field not relevant with objectSchema but it contains inside objInstanceBase&lt;br /&gt;
&lt;br /&gt;
== objInstance ==&lt;br /&gt;
similar objInstanceBase but split concatenateIdentifier to each fieldName&lt;br /&gt;
&lt;br /&gt;
== objInstanceFull ==&lt;br /&gt;
object that separated fields and identifiers and identifiers cannot concatenated&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
{    &lt;br /&gt;
  identifiers:{&lt;br /&gt;
    //... identifiers fieldName of objectSchema&lt;br /&gt;
  }, &lt;br /&gt;
  fields:{&lt;br /&gt;
    //.. data of objectSchema&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* identifiers: contains identifiers data&lt;br /&gt;
* fields: another data except  &lt;br /&gt;
&lt;br /&gt;
== example data  ==&lt;br /&gt;
=== example objectSchema ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example objectSchema&lt;br /&gt;
{    &lt;br /&gt;
  fieldNames:{&lt;br /&gt;
    id:{&lt;br /&gt;
      type:”string”,&lt;br /&gt;
      // … another fieldName settings&lt;br /&gt;
    },&lt;br /&gt;
    createTime: {},     //  filedName settings&lt;br /&gt;
    location: {},       //  filedName settings&lt;br /&gt;
    value: {},          //  filedName settings&lt;br /&gt;
  },&lt;br /&gt;
  identifiers:[&lt;br /&gt;
    {&lt;br /&gt;
      type: &amp;quot;partitionKey&amp;quot;,&lt;br /&gt;
      fieldNames: [&amp;quot;id&amp;quot;,&amp;quot;createTime&amp;quot;],   // composite partition keys in DynamoDB&lt;br /&gt;
      deliminator: &amp;quot;_&amp;quot;,                  // optional, defaults to &amp;quot;_&amp;quot;&lt;br /&gt;
      name: &amp;quot;createId&amp;quot;                   // name of field in database&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      type: &amp;quot;sortKey&amp;quot;,&lt;br /&gt;
      fieldName: “location”&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== objInstanceBase ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example objInstanceBase data&lt;br /&gt;
{&lt;br /&gt;
  createId:&amp;quot;id_createTime&amp;quot;,&lt;br /&gt;
  location:&amp;quot;cnx&amp;quot;,&lt;br /&gt;
  value:199,&lt;br /&gt;
  errorsFound:[],&lt;br /&gt;
  izContext:{&lt;br /&gt;
  // ...izContext&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Normally objInstanceBase is the result from dynamoDB and it will include data that is not relevant to objectSchema. In example above errorsFound and izContext not contain in objectSchema.&lt;br /&gt;
&lt;br /&gt;
=== objInstance ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example objInstance data&lt;br /&gt;
{&lt;br /&gt;
  id:&amp;quot;id&amp;quot;,&lt;br /&gt;
  createTime:&amp;quot;createTime&amp;quot;&lt;br /&gt;
  location:&amp;quot;cnx&amp;quot;,&lt;br /&gt;
  value:199,&lt;br /&gt;
  errorsFound:[],&lt;br /&gt;
  izContext:{&lt;br /&gt;
  // ...izContext&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
objInstance is object that already refactored identifiers but another fields same as objInstanceBase &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== objInstanceFull ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example objInstanceFull data&lt;br /&gt;
{    &lt;br /&gt;
  identifiers:{&lt;br /&gt;
    id:&amp;quot;id&amp;quot;,&lt;br /&gt;
    createTime:&amp;quot;createTime&amp;quot;&lt;br /&gt;
    location:&amp;quot;cnx&amp;quot;,&lt;br /&gt;
  }, &lt;br /&gt;
  fields:{&lt;br /&gt;
    value:199,&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== identifiersBase ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example identifiersBase data&lt;br /&gt;
{&lt;br /&gt;
  createId:&amp;quot;id_createTime&amp;quot;,&lt;br /&gt;
  location:&amp;quot;cnx&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== identifiers ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
// example identifiers data&lt;br /&gt;
{&lt;br /&gt;
  id: &amp;quot;id&amp;quot;,&lt;br /&gt;
  createTime: &amp;quot;createTime&amp;quot;,&lt;br /&gt;
  location: &amp;quot;cnx&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Working documents| 2025-01-23]]&lt;br /&gt;
[[Category:Working documents - Per Service Schemas| 2025-01-23]]&lt;/div&gt;</summary>
		<author><name>Olive</name></author>
	</entry>
</feed>