Here you will find a description of the variables that are available to you when scripting in Unifi.
The Endpoint URL will be combined with the Path value on the Message.
The Path will be combined with the Endpoint URL value on the active connection.
These variables are also available in the 'Advanced condition' script for the Outbound Trigger.
During operation, Stage to Target Message Script variables will apply.
During operation, Source to Stage Message Script variables will apply.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.