Supista
Contact Us
documentation
Supista ERP
Parameters
Customize ERP Function – Parameters Explanation

customizeERP Function – Parameters Explanation

The customizeERP function receives two parameters, where the first one, userData, plays a critical role in conveying the input data associated with the request. The structure of userData varies based on the type of operation being customized and whether the customization is applied to a main or related table.


1. userData Parameter

This object contains the data payload relevant to the specific CRUD operation, form customization, table-wise actions, AI bot operations, and action buttons.


Create

{
  "__d3__newData": {
    "Belongs To Test ID": 1,
    "Title": "Sample",
    "Start Date": "2026-02-23T11:51:50.852Z",
    "End Date": "2026-02-23T11:51:50.852Z",
    "Days": 101,
    "Select": "Pending",
    "Switch": "Sample",
    "Direction": "Sample",
    "Multiple User": "Sample"
  }
}

If customizing Create of a related table

{
  "__d3__newData": {
    "Belongs To Test ID": 1,
    "Title": "Sample",
    "Start Date": "2026-02-23T11:51:50.852Z",
    "End Date": "2026-02-23T11:51:50.852Z",
    "Days": 101,
    "Select": "Pending",
    "Switch": "Sample",
    "Direction": "Sample",
    "Multiple User": "Sample"
  },
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the relation"
}

Read

{
  "__d3__filterdata": {
    "where": {}
  }
}

If customizing Read of a related table

{
  "__d3__filterdata": {
    "where": {}
  },
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the relation"
}

To fetch a specific number of records, you can add a limit key

{
  "__d3__filterdata": {
    "where": {},
    "limit": 100
  }
}

limit Value Behavior

limit ValueResult
Not providedDefaults to 10 records
A number (e.g., 50)Returns that many records
nullReturns all records

Update

{
  "__d3__newData": {
    "Teachers ID": null,
    "firstName": "Test 3",
    "lastName": null,
    "lastName2": null,
    "dateOfBirth": null,
    "email": "test@.gmail.com",
    "Roll No": 12
  },
  "__d3__id": 1
}

If customizing Update of a related table

{
  "__d3__newData": {
    "Teachers ID": null,
    "firstName": "Test 3",
    "lastName": null,
    "lastName2": null,
    "dateOfBirth": null,
    "email": "test@.gmail.com",
    "Roll No": 12
  },
  "__d3__id": 1,
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the relation"
}

Delete

{
  "__d3__id": [1]
}

If customizing Delete of a related table

{
  "__d3__id": [1],
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the Relation"
}

Form Customization

Form customization allows you to manipulate the behavior, structure, or content of forms within Supista ERP. The userData parameter in this context includes vital information needed to render and manage the form.

Main Table Form Customization

{
  "__d3__formData": {
    "Teachers ID": 1,
    "firstName": "Sample",
    "lastName": "Sample",
    "lastName2": "Sample",
    "dateOfBirth": "2026-02-23T12:35:12.808Z",
    "email": "Sample",
    "Roll No": 101,
    "Student Board": "Sample"
  },
  "__d3__error": {},
  "__d3__schema": {},
  "__d3__alerts": []
}

If customizing Form Customization of a related table

{
  "__d3__formData": {
    "Teachers ID": 1,
    "firstName": "Sample",
    "lastName": "Sample",
    "lastName2": "Sample",
    "dateOfBirth": "2026-02-23T12:35:12.808Z",
    "email": "Sample",
    "Roll No": 101,
    "Student Board": "Sample"
  },
  "__d3__error": {},
  "__d3__schema": {},
  "__d3__alerts": [],
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the relation"
}

You can destructure the data as follows:

const { __d3__formData, __d3__error, __d3__schema } = userData;

Action Buttons

Custom action buttons allow you to trigger operations based on user-selected records.

Sample userData

[
  {
    "id": 2,
    "Teachers ID": null,
    "firstName": "Test 3",
    "Roll No": 13,
    "Student Board": null,
    "Classes": "First",
    "__d3__createdBy": 156,
    "__d3__lastUpdatedBy": 156,
    "__d3__createdAt": "2025-07-23T04:43:07.421Z",
    "__d3__updatedAt": "2025-11-11T16:33:27.761Z",
    "1h3s422u3s.firstName": null,
    "1h3s422u3s.user": null
  }
]

Usage Notes

  • Each object corresponds to a record selected in the UI.
  • The array supports both individual and bulk operations.
  • You can iterate through this array and apply logic conditionally based on record fields.

Table Wise Actions

Table Wise Actions are triggered at the table level and receive a single object representing the record or row context.

Main Table Wise Action Input

{
  "Teachers ID": 1,
  "firstName": "Sample",
  "lastName": "Sample",
  "lastName2": "Sample",
  "dateOfBirth": "2026-02-23T12:35:12.808Z",
  "email": "Sample",
  "Roll No": 101,
  "Student Board": "Sample"
}

If customizing Table Wise Actions of a related table

{
  "Teachers ID": 1,
  "firstName": "Sample",
  "lastName": "Sample",
  "lastName2": "Sample",
  "dateOfBirth": "2026-02-23T12:35:12.808Z",
  "email": "Sample",
  "Roll No": 101,
  "Student Board": "Sample",
  "__d3__parentId": 1,
  "__d3__relationId": "ID of the relation"
}

AI BOTs

AI Bot operations use the following structure:

{
  "__d3__newData": {}
}

This behaves similarly to a Create operation and can be processed accordingly within customizeERP.


Popup Message Object in Supista ERP

The popupMsg object is used to display real-time feedback messages to users within the ERP interface.

{
  result: {},
  // Other stuffs...
  popupMsg: {
    type: "message|warning|error",
    message: "This is a message"
  }
}

Fields

FieldTypeDescription
typestringType of the popup. Accepts one of "message", "warning", or "error"
messagestringThe actual user-facing message shown in the popup

Popup Types

TypeVisual StyleDescription
"message"✅ Green/infoIndicates a successful action. Used when operations complete as expected.
"warning"⚠️ YellowUsed for non-critical issues, like partial success or skipped entries.
"error"❌ RedIndicates a failure or critical error. Used when the operation cannot proceed.
Last updated on
Transform Data into Decisions with Supista – Your Intelligent Data Partner
AI-Powered Operational Intelligence for Growing Businesses

Automate your operations. Orchestrate your workflows. Scale with confidence.

Book a free strategy session with our Automation Experts and discover how Supista’s AI-Composable ERP can transform your operations into a scalable and intelligent system.