Custom fields
The idea
Section titled “The idea”Many /api/v1 resources accept a custom_fields object (key and value). The definitions (type, label, required) are created in the ERP; nobody invents database columns.
A made-up example on a client:
{ "display_name": "Ana Pop", "custom_fields": { "allergies": "penicillin", "referral_source": "instagram" }}How to create a field
Section titled “How to create a field”- In the ERP, open the fields settings of the entity (for example Clients).
- Add the key, type and label.
- The frontend and the API now see it in
custom_fields.
Alternatively the AI proposes the key and type, and you approve it in the ERP.
What the AI tells the person
Section titled “What the AI tells the person”“You need an allergies field (text) on clients. Add it in the ERP under the client fields. After that I send it in custom_fields.allergies.”
What the AI does not do
Section titled “What the AI does not do”- It does not create tables in the Rivil database.
- It does not send made-up fields without a definition, or without asking you to create it.
For AI assistants
The public docs describe the capability, not the fields of any company. The per-company OpenAPI file, with its fields, is in the ERP.