{
“trigger”: {
“app”: “salesforce”,
“event”: “new_or_updated_record”,
“object”: “Account”
},
“actions”: [
{
“app”: “netsuite”,
“action”: “search_record”,
“object”: “customer”,
“filters”: {
“email”: “{{trigger.email}}”
}
},
{
“if”: {
“condition”: “customer_found”
},
“then”: {
“app”: “netsuite”,
“action”: “update_record”,
“object”: “customer”,
“record_id”: “{{customer.id}}”,
“fields”: {
“companyname”: “{{trigger.Account_Name}}”,
“phone”: “{{trigger.Phone}}”
}
}
},
{
“else”: {
“app”: “netsuite”,
“action”: “create_record”,
“object”: “customer”,
“fields”: {
“companyname”: “{{trigger.Account_Name}}”,
“email”: “{{trigger.Email}}”,
“phone”: “{{trigger.Phone}}”
}
}
}
]
}