LogoLogo
AboutSupport
2.2
2.2
  • Unifi Documentation
  • Release
    • Release Notes
      • 2.1 Release Notes
      • 2.0 Release Notes
    • Hotfixes
    • Setup
  • Overview
    • Quick Tour
    • Supported Features
    • Application Module Overview
  • Integration Guides
    • Outbound Incident Guide
      • Getting Started
      • Process
      • Integration
      • Connection
      • Trigger
      • Create Scenario
        • CreateIncidentResponse Message
        • CreateIncidentResponse Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Test CreateIncident
      • Update Scenario
        • Response Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Conclusion
    • Bidirectional Asynchronous Incident Guide
      • Getting Started
      • Process
      • Web Service
      • Integration
      • Connection
      • Trigger
      • Create Scenario
        • Response Message
        • CreateIncidentReceipt Message
        • CreateIncidentReceipt Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Test CreateIncident
      • Update Scenario
        • Receipt Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Build the Other Half
        • Move the Integration
        • Reconfigure the Connections
      • Conclusion
    • Incident Update Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Message
        • UpdateIncidentInbound Message
        • UpdateIncidentInbound Fields
      • Message Identification
      • Bond Identification
        • Edit Incident Form
        • Edit CreateIncident Message
      • Test Update Poll
      • Conclusion
    • Incident Multiple Message Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Messages
        • ResolveIncidentInbound Message
        • ResolveIncidentInbound Fields
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Create Poller Guide
      • Polling
        • Connection Variables
        • Poll Processor
        • Poller
      • Messages
        • CreateIncidentInboundReceipt Message
        • CreateIncidentInboundReceipt Fields
        • CreateIncidentInbound Message
        • CreateIncidentInbound Fields
      • Build - Integration Level
      • Test Create Poll
      • Conclusion
    • Incident Parent and Child Poller Guide
      • Polling
        • Connection Variables
        • Child Poll Processor
        • Child Poller
        • Parent Poll Processor
        • Parent Poller
      • Inbound Messages
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Attachment Poller Guide
      • Polling
        • Connection Variables
        • Edit Endpoint URLs
        • Get Attachment Poll Processor
        • Get Attachment Poller
        • Select Attachments Poll Processor
        • Select Attachments Poller
        • Edit Child Poll Processor
        • Edit Child Update Poller
      • Messages
        • AddAttachmentInbound Message
      • Testing
        • Test Outbound Scenarios
        • Test CreateIncidentInbound
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
        • Test AddAttachmentInbound
      • Conclusion
  • Feature Guides
    • Packager Feature Guide
      • Instructions
    • Error Handling Tools Feature Guide
      • Retry
      • Replay
      • Ignore
      • Repair
      • Pause and Resume
  • Bonding
    • Bonds
    • Bonded Attachments
  • Transport
    • Transport Data Flow
    • Transactions
    • Stages
    • HTTP Requests
    • Response Actions
  • Configuration
    • Processes
    • Integrations
    • Connections
    • Messages
    • Message Scripts
    • Fields
    • Field Maps
    • Event Actions
  • Polling
    • Pollers
    • Poll Processors
    • Poll Requests
    • Large Response Payloads
  • Administration
    • Activity Logs
    • Data Stores
    • Properties
    • Scheduled Scripts
    • System Logs
    • Self-test
  • Scripting
    • Variables
    • Snippets
  • Attachments
    • Attachment Handling
    • Multipart Form Data
Powered by GitBook
On this page
  • Business Rule Fields
  • When to run Fields
  • Advanced Fields

Was this helpful?

Export as PDF
  1. Integration Guides
  2. Bidirectional Asynchronous Incident Guide

Trigger

The Trigger is a Business Rule which stipulates the conditions under which Messages will be sent for the Process concerned.

PreviousConnectionNextCreate Scenario

Last updated 4 years ago

Was this helpful?

Business Rule Fields

When configuring a Trigger (Business Rule) on a table to be integrated, make sure one doesn’t exist already. If you have more than one, you will make duplicate updates.

In the native ServiceNow window, navigate to System Definition > Business Rules. Click New.

The Business Rule fields to be configured are as follows:

#

Field

Description

Value

1

Name

The name of the business rule.

<Your Name>

2

Table

The table that this business rule will run on.

‘Incident’ [incident]

3

Active

Set to true to enable this business rule.

<true>

4

Advanced

Set to true to reveal the advanced version o the form.

<true>

The top section of your Business Rule record should look like this:

When to run Fields

Click on the 'When to run' tab and configure the fields as follows:

#

Field

Description

Value

5

When

When this business rule should execute relative to the database operation.

'before'

6

Insert

Select this check box to execute the business rule when a record is inserted into the database.

<true>

7

Update

Select this check box to execute the business rule when a record is update.

<true>

8

Order

The sequence in which this business rule should run.

'1,000,000,000'

Your 'When to run' tab should look like this:

Advanced Fields

Click on the 'Advanced' tab and configure the fields as follows:

#

Field

Description

Value

9

Script*

The script to run.

Replace the entire contents of the script field with your business rule code, substituting the name of your business rule (see below). E.g. 'Business rule: Unifi Incident trigger'

*Script:

The code in the script field should look like this:

(function executeRule(current, previous /*null when async*/) {

    x_snd_eb.snd_console.execute('Business rule: Unifi Incident trigger', function () {
        x_snd_eb.ActivityLog.setDocument(current, current.getTableName());
        x_snd_eb.Message.processOutbound(current);
    });

})(current, previous);

Your 'Advanced' tab should look like this:

10) Click Submit.

The main elements are now in place for our Integration to work. We are now ready to configure and test each of our Scenarios in turn.