Employment Hero Sync Engine
The data driven sync core that keeps Odoo and the Employment Hero people platform in step, idempotently and safely.
Store price is USD 98 all-in: installing this also pulls the 1 paid ERP Heritage module it depends on.
Why this module
Employment Hero Sync Engine
Re run without fear
Each record is keyed by its Employment Hero id through a cross reference that stores a payload hash and source timestamp. Re running never duplicates, and an unchanged record is skipped instead of rewritten.
Mapping is data, not code
Dotted source paths map to Odoo fields through a registry of reviewed transformers. No arbitrary code is stored or evaluated, and mappings can vary by company and country.
One bad record cannot stop a run
A savepoint per record isolates failures so the rest of the batch still commits. The run ends partial, the failed record is logged on its own line, and the delta cursor holds so it is re fetched next time.
Day in the life
A scheduled employee sync, the morning after a mapping change
Overnight the scheduled cron runs every job marked for it. The employee job pulls in delta mode, asking Employment Hero only for records changed since the last run. Yesterday a mapping line was edited, so the mapping fingerprint folded into each payload hash has changed and existing employees are rewritten with the new field rather than wrongly skipped as unchanged. One record carries a value the value map does not cover, so its line raises, that single record is isolated and marked failed, and the run ends partial. The delta cursor advances only to the latest success strictly before that failure, so the failed record is re fetched next run instead of being lost. You open the run, read the per record lines, fix the mapping default, and re run. This time it is clean and done.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
A repeated delivery for the same record is a no op: the cross reference already holds the matching payload hash, so the engine skips it rather than writing again.
A targeted, webhook driven sync is forced to newest wins. A delivery older than the record already in Odoo is skipped, and one with no usable source timestamp is not allowed to overwrite.
A failing record is wrapped in its own savepoint, so an integrity error rolls back just that record and the rest of the batch still commits. The run ends partial.
The delta cursor advances only to the highest success strictly before the earliest failure, and holds entirely when a failure has no timestamp, so a failed or concurrently changed record is always re fetched.
Each push write carries a stable idempotency key, constant per record for a create and keyed by payload hash for an update, so a retried write is deduplicated rather than duplicated upstream.
A push whose outbound payload is byte for byte identical to the last successful push is skipped, so a both way job does not re send every record every run.
A delete signal archives the linked record when the model supports archiving, otherwise unlinks it, isolating a delete blocked by a foreign key so the record is kept and reported rather than failing forever.
A display mask such as an asterisked tax number, or a key unavailable placeholder, is never pushed back out, so a local display value cannot overwrite the real identifier upstream.
Relation lookups by external id are scoped to the current connection, so two connections holding the same external id never cross bind to each other's record.
If a cross reference points at an Odoo record that was deleted, the stale link is cleared and the record is recreated cleanly on the next pull.
What is inside
Built to do the job, end to end.
- External id cross reference. A dedicated model stores, per connection, the Employment Hero id, source last modified timestamp, inbound payload hash and outbound push hash for every synced record. Uniqueness on both the external id and the Odoo record makes lookups deterministic in both directions.
- Sync jobs. A job binds an endpoint, a mapping and a target model with the policy knobs: direction, full or delta mode, batch size, external id and timestamp paths, push domain and endpoints, conflict policy and push policy. Jobs run manually, on schedule or from a targeted single record trigger.
- Field mapping and transformers. Mappings and their lines map dotted source paths to Odoo fields through a registry of safe transformers: trim, number, boolean, date, datetime, value map, country and currency codes, relation by field, relation by external id and nested sub lines. Lines can be pull only, push only or both, with required, default and skip if empty controls.
- The orchestrator. One engine drives fetch, map, resolve, apply policy, create or update, record a line and advance the cursor. It handles paginated pulls, targeted single record pulls, reverse mapped pushes and upstream deletes, with per record savepoints throughout.
- Audited runs and lines. Every run records its trigger, timing and counts of fetched, created, updated, skipped, deleted and failed records, plus a per record line history with the operation and any message, so you can see exactly what each sync did without spamming record chatter.
- Scheduled sync cron. A daily scheduled cron runs every job flagged for it, honouring a master enable switch in configuration, and logs job level failures without aborting the other jobs in the batch.
Honest about the edges
What this does not do, so nothing surprises you.
- This is the shared sync engine. It does not ship ready made jobs or mappings for any specific resource on its own; the Employment Hero domain modules in the suite supply those and configure the engine.
- Authentication, request retry, exponential backoff, rate limiting and pagination are provided by the connector module this depends on, not implemented here.
- The HTTP webhook receiver, signature verification and replay protection are not part of this module. The engine provides the targeted single record execution path that a webhook delivery routes into, but receiving and validating the webhook is handled elsewhere in the suite.
- There is no in database job queue or dead letter store in this module; jobs run synchronously when triggered manually, from the scheduled cron or from a targeted call.
- Conflict resolution is policy based by timestamp and payload hash, not a field level three way merge. The chosen side wins for the whole record.
- The number transformer deliberately refuses ambiguous grouped numbers rather than guess a decimal separator, so a payload using grouped formats must be normalised at the source or handled with a custom transformer.
- Transformers are a reviewed registry. Adding a new one is a small Python change, by design, since no arbitrary code is stored or evaluated.
- Built and tested on Odoo 17 Community.
Employment Hero Odoo sync, Odoo 17 integration engine, idempotent synchronisation Odoo, external id cross reference, configurable field mapping Odoo, delta sync Odoo, conflict resolution sync, push to API Odoo, two way sync framework, HR data integration Odoo, audited sync runs, KeyPay payroll sync Odoo
Need this fitted to the way you work?
ERP Heritage delivers end to end Odoo work: Odoo Implementation, Customization and Development, Integration, Migration, Consultation, Support and Training. We help teams put this module into production, shape it to their process, and keep it running.
We work with businesses across Australia (Melbourne, Sydney, Brisbane, Perth, Adelaide, Canberra) and the Middle East (Dubai, Abu Dhabi, Riyadh, Jeddah, Doha, Kuwait City, Muscat). Start a conversation at erpheritage.com.au or email info@erpheritage.com.au.
Languages
Available in 19 languages
The interface ships translated out of the box. Switch language in Odoo and the fields, menus, and messages follow.
Modules teams pair with this one.
Premium ERP Heritage modules that extend the same stack, each built to the same engineering bar.
A dependency free asynchronous job queue that runs long running and fan out work out of band of the request that...
The Australia country pack for the ERP Heritage Employment Hero integration
Sync certifications, qualifications and employee document metadata from the Employment Hero people platform into...
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Community Apps Dependencies | Show |
| Lines of code | 3544 |
| Technical Name |
eh_hero_sync |
| License | OPL-1 |
| Website | https://www.erpheritage.com.au/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module