Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Super Fund Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom
Panel
titleREST Records & Fields

Table of Contents

Back to Payroll REST Integration

The personal information should always be included in the create and

Overview

Note
titleInformation Inaccurate or Outdated

This page has been marked for review as the information maybe inaccurate or outdated. An integration with this REST API should only be made after consultation with Infinet Cloud as to the requirements.


The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom
Panel
titleSync Employee function

Table of Contents

Back to Payroll REST Integration

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not. For the other groups they will only be validated and updated if they are included in the request. So as an example you may specify the tax details in the first create and then never submit them again so you would not include the tax group.

Personal Information

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not.

Request FieldDescriptionNetSuite IDMemo
idNetsuite Internal Idinternalidif set query will be treated as an update
salutationSalutation (Mr, Mrs etc)salutation
firstnameFirst name of employeefirstname
lastnameLast name of employeelastname
jobtitleEmployees's Position or Position Title / Job Titlecustentity_pr_position_title, titlefield will be compared against existing job titles and will be added if not found (e.g Junior Developer). Also sets the standard field Job Title
emailemailemailwill also be populated into email for payslip field
gendergendergenderm or f (note: if M or F is sent the field will be set to lower case)
phonephone numberphone
mobilephonemobile numbermobilephone
hiredatedate of start of employmenthiredate
birthdatedate of birthbirthdate
subsidiarysubsidiarysubsidiaryNetSuite One World Only
departmentdepartmentdepartmentinternal id of the netsuite department
classificationclassificationclassificationinternalid of the netsuite classification
locationlocationlocationinternalid of the netsuite location
address.address1first line of residential addressaddressbook.addr1
address.address2second line of residential addressaddressbook.addr2
address.address3third line of residential addressaddressbook.addr3
address.citycitycitySydney, Melbourne, etc
address.statestatestateNSW, QLD, SA, NT, TAS, VIC, WA
address.zippostcodezip2046
address.countrycountrycountryshould be set to AU


The following example shows a request to create a new employee passing just the basic personal details.


Code Block
titleExample Employee Sync Request
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "salutationexternalid": "MrREST-SAMPLE-1",
        "firstnamesalutation": "TestMiss",
        "lastnamefirstname": "PersonExample",
        "emaillastname": "test@infinetcloud.comPerson",
        "hiredatejobtitle": "2013-05-05REST Integration Specialist",
        "birthdateemail": "1976-01-12example@infinetcloud.com",
        "subsidiarygender": "2f",
        "addressphone": {
"09123456",
           "address1mobilephone": "2 Kings Park Circuit0339195534",
            "address2hiredate": "Five Dock2021-01-01",
        "birthdate": "1980-10-12",
        "address3subsidiary": "2",
        "address": {
            "cityaddress1": "SydneyUnit 3",
            "stateaddress2": "NSW2 Queens Park Circuit",
            "zipaddress3": "2046Five Dock",
            "countrycity": "AUSydney",
            }
};

Bank Details Information

The bank details will be used to set the primary bank details
"state": "NSW",
            "zip": "2046",
            "country": "AU"
        }
   }
}

Bank Detail Information

The bank details default to setting the bank details for payroll associated to the employee record


Request FieldDescriptionNetSuite IDMemo
bankaccount.nameBank Account Namecustentity_eft_bnk_acct_nameAccount Name
bankaccount.accountnumberBank Account Numbercustentity_eft_bnk_acct_noAccount Number
bankaccount.bsbnumberBank Account BSBcustentity_eft_bsbnoAccount BSB
bankaccount.paymentdescriptionBank Account Descriptioncustentity_eft_bnk_acct_descDescription that will appear in payee's statement normally Salary, Wages etc. If not specified will default to "Salary"
Code Block
"data" : {
"bankaccountaction" : {
"name" : "Paul Simmons"function",
"accountnumberfunction" : "12345678syncemployee",
"bsbnumberdata" : "123456",
"paymentdescription" : "Salary"
}}

Tax Information

The tax section is used to set the employees TFN, tax scale. The TFN field is mandatory as is one of:

  • Specifying the tax scale by name
  • Specifying the tax scale by its ID (using the supported additional record type)
  • Specifying the answers to the tax scale declarations
The fields required in the section are as follows:
{
        "externalid": "REST-SAMPLE-1",
        "bankaccount" : {
           "name" : "Example Bank",
           "accountnumber" : "12345678",
           "bsbnumber": "123456",
           "paymentdescription": "My Salary"
        }
   }
}


Tax Information

The tax section is used to specify the employees TFN and tax scale. The REST interface currently does not support methods of specifying details for a TFN declaration however the filter information associated to the tax scale is backfilled onto the employee record.

// Example 1
Request FieldDescriptionNetSuite IDMemo
tfnThe employees tax file numbercustentity_pr_tfnThe tax field number is mandatory if not known it should be populated with a default (000000000 or 111111111)leaveloadingpercentageThe leave loading percentagecustentity_pr_pay_leave_loading
taxscaleThe text description of a tax scale  (e.gscalecustentity_employee_tax_scaleIf specified this will attempt to match a tax scale (move to payroll)by name e.g "No tax-free threshold (1a) with HELP debt". Note: tax scale names can change in new tax years
taxscaleidThe netsuite id of a tax scale (e.g. 1)custentity_employee_tax_scaleIf specified the list of tax scales can be obtained using getList on tax scale (move to payroll
declaration.residentstatuswhether the employee is resident for tax purposescustentity_pr_resident_statusRESIDENT or NONRESIDENT
declaration.claimtaxfreethresholdwhether the employee can claim tax free thresholdcustentity_pr_claim_tax_free_thresholdTrue or False
declaration.claimsenioroffsetwhether the employee can claim the senior tax offsetcustentity_pr_claim_senior_tax_offsetTrue or False
declaration.seniorcouplestatusif  the employee can claim senior tax offset what is their couple statuscustentity_pr_senior_couple_statusSINGLE, COUPLE, ILLNESSSEPERATEDCOUPLE, NONE
declaration.sfssWhether employee has SFSS Debtcustentity_pr_help_sfss_varTrue or False
declaration.helpWhether employee has HELP Debtcustentity_pr_help_sfss_varTrue or False
declaration.medicareexemptStatus of employee's medicare exemptioncustentity_pr_ml_exemptionNONE, FULL or HALF
declaration.payleaveloadingWhether employee receives leave loadingcustentity_pr_pay_leave_loadingTrue or False
Code Block
tax scale with this internal id will be set onto the employee record. Note: the internalid of a tax scale could be different in each account.
Warning

Changes associated with STP Version 2 may change the way tax scales work, and you should expect the need to make changes associated with this in the near future.



Code Block
// tax scales can be looked up using the list function
{
"action": "list",
"recordtype": "taxscale"
}

// Example 1: Setting tax scale by exact name
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscale" : "No tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale basedby oninternal Taxid Scalefrom Namelookup
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaletaxscaleid" : "15"No
tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale based on Tax Scale Id
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaleid" : "23"
	}
}}

// Example 3: Setting tax scale based on Declaration
{"data" : {
        "tax": {
            "tfn": '11111111',
            "declaration": {
                "claimtaxfreethreshold" : false,
                "claimsenioroffset" : false,
                "sfss": false,
                "help": false,
		   }
        },
}}


Superfund Information

The super fund information will be used to perform two actions; create a new super fund record if one is not matched with the supplied details, then create or update an employee super fund record.

Request FieldDescriptionNetsuite IDMemonamethe name of the superfundcustomrecord_pr_employee_super_funds.custrecord_esf_super_fundmembershipnothe membership number of the employeecustomrecord_pr_employee_super_funds.custrecord_esf_membership_nosmsfidentifies whether the fund is a self managed superfundcustrecord_pr_sf_smsftrue or falseabnthe ABN of the super fundcustrecord_pr_esf_abnspinthe SPIN of the superfundcustrecord_pr_esf_spinusithe unique super fund identifiercustrecord_pr_esf_usiThis field is mandatory once superstream is imposedesathe electronic service addresscustrecord_pr_esf_esaThis field is mandatory for self managed superfunds
Note
titleSuperstream

With the full introduction of superstream a number of these fields will become deprecated and changes will be made as to how the superfund is found (proposed to use USI)

Payroll Information

The payroll information will be used to configure the details of how the employee is paid

Request FieldDescriptionNetsuite IDMemo
templatePay templaten/a(future development)
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different from the residential address)custentity_employee_payroll_stateNSW, QLD, SA, NT, TAS, VIC, WA
ordinaryweekhoursEnter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. A company default is set in payroll config.custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified

Code Block
{
"data" : {
	"payroll" : {
		"country" : "AU",
		"paytype" : "SALARY",
		"payrollid" : "PR12345",
		"payfrequency" : "FORTNIGHTLY",
		"state" : "QLD",
		"ordinaryweekhours" : "38",
		"payfromtime" : True,
		"accrueleavefromtime" : "False",
		"emailforpayslip" : "personalemail@gmail.com"
		}
	}
}

An example of a full submission include bank detail, superfund, tax and payroll is shown below:

Code Block
titleExample Request
{
    "action": "function",
    "function" : "syncemployee",
	"data": {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "Somewhere",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        },
        "bankaccount": {
            "name": '',
            "bsb" : '',
            "accountno" : ''
        },
        "superfund": {
            "name" : 'Host - plus',
            "abn" : "",
            "usi" : "",
            "esa" : "",
            "membershipno" : "10052345"
        },
        "tax": {
			"tfn" : "12345678",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"
        },
        "payroll":
        {
			"country" : "AU",
			"paytype" : "SALARY",
			"payrollid" : "PR12345",
			"payfrequency" : "FORTNIGHTLY",
			"state" : "QLD",
			"ordinaryweekhours" : "38",
			"payfromtime" : True,
			"accrueleavefromtime" : "False",
			"emailforpayslip" : "personalemail@gmail.com"
        }
    }
Panel
titleREST Records & Fields

Table of Contents

Back to Payroll REST Integration

Overview

The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Super Fund Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not. For the other groups they will only be validated and updated if they are included in the request. So as an example you may specify the tax details in the first create and then never submit them again so you would not include the tax group.

Personal Information

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not.

Request FieldDescriptionNetSuite IDMemoidNetsuite Internal Idinternalidif set query will be treated as an updatesalutationSalutation (Mr, Mrs etc)salutationfirstnameFirst name of employeefirstnamelastnameLast name of employeelastnamejobtitleEmployees's Position or Job Titlecustentity_pr_position_titlefield will be compared against existing job titles and will be added if not found (e.g Junior Developer)emailemailemailwill also be populated into email for payslip fieldgendergendergenderm or f (note: if M or F is sent the field will be set to lower case)phonephone numberphonemobilephonemobile numbermobilephonehiredatedate of start of employmenthiredatebirthdatedate of birthbirthdatesubsidiarysubsidiarysubsidiaryNetSuite One World Onlydepartmentdepartmentdepartmentinternal id of the netsuite departmentclassificationclassificationclassificationinternalid of the netsuite classificationlocationlocationlocationinternalid of the netsuite locationaddress.address1first line of residential addressaddressbook.addr1address.address2second line of residential addressaddressbook.addr2address.address3third line of residential addressaddressbook.addr3address.citycitycitySydney, Melbourne, etcaddress.statestatestateNSW, QLD, SA, NT, TAS, VIC, WAaddress.zippostcodezip2046address.countrycountrycountryshould be set to AU

The following example shows a request to create a new employee passing just the personal details

Code Block
titleExample Employee Sync Request
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        }
};

Bank Details Information

The bank details will be used to set the primary bank details for payroll associated to the employee record

Request FieldDescriptionNetSuite IDMemobankaccount.nameBank Account Namecustentity_eft_bnk_acct_nameAccount Namebankaccount.accountnumberBank Account Numbercustentity_eft_bnk_acct_noAccount Numberbankaccount.bsbnumberBank Account BSBcustentity_eft_bsbnoAccount BSBbankaccount.paymentdescriptionBank Account Descriptioncustentity_eft_bnk_acct_descDescription that will appear in payee's statement normally Salary, Wages etc
Code Block
"data" : {
"bankaccount" : {
"name" : "Paul Simmons",
"accountnumber" : "12345678",
"bsbnumber" : "123456",
"paymentdescription" : "Salary"
}}

Tax Information

The tax section is used to set the employees TFN, tax scale. The TFN field is mandatory as is one of:

  • Specifying the tax scale by name
  • Specifying the tax scale by its ID (using the supported additional record type)
  • Specifying the answers to the tax scale declarations

The fields required in the section are as follows:

Request FieldDescriptionNetSuite IDMemotfnThe employees tax file numbercustentity_pr_tfnThe tax field number is mandatory if not known it should be populated with a default (000000000 or 111111111)leaveloadingpercentageThe leave loading percentagecustentity_pr_pay_leave_loadingtaxscaleThe text description of a tax scale  (e.gcustentity_employee_tax_scaleIf specified this will attempt to match a tax scale (move to payroll)taxscaleidThe netsuite id of a tax scale (e.g. 1)custentity_employee_tax_scalethe list of tax scales can be obtained using getList on tax scale (move to payrolldeclaration.residentstatuswhether the employee is resident for tax purposescustentity_pr_resident_statusRESIDENT or NONRESIDENTdeclaration.claimtaxfreethresholdwhether the employee can claim tax free thresholdcustentity_pr_claim_tax_free_thresholdTrue or Falsedeclaration.claimsenioroffsetwhether the employee can claim the senior tax offsetcustentity_pr_claim_senior_tax_offsetTrue or Falsedeclaration.seniorcouplestatusif  the employee can claim senior tax offset what is their couple statuscustentity_pr_senior_couple_statusSINGLE, COUPLE, ILLNESSSEPERATEDCOUPLE, NONEdeclaration.sfssWhether employee has SFSS Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.helpWhether employee has HELP Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.medicareexemptStatus of employee's medicare exemptioncustentity_pr_ml_exemptionNONE, FULL or HALFdeclaration.payleaveloadingWhether employee receives leave loadingcustentity_pr_pay_leave_loadingTrue or False
Code Block
// Example 1: Setting tax scale based on Tax Scale Name
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscale" : "No tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale based on Tax Scale Id
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaleid" : "23"
	}
}}

// Example 3: Setting tax scale based on Declaration
{"data" : {
        "tax": {
            "tfn": '11111111',
            "declaration": {
                "claimtaxfreethreshold" : false,
                "claimsenioroffset" : false,
                "sfss": false,
                "help": false,
		   }
        },
}}


Superfund Information

The super fund information will be used to perform two actions; create a new super fund record if one is not matched with the supplied details, then create or update an employee super fund record.

Request FieldDescriptionNetsuite IDMemonamethe name of the superfundcustomrecord_pr_employee_super_funds.custrecord_esf_super_fundmembershipnothe membership number of the employeecustomrecord_pr_employee_super_funds.custrecord_esf_membership_nosmsfidentifies whether the fund is a self managed superfundcustrecord_pr_sf_smsftrue or falseabnthe ABN of the super fundcustrecord_pr_esf_abnspinthe SPIN of the superfundcustrecord_pr_esf_spinusithe unique super fund identifiercustrecord_pr_esf_usiThis field is mandatory once superstream is imposedesathe electronic service addresscustrecord_pr_esf_esaThis field is mandatory for self managed superfunds
Note
titleSuperstream

With the full introduction of superstream a number of these fields will become deprecated and changes will be made as to how the superfund is found (proposed to use USI)

Payroll Information

The payroll information will be used to configure the details of how the employee is paid

Request FieldDescriptionNetsuite IDMemo
templatePay templaten/a(future development)
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different from the residential address)custentity_employee_payroll_stateNSW, QLD, SA, NT, TAS, VIC, WA
ordinaryweekhoursEnter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. A company default is set in payroll config.custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified

Code Block
{
"data" : {
	"payroll" : {
		"country" : "AU",
		"paytype" : "SALARY",
		"payrollid" : "PR12345",
		"payfrequency" : "FORTNIGHTLY",
		"state" : "QLD",
		"ordinaryweekhours" : "38",
		"payfromtime" : True,
		"accrueleavefromtime" : "False",
		"emailforpayslip" : "personalemail@gmail.com"
		}
	}
}

An example of a full submission include bank detail, superfund, tax and payroll is shown below:

Code Block
titleExample Request
{
    "action": "function",
    "function" : "syncemployee",
	"data": {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "Somewhere",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        },
        "bankaccount": {
            "name": '',
            "bsb" : '',
            "accountno" : ''
        },
        "superfund": {
            "name" : 'Host - plus',
            "abn" : "",
            "usi" : "",
            "esa" : "",
            "membershipno" : "10052345"
        },
        "tax": {
			"tfn" : "12345678",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"
        },
        "payroll":
        {
			"country" : "AU",
			"paytype" : "SALARY",
			"payrollid" : "PR12345",
			"payfrequency" : "FORTNIGHTLY",
			"state" : "QLD",
			"ordinaryweekhours" : "38",
			"payfromtime" : True,
			"accrueleavefromtime" : "False",
			"emailforpayslip" : "personalemail@gmail.com"
        }
    }
Panel
titleREST Records & Fields

Table of Contents

Back to Payroll REST Integration

Overview

The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Super Fund Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not. For the other groups they will only be validated and updated if they are included in the request. So as an example you may specify the tax details in the first create and then never submit them again so you would not include the tax group.

Personal Information

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not.

Request FieldDescriptionNetSuite IDMemoidNetsuite Internal Idinternalidif set query will be treated as an updatesalutationSalutation (Mr, Mrs etc)salutationfirstnameFirst name of employeefirstnamelastnameLast name of employeelastnamejobtitleEmployees's Position or Job Titlecustentity_pr_position_titlefield will be compared against existing job titles and will be added if not found (e.g Junior Developer)emailemailemailwill also be populated into email for payslip fieldgendergendergenderm or f (note: if M or F is sent the field will be set to lower case)phonephone numberphonemobilephonemobile numbermobilephonehiredatedate of start of employmenthiredatebirthdatedate of birthbirthdatesubsidiarysubsidiarysubsidiaryNetSuite One World Onlydepartmentdepartmentdepartmentinternal id of the netsuite departmentclassificationclassificationclassificationinternalid of the netsuite classificationlocationlocationlocationinternalid of the netsuite locationaddress.address1first line of residential addressaddressbook.addr1address.address2second line of residential addressaddressbook.addr2address.address3third line of residential addressaddressbook.addr3address.citycitycitySydney, Melbourne, etcaddress.statestatestateNSW, QLD, SA, NT, TAS, VIC, WAaddress.zippostcodezip2046address.countrycountrycountryshould be set to AU

The following example shows a request to create a new employee passing just the personal details

Code Block
titleExample Employee Sync Request
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        }
};

Bank Details Information

The bank details will be used to set the primary bank details for payroll associated to the employee record

Request FieldDescriptionNetSuite IDMemobankaccount.nameBank Account Namecustentity_eft_bnk_acct_nameAccount Namebankaccount.accountnumberBank Account Numbercustentity_eft_bnk_acct_noAccount Numberbankaccount.bsbnumberBank Account BSBcustentity_eft_bsbnoAccount BSBbankaccount.paymentdescriptionBank Account Descriptioncustentity_eft_bnk_acct_descDescription that will appear in payee's statement normally Salary, Wages etc
Code Block
"data" : {
"bankaccount" : {
"name" : "Paul Simmons",
"accountnumber" : "12345678",
"bsbnumber" : "123456",
"paymentdescription" : "Salary"
}}

Tax Information

The tax section is used to set the employees TFN, tax scale. The TFN field is mandatory as is one of:

  • Specifying the tax scale by name
  • Specifying the tax scale by its ID (using the supported additional record type)
  • Specifying the answers to the tax scale declarations

The fields required in the section are as follows:

Request FieldDescriptionNetSuite IDMemotfnThe employees tax file numbercustentity_pr_tfnThe tax field number is mandatory if not known it should be populated with a default (000000000 or 111111111)leaveloadingpercentageThe leave loading percentagecustentity_pr_pay_leave_loadingtaxscaleThe text description of a tax scale  (e.gcustentity_employee_tax_scaleIf specified this will attempt to match a tax scale (move to payroll)taxscaleidThe netsuite id of a tax scale (e.g. 1)custentity_employee_tax_scalethe list of tax scales can be obtained using getList on tax scale (move to payrolldeclaration.residentstatuswhether the employee is resident for tax purposescustentity_pr_resident_statusRESIDENT or NONRESIDENTdeclaration.claimtaxfreethresholdwhether the employee can claim tax free thresholdcustentity_pr_claim_tax_free_thresholdTrue or Falsedeclaration.claimsenioroffsetwhether the employee can claim the senior tax offsetcustentity_pr_claim_senior_tax_offsetTrue or Falsedeclaration.seniorcouplestatusif  the employee can claim senior tax offset what is their couple statuscustentity_pr_senior_couple_statusSINGLE, COUPLE, ILLNESSSEPERATEDCOUPLE, NONEdeclaration.sfssWhether employee has SFSS Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.helpWhether employee has HELP Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.medicareexemptStatus of employee's medicare exemptioncustentity_pr_ml_exemptionNONE, FULL or HALFdeclaration.payleaveloadingWhether employee receives leave loadingcustentity_pr_pay_leave_loadingTrue or False
Code Block
// Example 1: Setting tax scale based on Tax Scale Name
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscale" : "No tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale based on Tax Scale Id
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaleid" : "23"
	}
}}

// Example 3: Setting tax scale based on Declaration
{"data" : {
        "tax": {
            "tfn": '11111111',
            "declaration": {
                "claimtaxfreethreshold" : false,
                "claimsenioroffset" : false,
                "sfss": false,
                "help": false,
		   }
        },
}}


Superfund Information

The super fund information will be used to perform two actions; create a new super fund record if one is not matched with the supplied details, then create or update an employee super fund record.

Request FieldDescriptionNetsuite IDMemonamethe name of the superfundcustomrecord_pr_employee_super_funds.custrecord_esf_super_fundmembershipnothe membership number of the employeecustomrecord_pr_employee_super_funds.custrecord_esf_membership_nosmsfidentifies whether the fund is a self managed superfundcustrecord_pr_sf_smsftrue or falseabnthe ABN of the super fundcustrecord_pr_esf_abnspinthe SPIN of the superfundcustrecord_pr_esf_spinusithe unique super fund identifiercustrecord_pr_esf_usiThis field is mandatory once superstream is imposedesathe electronic service addresscustrecord_pr_esf_esaThis field is mandatory for self managed superfunds
Note
titleSuperstream

With the full introduction of superstream a number of these fields will become deprecated and changes will be made as to how the superfund is found (proposed to use USI)

Payroll Information

The payroll information will be used to configure the details of how the employee is paid

Request FieldDescriptionNetsuite IDMemo
templatePay templaten/a(future development)
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different from the residential address)custentity_employee_payroll_stateNSW, QLD, SA, NT, TAS, VIC, WA
ordinaryweekhoursEnter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. A company default is set in payroll config.custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified

Code Block
{
"data" : {
	"payroll" : {
		"country" : "AU",
		"paytype" : "SALARY",
		"payrollid" : "PR12345",
		"payfrequency" : "FORTNIGHTLY",
		"state" : "QLD",
		"ordinaryweekhours" : "38",
		"payfromtime" : True,
		"accrueleavefromtime" : "False",
		"emailforpayslip" : "personalemail@gmail.com"
		}
	}
}

An example of a full submission include bank detail, superfund, tax and payroll is shown below:

Code Block
titleExample Request
{
    "action": "function",
    "function" : "syncemployee",
	"data": {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "Somewhere",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        },
        "bankaccount": {
            "name": '',
            "bsb" : '',
            "accountno" : ''
        },
        "superfund": {
            "name" : 'Host - plus',
            "abn" : "",
            "usi" : "",
            "esa" : "",
            "membershipno" : "10052345"
        },
        "tax": {
			"tfn" : "12345678",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"
        },
        "payroll":
        {
			"country" : "AU",
			"paytype" : "SALARY",
			"payrollid" : "PR12345",
			"payfrequency" : "FORTNIGHTLY",
			"state" : "QLD",
			"ordinaryweekhours" : "38",
			"payfromtime" : True,
			"accrueleavefromtime" : "False",
			"emailforpayslip" : "personalemail@gmail.com"
        }
    }
Panel
titleREST Records & Fields

Table of Contents

Back to Payroll REST Integration

Overview

The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Super Fund Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not. For the other groups they will only be validated and updated if they are included in the request. So as an example you may specify the tax details in the first create and then never submit them again so you would not include the tax group.

Personal Information

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not.

Request FieldDescriptionNetSuite IDMemoidNetsuite Internal Idinternalidif set query will be treated as an updatesalutationSalutation (Mr, Mrs etc)salutationfirstnameFirst name of employeefirstnamelastnameLast name of employeelastnamejobtitleEmployees's Position or Job Titlecustentity_pr_position_titlefield will be compared against existing job titles and will be added if not found (e.g Junior Developer)emailemailemailwill also be populated into email for payslip fieldgendergendergenderm or f (note: if M or F is sent the field will be set to lower case)phonephone numberphonemobilephonemobile numbermobilephonehiredatedate of start of employmenthiredatebirthdatedate of birthbirthdatesubsidiarysubsidiarysubsidiaryNetSuite One World Onlydepartmentdepartmentdepartmentinternal id of the netsuite departmentclassificationclassificationclassificationinternalid of the netsuite classificationlocationlocationlocationinternalid of the netsuite locationaddress.address1first line of residential addressaddressbook.addr1address.address2second line of residential addressaddressbook.addr2address.address3third line of residential addressaddressbook.addr3address.citycitycitySydney, Melbourne, etcaddress.statestatestateNSW, QLD, SA, NT, TAS, VIC, WAaddress.zippostcodezip2046address.countrycountrycountryshould be set to AU

The following example shows a request to create a new employee passing just the personal details

Code Block
titleExample Employee Sync Request
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        }
};

Bank Details Information

The bank details will be used to set the primary bank details for payroll associated to the employee record

Request FieldDescriptionNetSuite IDMemobankaccount.nameBank Account Namecustentity_eft_bnk_acct_nameAccount Namebankaccount.accountnumberBank Account Numbercustentity_eft_bnk_acct_noAccount Numberbankaccount.bsbnumberBank Account BSBcustentity_eft_bsbnoAccount BSBbankaccount.paymentdescriptionBank Account Descriptioncustentity_eft_bnk_acct_descDescription that will appear in payee's statement normally Salary, Wages etc
Code Block
"data" : {
"bankaccount" : {
"name" : "Paul Simmons",
"accountnumber" : "12345678",
"bsbnumber" : "123456",
"paymentdescription" : "Salary"
}}

Tax Information

The tax section is used to set the employees TFN, tax scale. The TFN field is mandatory as is one of:

  • Specifying the tax scale by name
  • Specifying the tax scale by its ID (using the supported additional record type)
  • Specifying the answers to the tax scale declarations

The fields required in the section are as follows:

Request FieldDescriptionNetSuite IDMemotfnThe employees tax file numbercustentity_pr_tfnThe tax field number is mandatory if not known it should be populated with a default (000000000 or 111111111)leaveloadingpercentageThe leave loading percentagecustentity_pr_pay_leave_loadingtaxscaleThe text description of a tax scale  (e.gcustentity_employee_tax_scaleIf specified this will attempt to match a tax scale (move to payroll)taxscaleidThe netsuite id of a tax scale (e.g. 1)custentity_employee_tax_scalethe list of tax scales can be obtained using getList on tax scale (move to payrolldeclaration.residentstatuswhether the employee is resident for tax purposescustentity_pr_resident_statusRESIDENT or NONRESIDENTdeclaration.claimtaxfreethresholdwhether the employee can claim tax free thresholdcustentity_pr_claim_tax_free_thresholdTrue or Falsedeclaration.claimsenioroffsetwhether the employee can claim the senior tax offsetcustentity_pr_claim_senior_tax_offsetTrue or Falsedeclaration.seniorcouplestatusif  the employee can claim senior tax offset what is their couple statuscustentity_pr_senior_couple_statusSINGLE, COUPLE, ILLNESSSEPERATEDCOUPLE, NONEdeclaration.sfssWhether employee has SFSS Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.helpWhether employee has HELP Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.medicareexemptStatus of employee's medicare exemptioncustentity_pr_ml_exemptionNONE, FULL or HALFdeclaration.payleaveloadingWhether employee receives leave loadingcustentity_pr_pay_leave_loadingTrue or False
Code Block
// Example 1: Setting tax scale based on Tax Scale Name
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscale" : "No tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale based on Tax Scale Id
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaleid" : "23"
	}
}}

// Example 3: Setting tax scale based on Declaration
{"data" : {
        "tax": {
            "tfn": '11111111',
            "declaration": {
                "claimtaxfreethreshold" : false,
                "claimsenioroffset" : false,
                "sfss": false,
                "help": false,
		   }
        },
}}


Superfund Information

The super fund information will be used to perform two actions; create a new super fund record if one is not matched with the supplied details, then create or update an employee super fund record.

Request FieldDescriptionNetsuite IDMemonamethe name of the superfundcustomrecord_pr_employee_super_funds.custrecord_esf_super_fundmembershipnothe membership number of the employeecustomrecord_pr_employee_super_funds.custrecord_esf_membership_nosmsfidentifies whether the fund is a self managed superfundcustrecord_pr_sf_smsftrue or falseabnthe ABN of the super fundcustrecord_pr_esf_abnspinthe SPIN of the superfundcustrecord_pr_esf_spinusithe unique super fund identifiercustrecord_pr_esf_usiThis field is mandatory once superstream is imposedesathe electronic service addresscustrecord_pr_esf_esaThis field is mandatory for self managed superfunds
Note
titleSuperstream

With the full introduction of superstream a number of these fields will become deprecated and changes will be made as to how the superfund is found (proposed to use USI)

Payroll Information

The payroll information will be used to configure the details of how the employee is paid

Request FieldDescriptionNetsuite IDMemo
templatePay templaten/a(future development)
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different from the residential address)custentity_employee_payroll_stateNSW, QLD, SA, NT, TAS, VIC, WA
ordinaryweekhoursEnter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. A company default is set in payroll config.custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified

Code Block
{
"data" : {
	"payroll" : {
		"country" : "AU",
		"paytype" : "SALARY",
		"payrollid" : "PR12345",
		"payfrequency" : "FORTNIGHTLY",
		"state" : "QLD",
		"ordinaryweekhours" : "38",
		"payfromtime" : True,
		"accrueleavefromtime" : "False",
		"emailforpayslip" : "personalemail@gmail.com"
		}
	}
}

An example of a full submission include bank detail, superfund, tax and payroll is shown below:

Code Block
titleExample Request
{
    "action": "function",
    "function" : "syncemployee",
	"data": {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "Somewhere",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        },
        "bankaccount": {
            "name": '',
            "bsb" : '',
            "accountno" : ''
        },
        "superfund": {
            "name" : 'Host - plus',
            "abn" : "",
            "usi" : "",
            "esa" : "",
            "membershipno" : "10052345"
        },
        "tax": {
			"tfn" : "12345678",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"
        },
        "payroll":
        {
			"country" : "AU",
			"paytype" : "SALARY",
			"payrollid" : "PR12345",
			"payfrequency" : "FORTNIGHTLY",
			"state" : "QLD",
			"ordinaryweekhours" : "38",
			"payfromtime" : True,
			"accrueleavefromtime" : "False",
			"emailforpayslip" : "personalemail@gmail.com"
        }
    }
Panel
titleREST Records & Fields

Table of Contents

Back to Payroll REST Integration

Overview

The add and update of employee records is managed by a separate action, rather than an action applied to the employee record, this allows greater granularity in validation, and to provide greater flexibility in how the information is provided and updated. The data submitted for the syncemployee function breaks down into the following groups:

  • Personal Information
  • Bank Account Information
  • Super Fund Information
  • Tax Information
  • Payroll Information
  • Pay Components
  • Custom

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not. For the other groups they will only be validated and updated if they are included in the request. So as an example you may specify the tax details in the first create and then never submit them again so you would not include the tax group.

Personal Information

The personal information should always be included in the create and subsequent updates and the values are compared against the existing record to decide whether to update or not.

Request FieldDescriptionNetSuite IDMemoidNetsuite Internal Idinternalidif set query will be treated as an updatesalutationSalutation (Mr, Mrs etc)salutationfirstnameFirst name of employeefirstnamelastnameLast name of employeelastnamejobtitleEmployees's Position or Job Titlecustentity_pr_position_titlefield will be compared against existing job titles and will be added if not found (e.g Junior Developer)emailemailemailwill also be populated into email for payslip fieldgendergendergenderm or f (note: if M or F is sent the field will be set to lower case)phonephone numberphonemobilephonemobile numbermobilephonehiredatedate of start of employmenthiredatebirthdatedate of birthbirthdatesubsidiarysubsidiarysubsidiaryNetSuite One World Onlydepartmentdepartmentdepartmentinternal id of the netsuite departmentclassificationclassificationclassificationinternalid of the netsuite classificationlocationlocationlocationinternalid of the netsuite locationaddress.address1first line of residential addressaddressbook.addr1address.address2second line of residential addressaddressbook.addr2address.address3third line of residential addressaddressbook.addr3address.citycitycitySydney, Melbourne, etcaddress.statestatestateNSW, QLD, SA, NT, TAS, VIC, WAaddress.zippostcodezip2046address.countrycountrycountryshould be set to AU

The following example shows a request to create a new employee passing just the personal details

Code Block
titleExample Employee Sync Request
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        }
};

Bank Details Information

The bank details will be used to set the primary bank details for payroll associated to the employee record

Request FieldDescriptionNetSuite IDMemobankaccount.nameBank Account Namecustentity_eft_bnk_acct_nameAccount Namebankaccount.accountnumberBank Account Numbercustentity_eft_bnk_acct_noAccount Numberbankaccount.bsbnumberBank Account BSBcustentity_eft_bsbnoAccount BSBbankaccount.paymentdescriptionBank Account Descriptioncustentity_eft_bnk_acct_descDescription that will appear in payee's statement normally Salary, Wages etc
Code Block
"data" : {
"bankaccount" : {
"name" : "Paul Simmons",
"accountnumber" : "12345678",
"bsbnumber" : "123456",
"paymentdescription" : "Salary"
}}

Tax Information

The tax section is used to set the employees TFN, tax scale. The TFN field is mandatory as is one of:

  • Specifying the tax scale by name
  • Specifying the tax scale by its ID (using the supported additional record type)
  • Specifying the answers to the tax scale declarations

The fields required in the section are as follows:

Request FieldDescriptionNetSuite IDMemotfnThe employees tax file numbercustentity_pr_tfnThe tax field number is mandatory if not known it should be populated with a default (000000000 or 111111111)leaveloadingpercentageThe leave loading percentagecustentity_pr_pay_leave_loadingtaxscaleThe text description of a tax scale  (e.gcustentity_employee_tax_scaleIf specified this will attempt to match a tax scale (move to payroll)taxscaleidThe netsuite id of a tax scale (e.g. 1)custentity_employee_tax_scalethe list of tax scales can be obtained using getList on tax scale (move to payrolldeclaration.residentstatuswhether the employee is resident for tax purposescustentity_pr_resident_statusRESIDENT or NONRESIDENTdeclaration.claimtaxfreethresholdwhether the employee can claim tax free thresholdcustentity_pr_claim_tax_free_thresholdTrue or Falsedeclaration.claimsenioroffsetwhether the employee can claim the senior tax offsetcustentity_pr_claim_senior_tax_offsetTrue or Falsedeclaration.seniorcouplestatusif  the employee can claim senior tax offset what is their couple statuscustentity_pr_senior_couple_statusSINGLE, COUPLE, ILLNESSSEPERATEDCOUPLE, NONEdeclaration.sfssWhether employee has SFSS Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.helpWhether employee has HELP Debtcustentity_pr_help_sfss_varTrue or Falsedeclaration.medicareexemptStatus of employee's medicare exemptioncustentity_pr_ml_exemptionNONE, FULL or HALFdeclaration.payleaveloadingWhether employee receives leave loadingcustentity_pr_pay_leave_loadingTrue or False
Code Block
// Example 1: Setting tax scale based on Tax Scale Name
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscale" : "No tax-free threshold (1a) with HELP debt"
	}
}}

// Example 2: Setting tax scale based on Tax Scale Id
{"data" : {
 	"tax" : {
		"tfn" : "12345678",
		"taxscaleid" : "23"
	}
}}

// Example 3: Setting tax scale based on Declaration
{"data" : {
        "tax": {
            "tfn": '11111111',
            "declaration": {
                "claimtaxfreethreshold" : false,
                "claimsenioroffset" : false,
                "sfss": false,
                "help": false,
		   }
        },
}}


Superfund Information

The super fund information will be used to perform two actions; create a new super fund record if one is not matched with the supplied details, then create or update an employee super fund record.

Request FieldDescriptionNetsuite IDMemonamethe name of the superfundcustomrecord_pr_employee_super_funds.custrecord_esf_super_fundmembershipnothe membership number of the employeecustomrecord_pr_employee_super_funds.custrecord_esf_membership_nosmsfidentifies whether the fund is a self managed superfundcustrecord_pr_sf_smsftrue or falseabnthe ABN of the super fundcustrecord_pr_esf_abnspinthe SPIN of the superfundcustrecord_pr_esf_spinusithe unique super fund identifiercustrecord_pr_esf_usiThis field is mandatory once superstream is imposedesathe electronic service addresscustrecord_pr_esf_esaThis field is mandatory for self managed superfunds
Note
titleSuperstream

With the full introduction of superstream a number of these fields will become deprecated and changes will be made as to how the superfund is found (proposed to use USI)

Payroll Information

The payroll information will be used to configure the details of how the employee is paid

Request FieldDescriptionNetsuite IDMemo
templatePay templaten/a(future development)
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different from the residential address)custentity_employee_payroll_stateNSW, QLD, SA, NT, TAS, VIC, WA
ordinaryweekhoursEnter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. A company default is set in payroll config.custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified

Code Block
{
"data" : {
	"payroll" : {
		"country" : "AU",
		"paytype" : "SALARY",
		"payrollid" : "PR12345",
		"payfrequency" : "FORTNIGHTLY",
		"state" : "QLD",
		"ordinaryweekhours" : "38",
		"payfromtime" : True,
		"accrueleavefromtime" : "False",
		"emailforpayslip" : "personalemail@gmail.com"
		}
		}
}}

Payroll Information

The payroll information will be used to configure the details of how the basic details of the employee pay


Request FieldDescriptionNetsuite IDMemo
countryPay countrycustentity_pr_countryAU
paytypePay type for this employeecustentity_pay_typeSALARY or WAGE
payrollidEmployees's payroll referencecustentity_pr_payroll_idID of employee for payroll purposes
payfrequencyPay frequency for this employeecustentity_pay_freqWEEKLY or FORTNIGHTLY or MONTHLY
stateThe payroll state the employee is taxed within (this can be different to the residential address). Should only be set for AU. If country is NZ or UK state should be left blank and default from payroll config.custentity_employee_payroll_stateSupports NSW, QLD, SA, NT, TAS, VIC, WA

workingweek

specifies the employee working week pattern, if set the ordinaryhoursperweek will default from this. On create the workingweek will automatically set from the default working week set in payroll config if not entered.custentity_pr_working_weekspecify an internalid of a working week (lookup using {
"action" : "list",
"recordtype" : "workingweek"
})

ordinaryhoursperweek

Enter the number of ordinary hours for an employees normal working week. This field will populate the number of normal time hours for a waged employee and forms the basis for a number of basic payroll calculations such as overtime and accrued annual leave. 

Note: Working Week is typically the master of this field and where possible should be used instead. Ensure you verify expected behaviour in account before using this field.
custentity_pr_standard_weekSet to 0 if employee is pay from netsuite time
payfromtimeWages Employees only. Check this box if the employee is paid based on time logged in NetSuite. The employee will need to be wages and have a pay component of 0 hours with an hourly rate complete.custentity_pr_pay_timetrue or false
accrueleavefromtimeWaged Employees Only - Check this box if the employee accrues leave based on the number of hours paid on the payslip (normal time and paid holiday time, does not include overtime) and NOT based on their standard working week. Do not check if salaried.custentity_pr_accrue_leave_hourstrue or false
emailforpayslipsThe email address used for sending payslipscustentity_pr_email_for_payslipsIf empty this will default to the email specified on the employee body
employmentstatusThe employees employment statuscustentity_employment_status

FULLTIME,

CASUAL,

CONTRACTOR,

DIRECTOR,

LABOURHIRE,

NONPAYROLL,

PARTTIME,

TEMPORARY,

TERMINATED

Note: On create of the employee record payroll fields will be defaulted from the payroll configuration record before the specific fields are specified


Code Block
{
"action" : "function",
"function" : "syncemployee",
"data" : {
        "externalid": "REST-SAMPLE-1",
        "payroll" : {
           "employmentstatus": "CASUAL",
           "country" : "AU",
           "state" : "QLD",
          "paytype": "SALARY",
           "payrollid": "REST-SAMPLE-1",
           "payfrequency": "WEEKLY",
           "payfromtime": "F",
           "accrueleavefromtime": "F",
          "ordinaryhoursperweek" : "16",
          "emailforpayslips": "person@gmail.com"
        }
   }
}


An example of a full submission include bank detail, superfund, tax and payroll is shown below:


Code Block
titleExample Request
{
    "action": "function",
    "function" : "syncemployee",
	"data": {
        "salutation": "Mr",
        "firstname": "Test",
        "lastname": "Person",
        "email": "test@infinetcloud.com",
        "hiredate": "2013-05-05",
        "birthdate": "1976-01-12",
        "subsidiary": "2",
        "address": {
            "address1": "2 Kings Park Circuit",
            "address2": "Five Dock",
            "address3": "Somewhere",
            "city": "Sydney",
            "state": "NSW",
            "zip": "2046",
            "country": "AU"
        },
        "bankaccount" : {
            "name" : '',"Example Bank",
           "accountnumber" : "bsb" : ''12345678",
           "bsbnumber": "123456",
            "accountno"paymentdescription": "My Salary"
        }
        "tax": {
			"tfn" : ''
        },"12345678",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"
        },
		"superfundpayroll" : {

           "nameemploymentstatus" : 'Host - plus',
"CASUAL",
           "abncountry" : "AU",
            "usistate" : "QLD",
            "esapaytype" : "SALARY",

           "membershipnopayrollid" : "10052345REST-SAMPLE-1",
        },         "tax": {
			"tfn" "payfrequency": "12345678WEEKLY",
			"taxscale" : "No tax-free threshold (1a) with HELP debt"      "payfromtime": "F",
  },         "payrollaccrueleavefromtime": "F",
          { 			"countryworkingweek" : "AU7",
			"paytype" : "SALARY",
			"payrollid" : "PR12345",
			"payfrequency" : "FORTNIGHTLY",
			"state
           "ordinaryhoursperweek" : "QLD16",
			"ordinaryweekhours" : "38",
			"payfromtime" : True,
			"accrueleavefromtime" : "False",
			"emailforpayslip" : "personalemail@gmail
           "emailforpayslips": "person@gmail.com"
        }
    }