Opening a new case from an external system
An external system can provide a button or link that opens the existing new case form in eFOB. The link can specify the company, employee and case type. The user completes the remaining details, reviews the selected context and confirms the creation of the case.
The link is not a separate API or authentication method. It uses the standard eFOB sign-in, forms and case workflow.
Use cases
The link lets a user start working on a case without searching again for the company, employee and case type. For example, it can be assigned to a button in the client's system where the user already has an employee record or process open.
Values passed in the link are initial selections. The user can change them if the existing form rules and their permissions allow it.
Link format
https://<eFOB-address>/#/cases/new?companyCode=<company-code>&workerId=123&caseTypeCode=KOM
Parameters appear after ? and are separated with &. Encode their names and values according to URL rules, for example with URLSearchParams.
Parameters
| Parameter | Meaning |
|---|---|
companyCode | Required code from the Company code (QR) field in the Company panel (/#/company). It is not the company name, tax ID or the identifier used in the company URL. |
mode | Optional mode. Use worker for a case concerning the specified employee or self for the user's own case in My cases. If omitted, the mode is worker. |
workerId | ID of the employee record in eFOB. It is not the user account ID. |
externalId1 | Identifier stored in the external_id_1 field of the employee profile. |
externalId2 | Identifier stored in the external_id_2 field of the employee profile. |
caseTypeId | ID of the case type in eFOB. |
caseTypeCode | Case type code stored in the case_code field, for example KOM. |
Validation rules
companyCodeis required.- The link must contain exactly one case type parameter:
caseTypeIdorcaseTypeCode. - In
workermode, the link must contain exactly one employee identifier:workerId,externalId1orexternalId2. - In
selfmode, eFOB identifies the employee from the signed-in user in the selected company. The link can omit the employee identifier or contain exactly one identifier to confirm that it matches. A mismatch prevents the form from opening. - Providing several alternative identifiers is an error, even if they all point to the same record. eFOB does not switch automatically between
selfandworkermode. workerIdandcaseTypeIdmust be positive integers.externalId1andexternalId2are text values. Leading zeros are preserved.- Codes and identifiers are matched exactly, without substring matching or implicit case conversion.
- Empty values, repeated parameters and parameters outside the documented list cause a validation error.
What happens after the link is opened
- If the user has no active session, eFOB sends them through the standard sign-in flow. The link context is preserved through sign-in, SSO, 2FA and any required acceptance of legal documents.
- eFOB finds the company by
companyCodeamong the companies available to the user. - If the user is currently working in another company, the application switches the complete company context before looking up the employee and case type.
- eFOB checks the identifiers and the user's permissions in the selected company.
- In
workermode, the new case form opens with the employee and case type preselected. Inselfmode, the form opens in My cases. - The user reviews the company, employee and case type, completes the required details and then confirms the creation of the case.
After the case is saved, its standard workflow applies, including responsible users, stage forms and their validation.
Example links
A case for an employee and case type specified by their eFOB IDs:
https://<eFOB-address>/#/cases/new?companyCode=<company-code>&workerId=123&caseTypeId=17
A case for an employee specified by the first external identifier:
https://<eFOB-address>/#/cases/new?companyCode=<company-code>&externalId1=000123&caseTypeCode=KOM
A case for an employee specified by the second external identifier:
https://<eFOB-address>/#/cases/new?companyCode=<company-code>&externalId2=HR-456&caseTypeCode=KOM
The signed-in user's own case:
https://<eFOB-address>/#/cases/new?companyCode=<company-code>&mode=self&caseTypeCode=KOM
Permissions and case creation
The link does not extend the user's permissions. eFOB only makes available the companies, employees and case types that the user can access. Opening the link does not create a case. The user sees the selected context in the form and explicitly confirms the creation of the case.