how to write buisness rule for incident creation from inbound action caller_id is user table should
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2023 07:21 AM
how to write buisness rule for active users to incident creation from inbound actions.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2023 07:30 AM
Hello @AJAYKUMAR G
current.caller_id = gs.getUserID();
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.category = "request";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high")
current.priority = 1;
}
if (email.body.priority != undefined)
current.priority = email.body.priority;
current.insert();
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2024 10:58 PM
Hello @AJAYKUMAR G ,
Go through inbound email actions and create new one give table name "incident".
Then give condition state is new
then go to event and create one event -
In Business Rule write down that script -
if (current.state == 3) {
//Your inbound code here
}
if (current.active == false) {
// Activate a ticket is closed event if active is false (closed)
gs.eventQueue("ticket.open", current, current.state, previous.state);
}