Synchronize address from company
Event Action – Abstract
Purpose: Within company and address attributes specified via the Company type, the value in the 'Address' (address) field synchronizes with the current address of a company account selected in the same attribute (company.address).
The Synchronize address from company event action synchronizes within company and address attributes of a business transaction object, the value in the address field (address) with the current address from a company account selected for the same Company type.
Configuration options control whether an existing address assignment – if any – should also be overwritten or deleted by the synchronization. By default (without these options) the company address (company.address) will only be copied to an empty 'address' (address) field.
Background on the company and address attribute
A 'company and address attribute' always refers to exactly one Company type, for which it can define a reference to a company account created in Lobster Data Platform / Orchestration (in the company field) and a freely definable address (address) field. Both specifications can be used optionally or simultaneously. Since a referenced company account in turn contains an address field, the question always arises when accessing 'address data' of a company and the address attribute, as to whether the address attribute field (address) or the address of the company account referenced in the attribute (company.address) is intended.
A reference to a company account also makes the relevant company 'involved' in the business transaction object, which gives the associated users access to the business transaction object within the scope of their role permissions. So it makes a considerable difference if in a company and address attribute, the address of a company was entered in the 'Address' (address) field or the ID of the company account was assigned by 'company selection' in the 'Company' (company)field.
The goal of the Synchronize address from company event action is to transfer the address contained in the company account of an 'involved company' to the Address (address) field of the same company and address attribute.
►IMPORTANT◄ Since addresses are Referenced objects, the ID of the address is transferred from the company account to the address (address) field during synchronization, but no link to the company account is created. After synchronization, the address data in the company account and in the company and address attribute can be changed independently of each other, each resulting in a change of the assigned address ID. The synchronized address therefore acts in the same way as a snapshot of the address in the company account at the time the event action was executed.
Why or when to synchronize the address?
(without any claim to completeness)
If 'addressing' a certain company type is done either by company selection or by address entry, the systematic question arises when 'reading' the addresses concerned, whether the characteristics are to be read from the company.address or the address in each case. Of course, it is possible to check explicitly in each case whether one or the other address exists and then process the 'used' one. However, the process can be simplified by executing the action Synchronize address from company (e.g. always when saving the business transaction object) to ensure that the status of all relevant company addresses according to the Company type valid at this time is 'transferred' as a snapshot to the respective address field. Then a read access can always be made uniformly to the 'Address' (address) field, which is particularly helpful if Custom overviews are to display address data for the relevant Company type.
Under certain circumstances, the address of a participating company in the data of a business transaction object shall be specifically 'frozen' at a certain point in time during the life cycle of this business transaction object, so that subsequent changes to the address in the company account can be made without affecting the addressing. In this case, synchronization can be triggered, for example, by a change of working state and/or an 'export' of the data to another system.
Synchronization can also be done 'on demand' (e.g. via a Custom action event triggered by a Button in a form) to provide a snapshot of the company address in an address field, where it can be edited or supplemented if necessary without affecting the company address in the company account.
Under certain circumstances, depending on the workflow for a business transaction object, the participation of a company established by 'company selection' (and therefore its access to the business transaction object) is specifically scheduled again at a later time. To do this, the 'company selection' or the company field must be deleted. If the address of the company is synchronized into the 'address' (address) field beforehand, it remains at least superficially traceable as to who was registered as a participant for the Company type in question.
Configuration
The business transaction object whose company and address attributes are to be synchronized must exist as a reference object for the Synchronize address from company event action.
|
|
Example
A data input form for the business transaction type Orders provides a company selection for the Company type Loading party Address and a company selection for the Company type Consignee. Only Company accounts that are qualified in the company account for the respective Company type are available for selection. When selected, these automatically become 'involved' in the order, so that the order in question is listed in the context of an overview for Orders, for example, when an authorized user logs on in the context of the company in question.
Runtime example: Newly created order with three companies involved
Below the selection fields for Loading party and Consignee, a deactivated Expandable element can be seen in the input form, which represents the previously unused field 'Address' (address) of the respective company and address attribute.
If the order status of an order changes to 'Canceled', the participation of the companies selected as Loading party and Consignee should be terminated, so that only the Freight forwarder, who is also involved, has access to the data of the canceled order.
In order for the Freight forwarder to be able to track between which companies traffic was requested, the company address should be synchronized into the address field before deleting the company ID from the company field.:
Runtime example: Canceled order in which only the freight forwarder is still involved
The company selection is empty in each case, while the addresses of originally selected companies have been 'preserved' in the read-only Expandable element.
Configuration:
An event handler is newly created and configured as shown to the right:
|
|
After the relevant company addresses have been synchronized, the company fields in the relevant attributes can now be deleted:
|
|