Action: Create a Customer
Netsuite Operation
Last updated
{
"handle": "create-customer",
"state": "inDev",
"meta": {
"short": "Create Customer",
"description": "Creates a new customer in NetSuite."
},
"input": [
{
"name": "companyName",
"type": "String",
"required": true,
"meta": {
"description": "The name of the company."
}
},
{
"name": "firstName",
"type": "String",
"required": false,
"meta": {
"description": "The first name of the contact."
}
},
{
"name": "lastName",
"type": "String",
"required": false,
"meta": {
"description": "The last name of the contact."
}
},
{
"name": "email",
"type": "String",
"required": true,
"meta": {
"description": "The email address of the contact."
}
},
{
"name": "phone",
"type": "String",
"required": false,
"meta": {
"description": "The phone number of the contact."
}
}
],
"output": [
{
"name": "customerId",
"type": "String",
"selector": ["id"],
"meta": {
"description": "The ID of the created customer."
}
},
{
"name": "status",
"type": "String",
"selector": ["status"],
"meta": {
"description": "The status of the operation."
}
}
],
"steps": [
{
"type": "http",
"http": {
"method": "POST",
"path": "/services/rest/record/v1/customer",
"headers": {
"Content-Type": "application/json"
},
"bodyTemplate": {
"value": "{\"companyName\": \"{{companyName}}\", \"firstName\": \"{{firstName}}\", \"lastName\": \"{{lastName}}\", \"email\": \"{{email}}\", \"phone\": \"{{phone}}\"}",
"placeholders": [
{
"name": "accessToken",
"type": "String",
"description": "The access token for NetSuite API.",
"required": true
},
{
"name": "companyName",
"type": "String",
"description": "The name of the company.",
"required": true
},
{
"name": "firstName",
"type": "String",
"description": "The first name of the contact.",
"required": false
},
{
"name": "lastName",
"type": "String",
"description": "The last name of the contact.",
"required": false
},
{
"name": "email",
"type": "String",
"description": "The email address of the contact.",
"required": true
},
{
"name": "phone",
"type": "String",
"description": "The phone number of the contact.",
"required": false
}
]
}
}
}
]
}