Shelby Owens
04/02/2026, 4:40 PMCeligo AI
04/02/2026, 4:40 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you're encountering an error because the
entity object you're passing to the mergeEmail method is not being recognized as a valid object. This could be due to a few reasons:
1. Incorrect Entity Type: The type property of the entity object should be one of the following: 'Contact', 'Case', 'Customer', 'Employee', 'Partner', 'Vendor', all transaction types, or all custom records. If you're using 'lead' or 'entity' as the type, it might not be recognized as a valid type.
2. Incorrect Entity ID: The id property of the entity object should be a valid ID of an existing record in your NetSuite account. If the ID does not exist or is not associated with the specified type, it might cause an error.
3. Incorrect Usage of Null Values: If you're not using certain properties in the mergeEmail method, you should omit them instead of setting them to null. According to the conversations, setting unused properties to null might cause an error.
Here's an example of how you might use the mergeEmail method:
javascript
var mergeResult = render.mergeEmail({
templateId: 218,
entity: {
type: 'customer',
id: customerId
}
});
In this example, only the templateId and entity properties are used. The entity object has a type of 'customer' and an id of customerId, which should be a valid ID of a customer record in your NetSuite account.
If you're still encountering the error after checking these points, you might need to use a different method to pass data to your email template. One of the conversations suggests using a TemplateRenderer to add your data.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/02/2026, 4:41 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.878295898
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.866760254
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.861022949
Celigo AI
04/02/2026, 4:41 PMAaron McCausland
04/02/2026, 6:32 PMShelby Owens
04/07/2026, 1:17 PMAaron McCausland
04/16/2026, 3:42 PM