Cegid Loop - Synchronization system "sink"
Introduction
Cegid Loop provides its customers and partners with a system called "sink" for synchronizing accounting data to any third-party software.
What is a sink ?
In the context of data processing, a "sink" refers to a destination or endpoint where data is collected, stored, or otherwise directed to. It is a component of a data flow system that represents the final destination of data after it has been processed or transmitted through various stages.
Supported destinations
Cegid Loop supports 2 different types of destinations :
Start using our sink
To start using the sink, you need to go through the following steps:
- Subscribe to a storage among supported destinations
- Sink access is ruled by sink subscriptions. Our sink subscription management APIs allow you to create a subscription, setup your storage's information, add or remove accounting files. See complete documentation for more details.
Synchronized accounting data
Every change (insertion, update, deletion) over following business objects are tracked by events, and pushed to storages under a file format.
Description | Insert event | Update event | Delete event |
---|---|---|---|
Accounts (Comptes) |
comptaCompteInserted | comptaCompteUpdated | comptaCompteDeleted |
Bank accounts (Comptes bancaires) |
comptaCompteBancaireInserted | comptaCompteBancaireUpdated | comptaCompteBancaireDeleted |
Accounting entries (Écritures comptables) |
comptaEcritureInserted | comptaEcritureDeleted + comptaEcritureInserted |
comptaEcritureDeleted |
Journals (Journaux) |
comptaJournalInserted | comptaJournalUpdated | comptaJournalDeleted |
Accounting parameters (Paramètres comptables) |
comptaParametreInserted | comptaParametreUpdated | comptaParametreDeleted |
Accounting periods (Périodes comptables) |
comptaPeriodeInserted | comptaPeriodeUpdated | comptaPeriodeDeleted |
Analytical sections (Sections analytiques) |
comptaSectionInserted | comptaSectionUpdated | comptaSectionDeleted |
Third-parties (Tiers) |
comptaTiersInserted | comptaTiersUpdated | comptaTiersDeleted |
VAT parameters (Paramètres de TVA) |
comptaTvaInserted | comptaTvaUpdated | comptaTvaDeleted |
Branches (Etablissements) |
comptaEtablissementInserted | comptaEtablissementUpdated | comptaEtablissementDeleted |
Initialization
Initialized Periods
The following periods are initialized:
• Opened exercises: Periods that are currently active and open for reporting.
• Most Recent Closed Exercise: The most recent period that has been closed.
Types of Periods
When creating a new period, you can specify the type as either "exercise" or "situation":
• Exercise: Refers to a complete accounting period, typically one year.
• Situation: A snapshot or status report of the company's financial situation for a specific date or period.
Data Synchronization Rules
During data synchronization, the following rules apply:
• Newly created exercises are included in the synchronization process, ensuring that all relevant periods: opened, newly created, and the most recent closed ones are accounted for.
• Whatever the number of exercises, it synchronizes the records of all the situations that are in the initialized exercises.
• All the entries of initialized periods ( exercices and situations) are sent.
• Entries from old closed exercises are excluded from synchronization.
Example Scenarios:
Scenario 1: Initialized Exercises:
Exercice 01/01/2024 - 31/12/2024 (Open)
Exercice 01/01/2023 - 31/12/2023 (Closed)
Exercice 01/01/2022 - 31/12/2022 (Closed)
Data to be Sent:
-Entries of all situations in between 01/01/2023 and 31/12/2024 are sent.
-Any ecriture ( bilan or situation ) in 2022 will not be sent.
Scenario 2: Initialized Exercises:
Exercice 01/01/2021 - 31/12/2021 (Closed)
Exercice 01/01/2022 - 31/12/2022 (Closed)
Exercice 01/01/2023 - 31/12/2023 (Open)
Exercice 01/01/2024 - 31/12/2024 (Open)
Data to be Sent:
-Entries of all situations in between 01/01/2022 and 31/12/2024 are sent.
-A situation in 2021 will not be sent
See following link : Sink subscription
Daily report
See following link : Sink report
Initialization report
Introduction:
At the end of the initialization process, a file will be generated to document the number of records processed for each schema. This file will be saved in the corresponding directory of the sink and will be named with a timestamp to indicate when the process was completed. For example, the file will be named initialisation-report-date.
Important fields of the File:
schemaName: The name of the schema.
count: The number of records processed for the schema.
entite_id: ID of the concerned entity.
Example:
Here is a sample of what the file content should look like:
{
"0": {
"schema": "comptaJournalInserted",
"count": 3
},
"1": {
"schema": "comptaTvaInserted",
"count": 0
},
"2": {
"schema": "comptaEtablissementInserted",
"count": 1
},
"3": {
"schema": "comptaCompteInserted",
"count": 817
},
"4": {
"schema": "comptaSectionInserted",
"count": 1
},
"5": {
"schema": "comptaPeriodeInserted",
"count": 1
},
"6": {
"schema": "comptaTiersInserted",
"count": 1
},
"7": {
"schema": "comptaTiersInserted",
"count": 1
},
"8": {
"schema": "comptaTiersInserted",
"count": 0
},
"9": {
"schema": "comptaTiersInserted",
"count": 1
},
"10": {
"schema": "comptaParametreUpdated",
"count": 1
},
"11": {
"schema": "comptaEcritureInserted",
"count": 14
},
"12": {
"schema": "comptaCompteBancaireInserted",
"count": 0
},
"13": {
"schema": "comptaReconciliationInserted",
"count": 0
},
"entite_id": "ae9c6905-0035-4ce6-9d27-2c26b317035e"
}
Timestamp
The timestamp included in the file name indicates the time when the file was produced
while the one inside the file indicates the time when the data changed in loop the timestamp format is ISO
You can convert timestamp to ISO format using an online converter
Example of file name :
- Insert events
queuing.cpa.comptabilite-fr.cegid.loop.comptaCompteInserted-1656233-2024-01-30T15:17:20.186Z.json
- Update events
queuing.cpa.comptabilite-fr.cegid.loop.comptaCompteUpdated-1656234-2024-01-30T15:17:57.128Z.json
- Delete events
queuing.cpa.comptabilite-fr.cegid.loop.comptaCompteUpdated-1656234-2024-01-30T15:17:57.128Z.json
Example of tampStamp in file
timestamp 1706627839000
application_id "1999353e-52d1-4598-b76e-6fcbd15620fe"
entite_id "a1ee3b15-24ef-45a5-8ff2-2b1f45440c7c"
id "0cee37db-1ca8-4073-84a3-547795567fa9"
numero "56870000"
libelle "56870000"
collectif false
lettrable false
pointable false
centralisable false
analytique false
ferme false
compteContrepartie_id null
compteBanque_id null
tva_id null
type 1
ventilationDefaut null
Conversion :
1706627839000 = 30/01/2024 - 17:18:28