Configuring Ahgora as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Ahgora option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
Ahgora uses HTTP Basic authentication with a dedicated API integration user. This user must be linked to a Time Automation profile (Perfil de Automação de Ponto) with the API access permissions enabled — such as API Integração Batidas and the read permissions for the data you want to extract (employees, punches, leaves, schedules, and shifts). If you don’t have an integration user yet, ask your Ahgora administrator or TOTVS/Ahgora support to provision one. Back in Nekt, provide:- Username: the username of the Ahgora API integration user.
- Password: the password of the Ahgora API integration user.
- Start Date: the earliest date to sync punches and leaves from. When not set, it defaults to January 1st, 2024.
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
3. Configure data streams
Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
- Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
- Incremental: every time the extraction happens, we’ll get only the new data - which is good if, for example, you want to keep every record ever fetched.
- Full table: every time the extraction happens, we’ll get the current state of the data - which is good if, for example, you don’t want to have deleted data in your catalog.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Once you are ready, click Next to finalize the setup.5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Streams and Fields
Available streams
Fields holding nested structures (for example
financial_data and job_title_history on employees) are delivered as JSON strings. Parse them downstream (for example in a Query) when you need the individual attributes.Fields by stream
Below you’ll find all available data streams from Ahgora and their corresponding fields:employees
employees
All employees registered in the Ahgora account. Sync: Full table. Primary key:
register.register- Employee’s unique registration number (matrícula)name- Full name of the employeepis- PIS numbercpf- CPF numberrg- RG (identity document) numberemail- Email addressphone_number- Phone numbergender- Genderbirth_date- Birth datehire_date- Hire datetermination_date- Termination date, if applicablelocation- Location path within the company structurework_permit- Work permit (CTPS)job_title- Current job titledepartment- Departmentcost_center- Cost centerwork_regime- Work regimeinternal_code- Internal code in the company’s systemsleadership_register- Registration number of the direct leaderleadership_name- Name of the direct leaderleadership_email- Email of the direct leaderworkload- Contractual workloadschedule_type- Type of work schedulebranch_office_index- Index of the branch officebranch_office_history- History of branch offices (JSON string)financial_data- Financial data such as monthly workload, hour cost, additionals and benefits (JSON string)job_title_history- History of job titles (JSON string)uses_punch_collector- Whether the employee punches on a physical collector (REP)uses_online_punch- Whether the employee uses the online punchuses_mobile_punch- Whether the employee uses the mobile app punchuses_time_sheet- Whether the employee uses the timesheet productuses_smartgate- Whether the employee uses the Smartgate access control productuses_vacations- Whether the employee uses the vacations productuses_rostering- Whether the employee uses the rostering (escalas) product
punches
punches
Time punches (batidas de ponto) of all employees. Sync: Incremental on
punch_time, fetched in 30-day windows from the start date. Primary key: employee_id, punch_time.employee_id- Unique identifier of the employee who registered the punchemployee_pis- PIS number of the employeepunch_time- Date and time the punch was registered (incremental replication key)type- Type of the punch (e.g. MANUAL)serial_number- Serial number of the device where the punch was registereddevice_name- Name of the device where the punch was registeredlatitude- Latitude where the punch was registered, when availablelongitude- Longitude where the punch was registered, when availablereason- Reason associated with the punch, when availablepunches- Additional punch information returned by the API
leaves
leaves
Employee leaves (afastamentos). Sync: Incremental on
updated_at. Primary key: id.id- Unique identifier of the leaveemployee_registers- Registration numbers of the employees covered by the leavestart- Start date of the leaveend- End date of the leavereason- Description of the leave reasonreason_code- Code of the leave reasonblocks_employee_access- Whether the leave blocks the employee’s access during its periodignores_absence_payment- Whether absence payment is ignoredignores_dsr_discount- Whether the paid weekly rest (DSR) discount is ignoredignores_treatment_on_worked_hours- Whether treatments on worked hours are ignoredinternal_code- Internal code in the company’s systemsis_compensating_for_holiday- Whether the leave compensates for a holidaytreat_worked_hours_as- How worked hours during the leave are treatedupdated_at- Timestamp of the last update (incremental replication key)updated_by- User who last updated the leave
schedules
schedules
Work schedules (escalas) configured in the account. Sync: Full table. Primary key:
key.key- Unique identifier of the schedulename- Name of the scheduledescription- Description of the schedulecode- Code of the scheduleworkload- Workload of the scheduletype- Type of the schedule (e.g. SEMANAL)ignore_workload_and_schedule_type_from_employee- Whether the schedule ignores the workload and schedule type configured on the employeeshifts- Keys of the shifts that compose the schedulenegative_hours_monthly_tolerance- Monthly tolerance for negative hourspaid_weekly_rest- Paid weekly rest (DSR) configuration (JSON string)punch_on_leave_treatment- Treatment applied to punches registered while on leavepunch_on_nightly_leave_treatment- Treatment applied to punches registered while on nightly leavenightly_account_code- Account code used for nightly hours
shifts
shifts
Work shifts (turnos) configured in the account. Sync: Full table. Primary key:
key.key- Unique identifier of the shiftname- Name of the shiftdescription- Description of the shiftuses_rostering- Whether the shift is used in rostering (escalas)day_starts_at- Time at which the shift’s day startsstarts_on_previous_day- Whether the shift starts on the previous calendar dayoffice_hours- Expected office hours of the shifthas_no_office_hours- Whether the shift has no fixed office hoursflexible_break_hours- Flexible break hours of the shiftextra_hours- Extra hour thresholds configured for the shiftextra_office_hours_treatment- Treatment applied to extra hours worked within office hoursextra_hours_treatment- Treatment applied to extra hours workedextra_nightly_hours_treatment- Treatment applied to extra hours worked at nightuses_hours_compensation- Whether the shift uses an hours compensation bank (banco de horas)applies_factor_after_compensation- Whether the extra-hours factor is applied after compensationnegative_compensation_treatment- Treatment applied to negative compensated hourspositive_compensation_treatment- Treatment applied to positive compensated hoursnegative_compensation_tolerance- Tolerance for negative compensated hourspositive_compensation_tolerance- Tolerance for positive compensated hoursintershift_break_treatment- Treatment applied to breaks between shifts (interjornada)intrashift_break_treatment- Treatment applied to breaks within the shift (intrajornada)extra_intra_shift_breat_treatment- Treatment applied to extra breaks within the shiftin_itinere_entry_bonus- In itinere bonus applied at entryin_itinere_exit_bonus- In itinere bonus applied at exitpunch_on_leave_treatment- Treatment applied to punches registered while on leavepunch_on_nightly_leave_treatment- Treatment applied to punches registered while on nightly leaveperiods_treatments- Treatments applied to specific periods of the shift (JSON string)early_entry_tolerance- Tolerance for early entry puncheslate_entry_tolerance- Tolerance for late entry punchesearly_exit_tolerance- Tolerance for early exit puncheslate_exit_tolerance- Tolerance for late exit punches