Run payroll

Run payroll for an employer with this experience: view and update any inputs, review the calculated results, and then submit the payroll run to confirm it.

Available as:
Payroll run details view

Run payroll experience

This employer facing experience provides an employer user with the ability to view, update, and confirm an existing payroll run. See the Payroll Run API documentation for more information on how you can retrieve existing or create new payroll runs. In addition, this experience can also be used to view the details of a payroll run that is already confirmed as well.

Embedded usage

Element name: run-payroll

Refer to the guide on how to embed an Element with Salsa.js for more detailed instructions.

Options

NameTypeDescription
userTokenStringRequired. A User Token with EMPLOYER_ADMIN access role for the specified Employer.
payrollRunIdStringRequired. The id of the Payroll Run.
readOnlyObjectOptions for customizing what payroll elements should be shown as read only. See the following properties table.
hideObjectOptions for customizing which elements of the view should be hidden. See the following properties table.

options.readOnly properties:

NameTypeDescription
payBoolean |
InputReadOnlyOptions |
ElementReadOnlyOptions[]
Specifies the rules for which pay types should be shown as read only.
To set all pay types as read only, pass a true or InputReadOnlyOptions object value.
To set only a specific subset of pay types as read only, pass an array of ElementReadOnlyOptionsobjects value.
deductionsBooleanSpecifies if all deductions should be shown as read only.
timeWorkedBoolean |
InputReadOnlyOptions
Specifies if all time worked should be shown as read only.
compensationsBooleanDeprecated, use pay instead. Specifies if all compensations should be shown as read only.

InputReadOnlyOptions properties:

NameTypeDescription
messageStringThe message to be displayed on the read only input(s). This message should convey to the user why the input is read only, and/or how they can go about editing the value elsewhe

ElementReadOnlyOptions properties:

NameTypeDescription
referenceIdStringRequired. The referenceId of the Partner Pay Type that should be read only.
messageStringThe message to be displayed on the read only input(s). This message should convey to the user why the input is read only, and/or how they can go about editing the value elsewhere.

options.hide properties:

NameTypeDescription
titleBooleanHide the topmost title of the view.
stepperBooleanHide the stepper component, which displays the steps of the workflow.
stepTitleBooleanHide the title of the current step, which is displayed below the stepper and above the rest of the content.

Refer to the reference on creating elements for the additional options that are available to all elements.

Example

salsa.elements.create('run-payroll', {
  userToken: 'eyJhbGciO...ajs0Wqw', 
  payrollRunId: 'payrun_e8343fc7-9d63-4cc5-81ed-c573fc666d37'
});

Events

Refer to the documentation on Element events for more information about events and instructions on how to consume them.

complete event

The complete event is triggered when the user completes the run payroll workflow by confirming ("submitting") the payroll run.

Event object properties

NameTypeDescription
elementTypeString'run-payroll'
payrollRunIdStringThe id of the Run Payroll.