Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt

Use this file to discover all available pages before exploring further.

Context is a global object that exposes transaction data to your Custom activity script, lets you send HTTP requests, log custom messages, and retrieve tenant secrets.

Properties

NameTypeAccessDescription
TransactionTransactionRead-onlyThe Transaction object, providing access to the current transaction and all its documents.
ErrorMessagestringRead-writeCustom error message. The text appears in the Transaction Event Log in Skill Monitor.
Assigning a value to ErrorMessage interrupts the transaction.

Deprecated properties

The InputData and OutputData properties are deprecated. Use Transaction.Documents instead.
NameTypeAccessDescription
InputDataTransaction.DocumentsRead-onlyDocument data during skill execution.
OutputDataTransaction.DocumentsRead-onlyModified document data. Not available for External Export.

Methods

CreateMultipartFormDataRequest

MultipartFormDataRequest CreateMultipartFormDataRequest();
Returns a MultipartFormDataRequest object for sending data as a form containing strings and files (multipart/form-data).

CreateHttpRequest

HttpRequest CreateHttpRequest();
Returns an HttpRequest object for sending a string, file, source image, or a simple URL-form-encoded form. This form cannot contain files.

LogMessage

void LogMessage(string msg);
Writes a custom message to the Transaction Event Log.

GetSecret

string GetSecret(string secretName);
Returns the value of a tenant environment variable of type secret. Use this method to pass tokens to third-party services without hardcoding them in your script.
To list secrets available in your tenant, start typing Context.GetSecret( in the script editor and press Ctrl + Space while your cursor is inside the parentheses.
If the variable name contains reserved characters (" or ,), escape them with a backslash in the method call. Only users with the Tenant Administrator role can create, edit, or delete environment variables. For details, see Manage environment variables.

Custom activity

Extend skills with scripted logic and third-party integrations.

Object model

Full JavaScript object reference for Custom activity scripts.

Transaction

The current transaction and access to all of its documents.

Manage environment variables

Store tenant-level secrets passed to Custom and Output activities.

Sample scripts

JavaScript samples for common Custom activity scenarios.