# Global Utility

Unifi has some functionality that requires access to methods not available to scoped applications. We grant Unifi access to those methods through a single global utility Script Include which you can install via Update Set.

It is strongly advised that you install this utility to get the most out of Unifi.

1. Download Unifi Global Utility 3.1
2. Import the file as an update set, then preview and commit it. You can find more information on how to [Load customizations from a single XML file](https://docs.servicenow.com/bundle/quebec-application-development/page/build/system-update-sets/task/t_SaveAnUpdateSetAsAnXMLFile.html#t_SaveAnUpdateSetAsAnXMLFile) in the ServiceNow Product Documentation.

{% file src="/files/-MlGrWPy4DH\_dADqpydf" %}

## Dependent Features <a href="#features" id="features"></a>

### Moving Attachments <a href="#moving-attachments" id="moving-attachments"></a>

Method: `snd_eb_util.moveAttachments`

The ServiceNow scoped attachment API does not support moving attachments from one record to another. This is necessary for inbound attachments which initially reside on the HTTP Request and are then moved to the Target record.

### Jelly Processing <a href="#jelly-processing" id="jelly-processing"></a>

Method: `snd_eb_util.runJelly`

Jelly processing is not supported in the ServiceNow scoped API’s, however it is very useful for XML processing. Use of the Global Utility drastically improves XML payload capabilities if you are working with XML payloads.

### SOAP Response Element <a href="#soap-response-element" id="soap-response-element"></a>

Method: `snd_eb_util.getSoapResponseElement`

When working with Scripted SOAP Services, it’s important to be able to set the soapResponseElement directly in order to preserve the exact payload to be sent back to the calling system. This can only be done with the Global Utility.

### Binary Attachment Handling <a href="#binary-attachment-handling" id="binary-attachment-handling"></a>

Method: `snd_eb_util.writeAttachment`

The Scoped Attachment API does not support writing binary attachments which can cause problems when receiving things like Word documents or PDF’s. This method allows Unifi to use the global attachment API to write those files to the database meaning they will work properly.

### Update Set Packaging <a href="#update-set-packaging" id="update-set-packaging"></a>

Method: `snd_eb_util.packager.*`

The packager methods included in the global utility allow Unifi to automatically export all the components of an integration in one easy step. The packager methods will allow Unifi to create an update set for the integration, add all the configuration records to that update set, and export it as a file download from the Integration page on the Unifi Integration Designer portal.

### Web Service Creation

Method: `snd_eb_util.web_service`

The web service methods included in the global utility allow Unifi to automatically create and update REST Methods.

### Trigger (Business Rule) Creation

Method: `snd_eb_util.trigger_rule`

The trigger methods included in the global utility allow Unifi to automatically create a Trigger Business Rule on a table if one doesn't already exist.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharelogic.com/unifi/3.1/release/global-utility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
