Create an employee creation intent
Create the employee of an onboarding as a task the ticket tracks, from the HR information (name, emails, phone, start date, job, legal entity, work location, teams, manager, address). Creates the intent and its EMPLOYEE_CREATION task. Without scheduleDate the employee is created right away — a real employee and Clerk user, so confirm the information first; with one, the task sleeps until that date and the employee is created when it wakes up — nobody has to execute it. A field you leave out is read from the onboarding HRIS record, so send only what differs from it; null clears a field. Read the returned intent to see what was filled in. Pass the ticket the task belongs to as parentTicketId; without one Primo opens a ticket for it. createTicket and createTask cannot make a typed task. Returns the intent id, its taskId and the ticketId holding it. When the employee cannot be created (for instance EMPLOYEE_INFORMATION_INCOMPLETE), the task stays PENDING with an internal comment: fix the intent with updateEmployeeCreationIntent, then executeEmployeeCreationIntent. The task cannot be marked done by hand: updateTaskStatus refuses it, and it completes once Primo has created the employee. createEmployee only creates a record with no onboarding or task, and completeOnboarding closes the whole onboarding without this task; use the employee creation intent for an EMPLOYEE_CREATION task a ticket tracks. Refused with ONBOARDING_NOT_FOUND, ONBOARDING_HAS_EMPLOYEE_CREATION (the onboarding already has a live one, whose id comes back as intentId: update or execute it), MANAGER_NOT_FOUND, PARENT_TICKET_IS_TYPED or PARENT_TICKET_IS_A_TASK (pass the untyped ticket instead), PARENT_TICKET_NOT_FOUND.
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Body
The onboarding the employee is created for, from getOnboardings. Fixed once created.
^[a-f\d]{24}$11Work email address the employee is created with.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$First day of the employee (ISO 8601), past or future.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$INTERNAL, CONTRACTOR Job title.
Office. Null for a remote employee.
Teams the employee joins, replaced whole.
Primo employee id of the manager, from getEmployees.
^[a-f\d]{24}$Personal (home) address of the employee.
The untyped ticket the task belongs to. Omit it and Primo opens a ticket to hold the task.
^[a-f\d]{24}$Creates the task SCHEDULED until this date: it cannot be executed before it wakes up as PENDING.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Response
Intent id — pass it to updateEmployeeCreationIntent and executeEmployeeCreationIntent
The EMPLOYEE_CREATION task that tracks this employee creation
The ticket holding that task: the parentTicketId sent, or the one Primo opened. Null if it could not be read back.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$INTERNAL, CONTRACTOR The employee created on execute, null until then
When the intent was executed; null while it can still change
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$