Supista
Contact Us
documentation
Supista ERP
Samples
Email Template

Email Template Code

This allows you to make changes or modifications to the email data before sending it.

You can customize the data, format, or structure as needed to meet specific requirements.

For AI-based email customization and intelligent processing, see:
AI Operations


Sample Implementation

async function customizeERP(userData, apiOperations) {
  const tableName = "Sales Orders Table";
 
  let recipients = {
    to: ["examples@domain.com"]
  };
 
  if (userData && userData.length > 0) {
    const returnData = await Promise.all(
      userData.map(async (row) => {
        // Your Code Starts Here
      })
    );
 
    return {
      data: returnData,
      recipients: recipients
    };
  }
}

Output structure

{
  "data": {
    "count": 1,
    "rows": [
      {
        "id": 1,
        "columnName1": "columnValue1",
        "columnName2": "columnValue2",
        "columnName3": "columnValue3"
      }
    ]
  },
  "recipients": {
    "to": []
  }
}
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.