Quick Start Guide #
Welcome to FormulaX, your AI-powered tool for generating, explaining, and optimizing Oracle Fast Formula in HCM and Payroll. This guide is for HCM administrators, consultants, and developers who want to accelerate formula creation with reliable, context-aware AI support.
1. Generate Fast Formula #
- Log in to FormulaX
- Navigate to Generate Formula
- Select formula type and LDG if required
- Enter your requirements as a clear prompt.
- See below for an example
- Tip: Use specific details for context (e.g., payroll element names, LDG, DBIs).
- Generate and review the formula
- Click Copy formula to copy the formula ready to paste directly into Oracle Cloud HCM
- Click Save as Formula to save the formula and be able to reference and modify it
2. Explain Formula #
- Log in to FormulaX
- Navigate to Explain Formula
- Paste any Fast Formula code, and FormulaX will generate a plain-English explanation.
- Useful for onboarding, knowledge sharing, and validation.
- Click Explain Formula
- Your formula will be explained section by section. If your formula is very large it will be split into multiple sections.
3. Prompt Writing Guide #
Tips for Writing Effective Prompts #
✅ DO: #
- Specify target module (Payroll/Absence, etc.)
- State rules and exceptions (e.g., overtime thresholds, holiday exclusion)
- Reference Oracle terms (LDG, DBI, input values)
- Be specific about inputs, outputs, and calculation steps
- Include edge cases and validation requirements
- Specify data types (number, text, date)
- Define business rules clearly with examples
- Mention Oracle-specific functions if needed (GET_CONTEXT, DAYS_BETWEEN, TRUNC, ROUND)
- Request inline comments for complex formulas
- Specify rounding precision for currency amounts
❌ DON’T: #
- Assume the AI knows your organization’s specific business rules
- Use vague language (“calculate pay”)
- Skip rules or context
- Request multiple unrelated formulas in a single prompt
- Forget to specify default values for optional inputs
- Omit error handling requirements
- Leave date formats ambiguous
- Skip validation logic for user inputs
When asking the AI to generate or optimise a Fast Formula, try to cover these items explicitly:
- Business scenario
- What process is this for? (Payroll, Absence, Benefits, Time & Labor, Pensions, etc.)
- One sentence in plain English: “Calculate overtime premium for UK hourly workers.”
- Formula type & Oracle context
- Formula type (e.g. Oracle Payroll, Element, Absence, Time Calculation).
- Any legislation which applies: “UK payroll, PAYE rules apply.”
- If relevant: legislative data group, payroll, element name(s).
- Inputs & data items
- Input values (with data types): “regular_hours (number), overtime_hours (number), hourly_rate (number)”.
- Key DBIs or contexts you expect to use (if you know them otherwise it will work out the appropriate ones to use): “ASSIGNMENT_ID, PAYROLL_REL_ACTION_ID, assignment grade, element entry value ‘Overtime Rate’.”
- Business rules / logic
- Tell the AI any business specific rules for your organization
- Step-by-step rules in business language:
- thresholds (e.g. “Only pay overtime above 37.5 hours per week.”)
- rates and caps (e.g. “1.5x for first 10 hours, 2x above that; cap at £300 per period.”)
- rounding, minimum/maximum values, treatment of negative values, any specific decimal place rules etc.
- Outputs
- What the formula must return and in what type:
- e.g. “Return an amount called OVERTIME_PAY and a message text if the result is capped.”
- Whether it’s a skip formula, validation formula, or returns multiple values.
- What the formula must return and in what type:
- Edge cases and assumptions
- Include any edge cases to be considered or catered for, or you can ask the AI to do the thinking for you based on our best practices.
4. Example Prompts: #
Overtime Pay Calculation #
Good Prompt:
Create a formula that calculates overtime pay at 1.5x the regular rate for hours worked beyond 40 hours per week.
INPUTS:
- hours_worked (number): Total hours worked in the week
- hourly_rate (number): Employee's regular hourly rate
CALCULATION:
- Standard hours threshold: 40 hours per week
- Overtime rate: 1.5 times the regular rate
- If hours worked ≤ 40, no overtime
- If hours worked > 40, calculate overtime pay for excess hours
OUTPUT:
- l_overtime_pay (number): Total overtime payment amount
Poor Prompt:
“Formula for overtime.”
5. FAQ #
Some common questions:
- How accurate are AI-generated formulas?
- FormulaX uses Oracle best practices, but always test in your environment.
- Can I edit AI-generated Fast Formulas? Yes you can refine and edit formulas by continuing the conversation in the AI chat
- What Oracle versions are supported? FormulaX is optimised for Oracle Cloud HCM 25d, but supports earlier versions
- What if my formula is very large or fails validation? Break into smaller prompts and test iteratively.
- Can I track history of formulas? Formula history is available for saved formulas via the My Formulas section.
Need more help?
See FormulaX Documentation Home or contact MKSK Consulting Support.