Create data
Function: Create data
This action allows you to add a new record to your built-in NoCode-X database. You specify which type of data you want to create (its "Data schema") and then provide the actual information (the "Body") for that new record. Once created, the platform will give you a unique ID for this new record.
Input
- Data schema (DATA_FORMAT): This is required. It tells the system what kind of data you are creating. Think of it like choosing a form template (e.g., "Customer Profile," "Product Listing," "Order Details"). The structure of the data you provide in the 'Body' must match this schema.
- Body (OBJECT): This is required. This is where you provide the actual information for your new record. It's a collection of fields and their values, like filling out the form you selected with the 'Data schema'. For example, if your schema is "Customer Profile," the body might contain fields like "Name," "Email," and "Phone Number" with their respective values. The fields and their types must match the chosen 'Data schema'.
Output
- Data id (STRING): The unique identifier generated by the system for the newly created data record. This ID is stored in a variable (by default,
CREATED_DATA_ID) that you can then use in subsequent actions to reference this specific record.
Execution Flow
Real-Life Examples
-
Creating a New Customer Record:
- Inputs:
- Data schema:
Customer - Body:
\{
"FirstName": "Alice",
"LastName": "Smith",
"Email": "[email protected]",
"PhoneNumber": "555-1234"
\}
- Data schema:
- Result: A new customer record is added to your database. The unique ID for this new customer (e.g.,
cust_001) is stored in theCREATED_DATA_IDvariable.
- Inputs:
-
Adding a New Product to Inventory:
- Inputs:
- Data schema:
Product - Body:
\{
"ProductName": "Wireless Headphones",
"SKU": "WH-2023-001",
"Price": 99.99,
"StockQuantity": 150,
"Category": "Electronics"
\}
- Data schema:
- Result: A new product entry is created in your inventory. The unique product ID (e.g.,
prod_abc) is saved in theCREATED_DATA_IDvariable.
- Inputs:
-
Submitting a Support Ticket:
- Inputs:
- Data schema:
SupportTicket - Body:
\{
"Subject": "Login Issue",
"Description": "Cannot log in to my account after password reset.",
"RequesterEmail": "[email protected]",
"Priority": "High",
"Status": "New"
\}
- Data schema:
- Result: A new support ticket is logged in your system. The unique ticket ID (e.g.,
ticket_456) is available in theCREATED_DATA_IDvariable for further processing.
- Inputs: