Create an email account intent
Ask for an employee’s professional mailbox at the company’s email provider as a task a ticket tracks. Creates the intent and its EMAIL_ACCOUNT task. Without scheduleDate the mailbox is created right away; with one, the task sleeps until that date and the mailbox is created when it wakes up — nobody has to execute it. Pass the onboarding ticket as parentTicketId; without one Primo opens a ticket for the employee to hold the task. createTicket and createTask cannot make a typed task. The mailbox is created at the employee’s email as it stands when the task runs: set or fix that address on the employee (updateEmployee), not here. Returns the intent id, its taskId and the ticketId holding it. The task cannot be marked done by hand; it completes when the mailbox exists. Take the groups, roles, licenses and organization units from getSaasById of the email provider (the SaaS with isEmailProvider in getSaas). For an onboarding still on the classic email step, the step is handled by the onboarding itself; this intent is the email work tracked as a task on a ticket (an EMAIL_ACCOUNT task), and never closes an onboarding email step. Refused with EMAIL_PROVIDER_NOT_FOUND (no connected email provider), COMPANY_SAAS_APPLICATION_NOT_CAPABLE (the provider does not create users automatically), EMPLOYEE_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 employee the mailbox is for (from getEmployees). Fixed once created.
^[a-f\d]{24}$The employee's personal address, saved on the employee on execute.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$The untyped ticket the work belongs to (an onboarding ticket). Omit it and Primo opens one.
^[a-f\d]{24}$Creates the task SCHEDULED until this date; the mailbox is created when it wakes up. Without it, the mailbox is created right away.
^(?:(?:\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 updateEmailAccountIntent and executeEmailAccountIntent
The EMAIL_ACCOUNT task that tracks the mailbox
The ticket holding that task: the parentTicketId sent, or the one Primo opened. Null if unreadable.
The company's email provider
The address the provider created, null until executed
When the mailbox was created; null while the intent can 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))$