Organization Synchronization
This section describes organization synchronization.
Organization synchronization
Description
The organizations reflect the structure and organization of the company. Each legal entity (headquarters, store, subsidiary, agency, etc.) and each functional unit of the company may be defined via synchronization.
Each employee is attached to one or more organizations. Each manager (Document Manager user profile or People Assist user profile) is assigned a restricted access perimeter based on this organization tree.
Import file
Format
The synchronization of organizations is done via importing a UTF-8-encoded CSV file. Imports can be done manually via the administration web interface, or automatically using SFTP.
Organization imports can be:
- incremental: Only new and updated organizations are included in the CSV file. New organizations are created; existing ones mentioned in the file are updated; organizations not mentioned are left unchanged.
- complete: All organizations are listed in the CSV file. New organizations are created, and existing ones are updated only if changes are detected.
Note
Text values can be single-quoted (') if you need to include the delimiter character (;) in your text. Escape apostrophes by doubling them; e.g., use 'John''s ID' to represent John's ID.
Structure
The first row of the CSV file must include all attributes in the order described below (the values can still be optional):
organization_code(VARCHAR(64)) — mandatory: Must be unique across the organization tree.name(VARCHAR(255)) — mandatory: Name used in the interface.parent_organization_code(VARCHAR(64)) — mandatory or optional: Code of the parent organization to define hierarchy. Leave blank for primary-level organizations.description(VARCHAR(255)) — optional: Displayed in the administration interface.company_name(VARCHAR(50)) — optional: Legal name; mandatory when printed packages are delivered.firstname(VARCHAR(50)) — optional: Contact’s first name; mandatory for printed deliveries.lastname(VARCHAR(70)) — optional: Contact’s last name; mandatory for printed deliveries.address1(VARCHAR(250)) — optional: Contact address; mandatory for printed deliveries.address2(VARCHAR(250)) — optional: Additional address info for printed deliveries.zip_code(VARCHAR(10)) — optional: ZIP code; mandatory for printed deliveries.city(VARCHAR(50)) — optional: City; mandatory when delivering printed packages.country_code(VARCHAR(2)) — optional: ISO country code (e.g., FR, EN, ES); mandatory when delivering printed packages.phone_number(VARCHAR(50)) — optional: Contact phone number in international format (e.g.,0018002251561); used for printed deliveries.email(VARCHAR(70)) — optional: Contact email; used for printed deliveries.
Example of a complete CSV file
'Org code';'Name';'Parent code (empty if primary)';'Description';'Company name';'First name';'Last name';'Address 1';'Adress 2';'ZIP code';'City';'Country code';'Phone';'Email'
'X00001';'JS Corporation';;'Description of the primary company A';'JS Corp';'John';'Smith';'277 Wellington Street West';'Suite 801';'M5V3E4';'Toronto';'CA';'4168618530';'[email protected]'
'X0000A';'A';'X00001';;;;;;;;;;;
'X0000B';'B';'X0000A';;;;;;;;;;;
'X0000Aa';'Aa';'X0000A';;;;;;;;;;;
'X0000Aa1';'Aa1';'X0000Aa';;;;;;;;;;;
'X0000Aa2';'Aa2';'X0000Aa';;;;;;;;;;;
'X0000Ba';'Ba';'X0000B';;;;;;;;;;;
Warning: You must customize the sample values before importing this file into your platform.
Report file
For each import, a report file is generated. It can be downloaded from the interface or retrieved via SFTP.
Format
Report files are produced in XML and include:
JOB_REFERENCE: Internal processing reference (filename of the import on HRS).JOB_REPORT_TIMESTAMP: ISO timestamp when the report was generated.JOB_DESCRIPTION: Import title.JOB_TYPE:sir(for organization import report).COUNT_ROWS: Total number of lines processed.MESSAGE: Feedback per line, containing:ENTITY_ID: Organization code from the input.ENTITY_TYPE: Always “Organization” here.RESULT_CODE:0= created,1= updated, any other value = error.RESULT_MESSAGE: Description of the performed action or error encountered.
Example
<ORGANIZATION_REPORT version="1.0">
<JOB_REFERENCE>cmpjTABvS.csv</JOB_REFERENCE>
<JOB_REPORT_TIMESTAMP>2021-03-19T13:05:50.648461+00:00</JOB_REPORT_TIMESTAMP>
<JOB_DESCRIPTION>Organization import DEMO</JOB_DESCRIPTION>
<JOB_TYPE>sir</JOB_TYPE>
<COUNT_ROWS>3</COUNT_ROWS>
<MESSAGE ENTITY_NAME="Novapost Ref">
<ENTITY_ID>sub-sub-org</ENTITY_ID>
<ENTITY_TYPE>Organization</ENTITY_TYPE>
<RESULT_CODE>0</RESULT_CODE>
<RESULT_MESSAGE>Organization Created</RESULT_MESSAGE>
</MESSAGE>
<MESSAGE ENTITY_NAME="Novapost Ref">
<ENTITY_ID>sub-org</ENTITY_ID>
<ENTITY_TYPE>Organization</ENTITY_TYPE>
<RESULT_CODE>0</RESULT_CODE>
<RESULT_MESSAGE>Organization Created</RESULT_MESSAGE>
</MESSAGE>
<MESSAGE ENTITY_NAME="Novapost Ref">
<ENTITY_ID>org</ENTITY_ID>
<ENTITY_TYPE>Organization</ENTITY_TYPE>
<RESULT_CODE>0</RESULT_CODE>
<RESULT_MESSAGE>Organization Created</RESULT_MESSAGE>
</MESSAGE>
</ORGANIZATION_REPORT>
Updated 3 months ago