Who it’s for: Administrators
Platform: Sense HR
Available on: Elite and Enterprise plans
Before you begin:
✔️ You have administrator permissions
✔️ You have collected all required payroll data for a single pay period, with consistent attendance records
✔️ Analyse with AMI is available in your Sense HR environment
Overview
You can combine Payroll Extract reports with Sense AI (AMI) to automate complex payroll calculations and produce consistent, payroll-ready summaries each pay period.
This works best as a multi-stage setup: first build a reliable Payroll Extract report, then refine and save an AMI prompt that reflects your organisation’s payroll rules.
⚠️ Known issue:
Leave requests that are still awaiting approval and fall within the selected payroll date range are currently treated as approved in Payroll Extract reports.
Before running payroll analysis, ensure all leave requests within the pay period have been reviewed and either approved or declined.
Additional report fields to identify pending leave requests are planned for release to address this behaviour.
Navigation paths:
Stage 1:
Sense HR dashboard > Reports > Payroll extract > Create
Stage 2 & 3:
Sense HR dashboard > Reports > Payroll extract > [Locate report] > More actions (...) > Analyse with AMI
Payroll extract report preparation
Stage 1: Prepare and save the payroll extract report
1. Create a Payroll Extract report that includes all data payroll needs to calculate pay accurately for a single pay period.
This typically includes:
Pay details, ensuring the effective date reflects the relevant pay period
Working time and attendance data, such as worked duration, overtime, and anomalies
Key filtering data, such as department or contract type, to support group-specific payroll summaries
Event and entitlement data, including holiday, sickness, TOIL, and other time-off types
Employee identifiers, such as employee ID and NI number
Any additional pay elements, such as benefits, allowances, or premiums
Once you’ve selected the fields you need for the report, click Next to generate a draft.
🖊️ Note: You can add or remove fields later if needed.
2. Filter the report to include only employees who should be paid for the period.
In the Status filter, select Active and Future leavers.
Do not include Leavers or Future starters, as these employees should not be included in payroll calculations.
In the Date filter, select the payroll period you are running.
You can choose a preset range (for example, Last month) or enter exact from and to dates.
These filters ensure the payroll analysis is limited to the correct employees and dates.
3. Apply any additional filters required for your payroll rules.
For example, you might filter by department for a department specific report, where overtime rules apply only to warehouse staff, or filter by contract type for a specific payroll run.
🖊️ Note:
The exact fields and filters required depend on your company's configuration, licensed products, and payroll summary requirements.
💡 Tip: On the draft report, you can use Add fields to adjust your field selection at any time, adding missing fields or removing ones you don’t need.
4. Once the report accurately reflects everything payroll needs:
Save the report with a clear, reusable name.
For example: Payroll Extract Data (Monthly)
🖊️ Note:
This saved report becomes the data source for all Analyse with AMI activity. Any missing or incorrect data here will affect the payroll output.
Generating a reusable payroll summary prompt
Stage 2: Analyse the report with AMI and refine your payroll rules
From the saved Payroll Extract report:
1. Open the report.
2. Select More actions (…) > Analyse with AMI
🖊️ Note:
When you open Analyse with AMI, a default prompt is already in place to generate an initial summary of the report data.
3. Use natural language to explain what you want AMI to produce.
You can speak to AMI conversationally. For example:
“Can you create a clean weekly payroll summary for the employees in this report?”
AMI generates an initial output based on the data in the report. You can then refine the prompt step by step.
💡 Tip:
Build your reusable prompt incrementally rather than adding all rules at once. Adding one instruction at a time makes it easier to see the effect of each change, confirm the output is correct, and adjust or remove a rule if the result is not what you expected. This approach reduces errors and makes troubleshooting much simpler.
Examples of refinements include:
Introducing company-specific rules
“Can we refine this to apply our overtime rules?”
Clarifying how overtime works
“Overtime only applies after 15 minutes beyond shift end and is only paid at the end of a shift. Early starts do not count as overtime.”
Adjusting sickness or holiday handling
“Sickness should be shown separately and labelled as statutory sick pay or company sick pay where available.”
Designing payroll-ready outputs
If your payroll process requires a specific file structure, you can instruct AMI to produce a fixed set of columns with defined headers. This is especially useful when uploading the output into external payroll software.
Example: “Can you format the output as a payroll-ready file with one row per employee and fixed columns for payroll ID, department, standard hours, overtime hours, sickness hours, and holiday hours, using these exact column headers?”
Applying detailed payroll rules
Analyse with AMI can apply detailed payroll rules, including standard pay calculations, overtime multipliers, and benefit payments or deductions. Where required, you can specify how values are capped, rounded, or excluded to match your payroll policies.Example: “Can you apply our payroll rules so that standard pay, overtime multipliers, and benefits are calculated correctly, with overtime paid at the correct rates, values capped where required, and any amounts rounded or excluded in line with our payroll policy?”
💡 Tip:
Sense AI (AMI) does not invent data. If something is unclear or missing from the report, AMI flags it instead of guessing. This helps surface report or payroll configuration issues early.
Worked example: generating a reusable payroll prompt
Use this worked example to see how Analyse with AMI creates a payroll extract file and how you can refine the output step by step.
1) Review the default AMI summary
When you open Analyse with AMI, it runs a default summary prompt against your report data and shows an initial result.
🖊️ Note:
The default summary is a starting point. You can replace it with your own prompt to generate a payroll-ready output.
2) Request a payroll extract file with specific columns
In the AMI chat box, enter a prompt like the one below:
“I want you to produce a payroll extract using this data.
I need an excel file with the following columns:
• Full name
• Employee ID
• Sum of ‘Net worked duration [h:mm]’
• Sum of ‘Overtime duration [h:mm] [Planner event summary]’
• Sum of ‘Sickness duration [h:mm]’
• Sum of ‘Maternity duration [h:mm]’
• Sum of ‘Paternity duration [h:mm]’
• Sum of ‘Holiday duration [h:mm]’”
AMI generates a downloadable Excel file with one row per employee and the requested columns.
3. Click the download link in the AMI response.
4. Open the downloaded Excel file to review the output.
3) Add a capping rule for core hours
If your payroll requires core hours to be capped, return to the AMI chat and add a follow-up prompt. For example:
“Further customisation. Sum of ‘Net worked duration [h:mm]’ should be capped at sum of ‘Schedule duration [h:mm]’.”
AMI generates an updated downloadable version of the same Excel file that applies the capping rule.
5. Download and open the updated file to confirm the capped values are shown as expected.
4) Add a rounding rule
If you need time values rounded for payroll processing, add another follow-up prompt. For example:
“Additional adjustment. Rounding rule: all values should be rounded to the nearest 15 minute increment.”
AMI generates another updated downloadable file with the rounding rule applied.
6. Download and open the file to confirm values are rounded consistently.
5) Freeze the header row
Freezing the header row keeps column headings visible while you scroll through large payroll extracts, which makes it easier to review and cross-check values.
Add a final prompt such as:
“Final adjustment. Freeze the header row.”
AMI generates the final downloadable version of the file.
7. Download and open the final file to confirm the header row remains visible when scrolling.
🖊️ Note:
Each prompt you enter refines the same output. This makes it easier to adjust rules and formatting until the payroll extract matches your requirements.
Saving the payroll summary prompt for reuse
Stage 3: Finalise and save a reusable AMI prompt
Once the output matches what your payroll team expects, ask AMI to generate the final reusable prompt.
For example:
“Can you give me the final prompt to recreate this payroll summary exactly, so I can save it for future payroll runs?”
Or, for a code version:
“Can you give me the code for this payroll summary exactly as it is now, so I can save it and reuse it for future payroll runs?” or simply "Show me the code to run the final payroll extract"
Then:
1. Scroll down and copy the final prompt provided by AMI.
2. Reopen the saved Payroll Extract report.
3. Click Next to skip field and filter selection.
⚠️ Caution:
Once you have generated the reusable prompt or code, take care not to remove any specifically referenced report fields.
4. Paste the new prompt into the Analyse with AMI prompt field, replacing the default prompt. Do not keep or append the original text.
5. Confirm the AMI Prompt for Analysis field now contains only your saved prompt, then select Save.
💡 Saving progress using the AMI code output
At any stage, you can ask AMI to show the code for the current payroll summary. This code represents the full set of instructions AMI is using. Saving it against the report allows you to pause setup, return later, or ensure the output is reproduced exactly each time.
For example: “Can you show me the code for this payroll summary so I can save it and continue refining it later?”
🖊️ Note:
The report is now configured with a reusable payroll analysis prompt that runs automatically each time you analyse the report with AMI.
Subsequent pay period reruns
Stage 4: Ongoing use each pay period
For each new pay period:
• Copy the saved Payroll Extract report (More actions (...) > Copy)
• Update the date filters or effective dates to match the current pay period
⚠️ Caution:
After generating and saving a reusable prompt or code, take care not to remove or rename any report fields that are specifically referenced in the saved instructions. The reusable analysis depends on those field names and totals to run correctly.
It is safe to update the payroll date filter for each pay period and to add additional fields if required. However, removing or altering referenced fields may cause the payroll extract to fail or produce incorrect results.
• Run Analyse with AMI
The saved prompt is reused automatically, producing a consistent payroll summary without rebuilding reports or rewriting rules.
💡 Tip:
The initial setup may take longer if your payroll rules are detailed. Once saved, the same report and prompt can be reused every pay period, reducing manual effort and improving consistency.
Choosing how to save your AMI prompt
When saving your payroll analysis, you can choose to save either a natural language prompt or the AMI code output. Both approaches are valid, and the right choice depends on how complex your payroll rules are and how the report will be reused.
Saving a natural language prompt
Saving a natural language prompt keeps the instructions easy to read and understand.
This approach works well when:
payroll rules are simple or descriptive
outputs are summaries rather than payroll import files
multiple administrators need to understand or adjust the instructions
the report is still evolving and likely to change
Natural language prompts make it easier for other administrators to see what the report is doing without needing to interpret technical detail.
Saving the AMI code output
Saving the AMI code output locks in the exact instructions AMI is using to generate the payroll summary.
This approach is recommended when:
payroll rules are detailed or complex
the output must be reproduced exactly each pay period
calculations include capping, rounding, exclusions, or multipliers
the report is used for payroll processing or external payroll uploads
The code ensures consistent results, supports pausing and resuming setup, and reduces the risk of unintended changes between payroll runs.
💡 Tip:
A common approach is to refine the output using natural language prompts, then save the AMI code once the payroll summary is correct and ready for reuse.
FAQS
Click here to see answers to frequently asked questions
Click here to see answers to frequently asked questions
Does Analyse with AMI change my payroll data?
No. Analyse with AMI does not change payroll data. It only reads data from the Payroll Extract report and generates a payroll summary without writing anything back to Sense HR.
What happens if required payroll data is missing from the report?
If required payroll data is missing from the report, Analyse with AMI flags the issue instead of guessing. This helps identify report configuration or payroll data gaps before payroll is processed.


















