Salesforce Trigger
Seamlessly integrate Salesforce with your favorite APIs, databases, and programming languages, using WayScript.
Run your script when a Salesforce object is created or updated.
To create, edit, and query Salesforce objects, use the Salesforce module.

​
βš™
Setup

When you drag in a Salesforce Trigger for the first time, follow the prompt to authorize access.

​
πŸ”‘
API Access

First make sure you have API access enabled in Salesforce. To do this, follow these instructions.

​
New Object Created

Select New Object Created Mode
Your script will run when a new Salesforce object is created.

​
🌟
New Account

Select New Account Mode
Your script will run when a new account is created.

​
πŸ“€
Outputs

1
Account = {
2
id : String,
3
name : String,
4
parent_id : String,
5
number : String,
6
site : String,
7
type : String,
8
industry : String,
9
annual_rev : Number,
10
rating : String,
11
phone : String,
12
fax : String,
13
website : String,
14
ticker : String,
15
ownership : String,
16
employees : String,
17
sic_code : String,
18
billing_street : String,
19
billing_city : String,
20
billing_state : String,
21
billing_zip : String,
22
billing_country : String,
23
shipping_street : String,
24
shipping_city : String,
25
shipping_state : String,
26
shipping_zip : String,
27
shipping_country : String,
28
description : String
29
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ“ˆ
New Campaign

Select New Campaign Mode
Your script will run when a new campaign is created.

​
πŸ“€
Outputs

1
Campaign = {
2
id : String,
3
name : String,
4
active : String,
5
type : String,
6
status : String,
7
start_date : Date,
8
end_date : Date,
9
expected_rev : Number,
10
budgeted_cost : Number,
11
actual_cost : Number,
12
expected_response : Number,
13
num_sent : Number,
14
parent_id : String,
15
description : String
16
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ’Ό
New Case

Select New Case Mode
Your script will run when a new case is created.

​
πŸ“€
Outputs

1
Case = {
2
id : String,
3
subject : String,
4
status : String,
5
origin : String,
6
contact : String,
7
account_id : String,
8
type : String,
9
reason : String,
10
priority : String,
11
web_email : String,
12
web_name : String,
13
web_company : String,
14
web_phone : String,
15
description : String
16
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ‘€
New Contact

Select New Contact Mode
Your script will run when a new contact is created.

​
πŸ“€
Outputs

1
Contact = {
2
id : String,
3
name : String,
4
salutation : String,
5
acct_id : String,
6
title : String,
7
department : String,
8
birthdate : Date,
9
reports_to : String,
10
lead_source : String,
11
phone : String,
12
home_phone : String,
13
mobile : String,
14
other_phone : String,
15
fax : String,
16
email : String,
17
asst_name : String,
18
asst_phone : String,
19
mailing_street : String,
20
mailing_city : String,
21
mailing_state : String,
22
mailing_zip : String,
23
mailing_country : String,
24
other_street : String,
25
other_city : String,
26
other_state : String,
27
other_zip : String,
28
other_country : String,
29
description : String
30
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ—“
New Event

Select New Event Mode
Your script will run when a new event is created.

​
πŸ“€
Outputs

1
Event = {
2
id : String,
3
subject : String,
4
all_day : String,
5
start : DateType,
6
end : DateType,
7
location : String,
8
name_id : String,
9
related_to : String,
10
description : String
11
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ•΅
New Lead

Select New Lead Mode
Your script will run when a new lead is created.

​
πŸ“€
Outputs

1
Lead = {
2
id : String,
3
name : String,
4
salutation : String,
5
status : String,
6
company : String,
7
title : String,
8
source : String,
9
industry : String,
10
annual_rev : Number,
11
phone : String,
12
mobile : String,
13
fax : String,
14
email : String,
15
website : String,
16
rating : String,
17
employees : Int,
18
street : String,
19
city : String,
20
state : String,
21
zip : String,
22
country : String,
23
description : String
24
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ—’
New Note

Select New Note Mode
Your script will run when a new note is created.

​
πŸ“€
Outputs

1
Note = {
2
id : String,
3
title : String,
4
body : String,
5
is_private : String,
6
parent_id : String
7
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
✨
New Opportunity

Select New Opportunity Mode
Your script will run when a new opportunity is created.

​
πŸ“€
Outputs

1
Opportunity = {
2
id : String,
3
is_private : String,
4
name : String,
5
close_date : Date,
6
stage : String,
7
account_id : String,
8
type : String,
9
lead_source : String,
10
amount : Number,
11
next_step : String,
12
probability : Number,
13
campaign_id : String,
14
description : String
15
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ“‹
New Task

Select New Task Mode
Your script will run when a new task is created.

​
πŸ“€
Outputs

1
Task = {
2
id : String,
3
subject : String,
4
due_date : Date,
5
priority : String,
6
status : String,
7
name_id : String,
8
related_to : String,
9
description : String
10
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
Object Updated

Select Object Updated Mode
Your script will run when a Salesforce object is updated.

​
πŸ“ˆ
Campaign Updated

Select Campaign Updated Mode
Your script will run when a campaign is updated.

​
πŸ“€
Outputs

1
Campaign = {
2
id : String,
3
name : String,
4
active : String,
5
type : String,
6
status : String,
7
start_date : Date,
8
end_date : Date,
9
expected_rev : Number,
10
budgeted_cost : Number,
11
actual_cost : Number,
12
expected_response : Number,
13
num_sent : Number,
14
parent_id : String,
15
description : String
16
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ’Ό
Case Updated

Select Case Updated Mode
Your script will run when a case is updated.

​
πŸ“€
Outputs

1
Case = {
2
id : String,
3
subject : String,
4
status : String,
5
origin : String,
6
contact : String,
7
account_id : String,
8
type : String,
9
reason : String,
10
priority : String,
11
web_email : String,
12
web_name : String,
13
web_company : String,
14
web_phone : String,
15
description : String
16
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ•΅
Lead Updated

Select Lead Updated Mode
Your script will run when a lead is updated.

​
πŸ“€
Outputs

1
Lead = {
2
id : String,
3
name : String,
4
salutation : String,
5
status : String,
6
company : String,
7
title : String,
8
source : String,
9
industry : String,
10
annual_rev : Number,
11
phone : String,
12
mobile : String,
13
fax : String,
14
email : String,
15
website : String,
16
rating : String,
17
employees : Int,
18
street : String,
19
city : String,
20
state : String,
21
zip : String,
22
country : String,
23
description : String
24
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
✨
Opportunity Updated

Select Opportunity Updated Mode
Your script will run when an opportunity is updated.

​
πŸ“€
Outputs

1
Opportunity = {
2
id : String,
3
is_private : String,
4
name : String,
5
close_date : Date,
6
stage : String,
7
account_id : String,
8
type : String,
9
lead_source : String,
10
amount : Number,
11
next_step : String,
12
probability : Number,
13
campaign_id : String,
14
description : String
15
}
Copied!
  • JSON Data
    • Raw JSON data received from the API

​
πŸ“‹
Task Updated

Select Task Updated Mode
Your script will run when a task is updated.

​
πŸ“€
Outputs

1
Task = {
2
id : String,
3
subject : String,
4
due_date : Date,
5
priority : String,
6
status : String,
7
name_id : String,
8
related_to : String,
9
description : String
10
}
Copied!
  • JSON Data
    • Raw JSON data received from the API
Last modified 11mo ago