Auto Enrolment

In the below demonstration you will learn how to add employer auto enrolment details, configure an auto enrolment compatible pension scheme and examine an auto enrolment assessment.

This example will use [GET], [POST], [PUT] and [PATCH] requests sent to the PayRun.io API.

For more details on the Auto Enrolment implementation within PayRun.io see the Auto Enrolment help page.

Step 1 - Creating the Employer

In this step we create an employer data object including the required auto enrolment settings.

curl -X POST \
  'https://api.test.payrun.io/Employers' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<Employer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EffectiveDate>2017-04-01</EffectiveDate>
    <Revision>0</Revision>
    <Name>AE Test Ltd</Name>
    <Region>NotSet</Region>
    <Territory>UnitedKingdom</Territory>
    <RuleExclusions>None</RuleExclusions>
    <AutoEnrolment>
        <StagingDate>2014-04-01</StagingDate>
        <PostponementDate xsi:nil="true" />
        <ReEnrolmentDayOffset xsi:nil="true" />
        <ReEnrolmentMonthOffset xsi:nil="true" />
        <PrimaryFirstName>Terry</PrimaryFirstName>
        <PrimaryLastName>Tester</PrimaryLastName>
        <PrimaryEmail>Terry.Tester@PayRun.io</PrimaryEmail>
        <PrimaryTelephone>0123456789</PrimaryTelephone>
        <PrimaryJobTitle>HR Manager</PrimaryJobTitle>
    </AutoEnrolment>
</Employer>'
curl -X POST \
  'https://api.test.payrun.io/Employers' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
    "Employer": {
        "EffectiveDate": "2017-04-01",
        "Revision": "0",
        "Name": "AE Test Ltd",
        "Region": "NotSet",
        "Territory": "UnitedKingdom",
        "RuleExclusions": "None",
        "AutoEnrolment": {
            "StagingDate": "2017-04-01",
            "PostponementDate": null,
            "ReEnrolmentDayOffset": "0",
            "ReEnrolmentMonthOffset": "0",
            "PrimaryFirstName": "Terry",
            "PrimaryLastName": "Tester",
            "PrimaryEmail": "Terry.Tester@PayRun.io",
            "PrimaryTelephone": "0123456789",
            "PrimaryJobTitle": "HR Manager"
        }
    }
}'

Step 2 - Create Auto Enrolment Pension Scheme

In this step we will create a new auto enrolment pension scheme definition for the employer.

In this example, the resource location is explicitly specified as "/Employer/ER001/Pension/AEPENSION" using the [PUT] verb. This is only an example, AEPENSION isn't required for AE pensions. You can use [POST] to get an automatically generated resource locations.

By default; pensions receive unique keys prefixed with "PENSCH".

curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/Pension/AEPENSION' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<Pension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EffectiveDate>2017-04-01</EffectiveDate>
    <Revision>0</Revision>
    <SchemeName>AE Scheme</SchemeName>
    <ProviderName>NEST</ProviderName>
    <ProviderEmployerRef>ER Ref XX1</ProviderEmployerRef>
    <EmployeeContributionPercent>0.0100</EmployeeContributionPercent>
    <EmployerContributionPercent>0.0100</EmployerContributionPercent>
    <TaxationMethod>ReliefAtSource</TaxationMethod>
    <SalarySacrifice>false</SalarySacrifice>
    <ProRataMethod>NotSet</ProRataMethod>
    <AECompatible>true</AECompatible>
    <UseAEThresholds>true</UseAEThresholds>
    <PensionablePayCodes>
        <PayCode>BASIC</PayCode>
    </PensionablePayCodes>
    <QualifyingPayCodes>
        <PayCode>BASIC</PayCode>
    </QualifyingPayCodes>
</Pension>'
curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/Pension/AEPENSION' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
    "Pension": {
        "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
        "EffectiveDate": "2017-04-01",
        "Revision": "0",
        "SchemeName": "AE Scheme",
        "ProviderName": "NEST",
        "ProviderEmployerRef": "ER Ref XX1",
        "EmployeeContributionPercent": "0.0100",
        "EmployerContributionPercent": "0.0100",
        "TaxationMethod": "ReliefAtSource",
        "SalarySacrifice": "false",
        "ProRataMethod": "NotSet",
        "AECompatible": "true",
        "UseAEThresholds": "true",
        "PensionablePayCodes": {
            "PayCode": [
                "BASIC"
            ]
        },
        "QualifyingPayCodes": {
            "PayCode": [
                "BASIC"
            ]
        }
    }
}'

Step 3 - Update Employer Auto Enrolment Pension Scheme

The following example demonstrates updating the employer auto enrolment settings to indicate that the pension created in step 2 is to be used for auto enrolment.

curl -X PATCH \
  'https://api.test.payrun.io/Employer/ER001' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<Employer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EffectiveDate>2017-04-01</EffectiveDate>
    <AutoEnrolment>
        <Pension href="/Employer/ER001/Pension/AEPENSION" />
    </AutoEnrolment>
</Employer>'
curl -X PATCH \
  'https://api.test.payrun.io/Employer/ER001' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
    "Employer": {
        "EffectiveDate": "2017-04-06",
        "AutoEnrolment": {
            "Pension": 
            {
                "@href": "/Employer/ER001/Pension/AEPENSION"
            }
        }
    }
}'

Step 4 - Create a Pay Schedule

Here we create a monthly pay schedule for the employees.

curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/PaySchedule/MONTHLY' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<PaySchedule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name>My Monthly</Name>
  <PayFrequency>Monthly</PayFrequency>
</PaySchedule>'
curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/PaySchedule/MONTHLY' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "PaySchedule": {
    "Name": "My Monthly",
    "PayFrequency": "Monthly"
  }
}'

Step 5 - Insert an Employee

In this step, we add a new employee who will be assessed for auto enrolment in the next pay run calculation.

curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/Employees' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<Employee xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EffectiveDate>2017-04-01</EffectiveDate>
    <Revision>0</Revision>
    <Code>EMPAE1</Code>
    <FirstName>Jane</FirstName>
    <LastName>Johnson</LastName>
    <DateOfBirth>1990-12-10</DateOfBirth>
    <Gender>Female</Gender>
    <NicLiability>IsFullyLiable</NicLiability>
    <Region>England</Region>
    <Territory>UnitedKingdom</Territory>
    <WorkingWeek>AllWeekDays</WorkingWeek>
    <HoursPerWeek>37.5</HoursPerWeek>
    <RuleExclusions>None</RuleExclusions>
    <PaySchedule href="/Employer/ER001/PaySchedule/MONTHLY" />
    <StartDate>2013-04-01</StartDate>
    <AEAssessmentOverride>None</AEAssessmentOverride>
    <AEAssessmentOverrideDate xsi:nil="true" />
    <AEPostponementDate xsi:nil="true" />
</Employee>'
curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/Employees' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
    "Employee": {
        "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
        "EffectiveDate": "2017-04-06",
        "Revision": "0",
        "Code": "EMPAE2",
        "FirstName": "Jane",
        "LastName": "Johnson",
        "DateOfBirth": "1990-12-10",
        "Gender": "Female",
        "NicLiability": "IsFullyLiable",
        "Region": "England",
        "Territory": "UnitedKingdom",
        "WorkingWeek": "AllWeekDays",
        "HoursPerWeek": "37.5",
        "RuleExclusions": "None",
        "PaySchedule": {
            "@href": "/Employer/ER001/PaySchedule/MONTHLY"
        },
        "StartDate": "2013-04-01",
        "AEAssessmentOverride": "None",
        "AEAssessmentOverrideDate": null,
        "AEPostponementDate": null
    }
}'

Step 6 - Pay the Employee

In this step we add a new pay instruction for the employee. Pay instructions are used to tell the system that a payment is needed. In this example we instruct the system to pay our employee 160 hours at £13.56 per hour.

curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/PayInstructions' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<RatePayInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <StartDate>2017-05-01</StartDate>
    <EndDate>2017-05-31</EndDate>
    <Rate>13.56</Rate>
    <RateUoM>Hour</RateUoM>
    <Units>160</Units>
</RatePayInstruction>'
curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/PayInstructions' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
    "RatePayInstruction": {
        "StartDate": "2017-05-01",
        "EndDate": "2017-05-31",
        "Rate": "13.56",
        "RateUoM": "Hour",
        "Units": "160"
    }
}
'

Step 7 - Enqueue Pay Run Job

Now that all the data has been entered into the system, we are able to start performing pay run calculations. Pay run calculations are handled by background jobs. So we need to enqueue a pay run job and then wait for it to finish.

Waiting for job completion

Successfully inserting a pay run job results in a link response. You can monitor the progress of the job by requesting the URL end point indicated in the link response.

curl -X POST \
  'https://api.test.payrun.io/jobs/payruns' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<PayRunJobInstruction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <HoldingDate xsi:nil="true" />
  <PaymentDate>2017-05-31</PaymentDate>
  <StartDate>2017-05-01</StartDate>
  <EndDate>2017-05-31</EndDate>
  <PaySchedule href="/Employer/ER001/PaySchedule/MONTHLY" />
  <IsSupplementary>false</IsSupplementary>
</PayRunJobInstruction>'
curl -X POST \
  'https://api.test.payrun.io/jobs/payruns' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "PayRunJobInstruction": {
    "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
    "HoldingDate": null,
    "PaymentDate": "2017-05-31",
    "StartDate": "2017-05-01",
    "EndDate": "2017-05-31",
    "PaySchedule": {
      "@href": "/Employer/ER001/PaySchedule/MONTHLY"
    },
    "IsSupplementary": "false",
    "Employees": null
  }
}'

Step 8 - Wait for the Pay Run Job to Complete

In this step we monitor the pay run job progress. Once the job status is "success" we can examine the resulting AE Assessment object.

Job Id

You will need to insert the Job Id returned from the Enqueue Pay Run step.
00000000-0000-0000-0000-000000000000 is just a place holder for the demo.

curl -X GET \
  'https://api.test.payrun.io/jobs/payruns/00000000-0000-0000-0000-000000000000/info' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml'
curl -X GET \
  'https://api.test.payrun.io/jobs/payruns/00000000-0000-0000-0000-000000000000/info' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json'

Response Example

<?xml version="1.0"?>
<JobInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <JobId>00000000-0000-0000-0000-000000000000</JobId>
    <Created>2017-01-15T17:11:00.5833333</Created>
    <LastUpdated>2017-01-15T17:11:01.7266667</LastUpdated>
    <JobType>PayRunJob</JobType>
    <JobStatus>Success</JobStatus>
    <Progress>1.000</Progress>
    <HoldingDate xsi:nil="true" />
    <Errors />
</JobInfo>
{
    "JobInfo": {
        "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
        "JobId": "00000000-0000-0000-0000-000000000000",
        "Created": "2017-01-15T17:11:00.5833333",
        "LastUpdated": "2017-01-15T17:11:01.7266667",
        "JobType": "PayRunJob",
        "JobStatus": "Success",
        "Progress": "1.000",
        "HoldingDate": null,
        "Errors": null
    }
}

Step 9 - Examine the AE Assessment Result

Here we retrieve the auto enrolment assessment result for our employee.

Finding Assessments

Assessments are created during the calculation process with auto generated resource locations. The default unique key for assessments follows an incrementing pattern prefixed with the letters "AE".

  • /Employer/ER001/Employee/EE001/AEAssessment/AE001
  • /Employer/ER001/Employee/EE001/AEAssessment/AE002
  • /Employer/ER001/Employee/EE001/AEAssessment/AE003
  • etc

You can see a complete list of all the employee's assessments by requesting the employees AEAssessments end point.

  • /Employer/ER001/Employee/EE001/AEAssessments
curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/AEAssessment/AE001' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml'
curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/AEAssessment/AE001' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json'

Response Example

<?xml version="1.0"?>
<AEAssessment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Age>26</Age>
    <StatePensionAge>68</StatePensionAge>
    <StatePensionDate>2058-12-10</StatePensionDate>
    <AssessmentDate>2017-05-06</AssessmentDate>
    <QualifyingEarnings>2169.6000</QualifyingEarnings>
    <AssessmentCode>EligibleJobHolder</AssessmentCode>
    <AssessmentEvent>AutomaticEnrolment</AssessmentEvent>
    <AssessmentResult>Enrol</AssessmentResult>
    <AssessmentOverride>None</AssessmentOverride>
</AEAssessment>
{
    "AEAssessment": {
        "Age": "26",
        "StatePensionAge": "68",
        "StatePensionDate": "2058-12-10",
        "AssessmentDate": "2017-05-06",
        "QualifyingEarnings": "2169.6000",
        "AssessmentCode": "EligibleJobHolder",
        "AssessmentEvent": "AutomaticEnrolment",
        "AssessmentResult": "Enrol",
        "AssessmentOverride": "None"
    }
}

Assessment Commentary

You can investigate further details of the assessment process by looking in the employee's calculation commentary.

curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/Commentary/C001' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml'
curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/Employee/EE001/Commentary/C001' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json'

Response Example

<?xml version="1.0"?>
<Commentary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Created>2018-01-15T20:05:45.9030503</Created>
    <Detail>
... Truncated ...
20:05:45.550 [INFO ] --   Begin auto enrolment assessment
20:05:45.551 [DEBUG] --     Step 1 - Assert auto enrolment is configured
20:05:45.552 [DEBUG] --       Employer revision exists
20:05:45.586 [DEBUG] --       Employer auto enrolment settings exist
20:05:45.660 [DEBUG] --       Pension revision exists
20:05:45.660 [DEBUG] --       Pension is AE compatible
20:05:45.660 [DEBUG] --     Step 2 - Gather assessment variables
20:05:45.666 [DEBUG] --       Pay run:                  PR001
20:05:45.666 [DEBUG] --       Payment date:             2017-04-30
20:05:45.666 [DEBUG] --       Current tax period:       M01-2017/18
20:05:45.666 [DEBUG] --       Auto enrolment pension:   AE Scheme
20:05:45.666 [DEBUG] --       Staging date:             2014-04-01
20:05:45.666 [DEBUG] --       Re-enrolment offset:      Month:0 Day:0
20:05:45.666 [DEBUG] --       Next re-enrolment date:   2017-04-01
20:05:45.666 [DEBUG] --       Employer deferment date:  2014-05-01
20:05:45.666 [DEBUG] --       Date of birth:            1990-12-10
20:05:45.666 [DEBUG] --       22nd birthday:            2012-12-10
20:05:45.666 [DEBUG] --       Employment start date:    2013-04-01
20:05:45.666 [DEBUG] --       Employee deferment date:  None
20:05:45.666 [DEBUG] --       State pension start date: 2058-12-10
20:05:45.666 [DEBUG] --       State pension age:        68
20:05:45.666 [DEBUG] --       Assessment override:      None
20:05:45.667 [DEBUG] --       Assessment override date: None
20:05:45.667 [DEBUG] --       AE pension member:        False
20:05:45.667 [DEBUG] --       Alt pension member:       False
20:05:45.667 [DEBUG] --     Step 3 - Determine assessment date
20:05:45.675 [DEBUG] --       Assessment date:        2017-04-06 (tax period start date)
20:05:45.675 [DEBUG] --       Assessment tax period:  M01-2017/18 (based on assessment date)
20:05:45.675 [DEBUG] --       Age on assessment date: 26
20:05:45.675 [DEBUG] --       Payment frequency:      Monthly
20:05:45.675 [DEBUG] --       Qualifying earnings:    2,169.60
20:05:45.675 [DEBUG] --       AE lower threshold:     490.00
20:05:45.675 [DEBUG] --       AE trigger threshold:   833.00
20:05:45.675 [DEBUG] --       AE upper threshold:     3,750.00
20:05:45.675 [DEBUG] --     Step 4 - Determine if assessment is required
20:05:45.676 [DEBUG] --       Assessment date:             2017-04-06
20:05:45.676 [DEBUG] --       Employer staging date:       2014-04-01
20:05:45.676 [DEBUG] --       Employer postponement date:  2014-05-01
20:05:45.676 [DEBUG] --       Result:                      Assessment required
20:05:45.676 [DEBUG] --     Step 5 - Determine employee worker type
20:05:45.678 [DEBUG] --       Employee age (26) falls within assessment range (16 to 74).
20:05:45.678 [DEBUG] --       Qualifying earnings above lower threshold. 2,169.60 &gt; 490.00
20:05:45.678 [DEBUG] --       Qualifying earnings above trigger threshold. 2,169.60 &gt; 833.00
20:05:45.678 [DEBUG] --       Employee age (26) falls within eligible job holder range (22 to SPA 68).
20:05:45.678 [DEBUG] --       Employee worker type: EligibleJobHolder
20:05:45.678 [DEBUG] --     Step 6 - Create auto enrolment assessment object
20:05:45.682 [DEBUG] --       Auto enrolment assessment object created
20:05:45.682 [DEBUG] --       No assessment override specified
20:05:45.682 [DEBUG] --     Step 7 - Determine final result
20:05:45.683 [DEBUG] --       Worker Type:         EligibleJobHolder
20:05:45.683 [DEBUG] --       Assessment Override: None
20:05:45.683 [DEBUG] --       Assessment Outcome:  AutomaticEnrolment
20:05:45.683 [DEBUG] --       Assessment Action:   Enrol
20:05:45.683 [INFO ] --   End auto enrolment assessment
20:05:45.683 [INFO ] --   ####################################################################################################
20:05:45.683 [INFO ] --   Auto enrolment assessment - Status Changed
20:05:45.683 [INFO ] --     Assessment status: Enrol
20:05:45.683 [DEBUG] --     Re-running calculation to include new auto enrolment status
20:05:45.683 [DEBUG] --     Clearing previously calculated lines...
20:05:45.743 [INFO ] --     Starting second pass calculation...
20:05:45.743 [INFO ] --   ####################################################################################################
20:05:45.743 [INFO ] --   Start Pre-calculations Rules
20:05:45.747 [DEBUG] --     Rule matched: AE &gt; Enrolment Status Change
20:05:45.842 [INFO ] --       New pension pay instruction created
20:05:45.843 [INFO ] --     Total Rules: 15 - Excluded: 0 - Matched: 1
20:05:45.843 [INFO ] --   End Pre-calculations Rules
... Truncated ...
</Commentary>
{
    "Commentary": {
        "Created": "2018-01-15T20:05:45.9030503",
        "Detail": "... Truncated ...
20:05:45.550 [INFO ] --   Begin auto enrolment assessment\r\n
20:05:45.551 [DEBUG] --     Step 1 - Assert auto enrolment is configured\r\n
20:05:45.552 [DEBUG] --       Employer revision exists\r\n
20:05:45.586 [DEBUG] --       Employer auto enrolment settings exist\r\n
20:05:45.660 [DEBUG] --       Pension revision exists\r\n
20:05:45.660 [DEBUG] --       Pension is AE compatible\r\n
20:05:45.660 [DEBUG] --     Step 2 - Gather assessment variables\r\n
20:05:45.666 [DEBUG] --       Pay run:                  PR001\r\n
20:05:45.666 [DEBUG] --       Payment date:             2017-04-30\r\n
20:05:45.666 [DEBUG] --       Current tax period:       M01-2017/18\r\n
20:05:45.666 [DEBUG] --       Auto enrolment pension:   AE Scheme\r\n
20:05:45.666 [DEBUG] --       Staging date:             2014-04-01\r\n
20:05:45.666 [DEBUG] --       Re-enrolment offset:      Month:0 Day:0\r\n
20:05:45.666 [DEBUG] --       Next re-enrolment date:   2017-04-01\r\n
20:05:45.666 [DEBUG] --       Employer deferment date:  2014-05-01\r\n
20:05:45.666 [DEBUG] --       Date of birth:            1990-12-10\r\n
20:05:45.666 [DEBUG] --       22nd birthday:            2012-12-10\r\n
20:05:45.666 [DEBUG] --       Employment start date:    2013-04-01\r\n
20:05:45.666 [DEBUG] --       Employee deferment date:  None\r\n
20:05:45.666 [DEBUG] --       State pension start date: 2058-12-10\r\n
20:05:45.666 [DEBUG] --       State pension age:        68\r\n
20:05:45.666 [DEBUG] --       Assessment override:      None\r\n
20:05:45.667 [DEBUG] --       Assessment override date: None\r\n
20:05:45.667 [DEBUG] --       AE pension member:        False\r\n
20:05:45.667 [DEBUG] --       Alt pension member:       False\r\n
20:05:45.667 [DEBUG] --     Step 3 - Determine assessment date\r\n
20:05:45.675 [DEBUG] --       Assessment date:        2017-04-06 (tax period start date)\r\n
20:05:45.675 [DEBUG] --       Assessment tax period:  M01-2017/18 (based on assessment date)\r\n
20:05:45.675 [DEBUG] --       Age on assessment date: 26\r\n
20:05:45.675 [DEBUG] --       Payment frequency:      Monthly\r\n
20:05:45.675 [DEBUG] --       Qualifying earnings:    2,169.60\r\n
20:05:45.675 [DEBUG] --       AE lower threshold:     490.00\r\n
20:05:45.675 [DEBUG] --       AE trigger threshold:   833.00\r\n
20:05:45.675 [DEBUG] --       AE upper threshold:     3,750.00\r\n
20:05:45.675 [DEBUG] --     Step 4 - Determine if assessment is required\r\n
20:05:45.676 [DEBUG] --       Assessment date:             2017-04-06\r\n
20:05:45.676 [DEBUG] --       Employer staging date:       2014-04-01\r\n
20:05:45.676 [DEBUG] --       Employer postponement date:  2014-05-01\r\n
20:05:45.676 [DEBUG] --       Result:                      Assessment required\r\n
20:05:45.676 [DEBUG] --     Step 5 - Determine employee worker type\r\n
20:05:45.678 [DEBUG] --       Employee age (26) falls within assessment range (16 to 74).\r\n
20:05:45.678 [DEBUG] --       Qualifying earnings above lower threshold. 2,169.60 > 490.00\r\n
20:05:45.678 [DEBUG] --       Qualifying earnings above trigger threshold. 2,169.60 > 833.00\r\n
20:05:45.678 [DEBUG] --       Employee age (26) falls within eligible job holder range (22 to SPA 68).\r\n
20:05:45.678 [DEBUG] --       Employee worker type: EligibleJobHolder\r\n
20:05:45.678 [DEBUG] --     Step 6 - Create auto enrolment assessment object\r\n
20:05:45.682 [DEBUG] --       Auto enrolment assessment object created\r\n
20:05:45.682 [DEBUG] --       No assessment override specified\r\n
20:05:45.682 [DEBUG] --     Step 7 - Determine final result\r\n
20:05:45.683 [DEBUG] --       Worker Type:         EligibleJobHolder\r\n
20:05:45.683 [DEBUG] --       Assessment Override: None\r\n
20:05:45.683 [DEBUG] --       Assessment Outcome:  AutomaticEnrolment\r\n
20:05:45.683 [DEBUG] --       Assessment Action:   Enrol\r\n
20:05:45.683 [INFO ] --   End auto enrolment assessment\r\n
20:05:45.683 [INFO ] --   ####################################################################################################\r\n
20:05:45.683 [INFO ] --   Auto enrolment assessment - Status Changed\r\n
20:05:45.683 [INFO ] --     Assessment status: Enrol\r\n
20:05:45.683 [DEBUG] --     Re-running calculation to include new auto enrolment status\r\n
20:05:45.683 [DEBUG] --     Clearing previously calculated lines...\r\n
20:05:45.743 [INFO ] --     Starting second pass calculation...\r\n
20:05:45.743 [INFO ] --   ####################################################################################################\r\n
20:05:45.743 [INFO ] --   Start Pre-calculations Rules\r\n
20:05:45.747 [DEBUG] --     Rule matched: AE > Enrolment Status Change\r\n
20:05:45.842 [INFO ] --       New pension pay instruction created\r\n
20:05:45.843 [INFO ] --     Total Rules: 15 - Excluded: 0 - Matched: 1\r\n
20:05:45.843 [INFO ] --   End Pre-calculations Rules\r\n
... Truncated ..."
    }
}