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
  • Integration
  • Identify message script
  • Add note script
  • Connection
  • Endpoint URL
  • Message
  • XML Template
  • Path
  • Outbound condition
  • Reference lookup script
  • Extract attachments script
  • Message Script
  • Source to Stage (Outbound)
  • Stage to Request (Outbound)
  • Payload to Stage (Inbound)
  • Stage to Target (Inbound)
  • Field
  • Default inbound
  • Default outbound
  • Field Map
  • All Mapping Scripts (Build phase only)
  • Response Action
  • Event Action

Was this helpful?

Export as PDF
  1. Scripting

Variables

Here you will find a description of the variables that are available to you when scripting in Unifi.

Integration

Identify message script

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

payload

Any

The payload string or object. Pre-processing can be configued on the Integration to automatically convert JSON to Object or XML to XMLDocument2.

headers

Object

An object containing the request headers.

variables

Object

Object used to contain Connection Variables.

Add note script

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

payload

Any

The payload string or object. Pre-processing can be configued on the Integration to automatically convert JSON to Object or XML to XMLDocument2.

headers

Object

An object containing the request headers.

variables

Object

Object used to contain Connection Variables.

Connection

Endpoint URL

The Endpoint URL will be combined with the Path value on the Message.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

scratchpad

Object

An object that can be used to pass variables between scripts.

variables

Object

Object used to contain Connection Variables.

Message

XML Template

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

scratchpad

Object

An object that can be used to pass variables between scripts.

variables

Object

Object used to contain Connection Variables.

Path

The Path will be combined with the Endpoint URL value on the active connection.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

scratchpad

Object

An object that can be used to pass variables between scripts.

variables

Object

Object used to contain Connection Variables.

Outbound condition

These variables are also available in the 'Advanced condition' script for the Outbound Trigger.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

variables

Object

Object used to contain Connection Variables.

current

GlideRecord

The record that triggers the message. The actual table will differ between Processes.

Reference lookup script

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

answer

Any

The result of the script being called.

message

GlideRecord

The record of the Message being used.

request

GlideRecord

The record of the HTTP Request [x_snd_eb_http_request] being used.

payload

Any

The payload string or object. Pre-processing can be configued on the Integration to automatically convert JSON to Object or XML to XMLDocument2.

variables

Object

Object used to contain Connection Variables.

Extract attachments script

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

request

GlideRecord

The record of the HTTP Request [x_snd_eb_http_request] being used.

payload

Any

The payload string or object. Pre-processing can be configued on the Integration to automatically convert JSON to Object or XML to XMLDocument2.

variables

Object

Object used to contain Connection Variables.

Message Script

Source to Stage (Outbound)

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

source

GlideRecord

The record that is being integrated.

variables

Object

Object used to contain Connection Variables.

Stage to Request (Outbound)

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

scratchpad

Object

An object that can be used to pass variables between scripts.

variables

Object

Object used to contain Connection Variables.

Payload to Stage (Inbound)

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

payload

Any

The payload string or object. Pre-processing can be configued on the Integration to automatically convert JSON to Object or XML to XMLDocument2.

variables

Object

Object used to contain Connection Variables.

Stage to Target (Inbound)

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

target

GlideRecord

The record that is being integrated.

variables

Object

Object used to contain Connection Variables.

Field

Default inbound

During operation, Stage to Target Message Script variables will apply.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

target

GlideRecord

The record that is being integrated.

variables

Object

Object used to contain Connection Variables.

Default outbound

During operation, Source to Stage Message Script variables will apply.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

message

GlideRecord

The record of the Message being used.

stage

GlideRecord

The record of the Stage [x_snd_eb_stage] being used. The actual table will differ between Processes.

$stage

Object

The dynamic stage object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

source

GlideRecord

The record that is being integrated.

variables

Object

Object used to contain Connection Variables.

Field Map

All Mapping Scripts (Build phase only)

Only code contained within dollar-square brackets $[...] will be compiled. During operation, Message Script variables will apply.

Variable

Type

Description

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

error

String

The error message to return from the script. Alternatively you can simply throw a string or Error and the system will take care of it.

field

GlideRecord

The record of the Field being compiled.

$stage

Object

The dynamic stage object.

variables

Object

Object used to contain Connection Variables.

Response Action

Variable

Type

Description

action

GlideRecord

The current Response Action [x_snd_eb_response_action] GlideRecord.

bond

Bond

The record of the Bond [x_snd_eb_bond] being used.

integration

GlideRecord

The record of the Integration [x_snd_eb_integration] being used.

message

GlideRecord

The record of the Message being used.

request

GlideRecord

The record of the HTTP Request [x_snd_eb_http_request] being used.

response_payload

Any

A pre-processed payload string or object.

transaction

GlideRecord

The record of the Transaction [x_snd_eb_transaction] being used.

log

Object

Object containing several functions that can be used for logging. info, warn, error and debug.

variables

Object

Object used to contain Connection Variables.

Event Action

Variable

Type

Description

current

GlideRecord

The record of the Transaction [x_snd_eb_transaction] that triggered the event.

action

GlideRecord

The current Event Action [x_snd_eb_event_action] GlideRecord.

PreviousSelf-testNextSnippets

Last updated 4 years ago

Was this helpful?