Toggle menu

Notification: GET|POST /http/notification

The notification HTTP method functions as the target for asynchronous notifications from external systems, allowing an existing form session to be updated asynchronously outside of the standard form submit/redirect-from-third-party mechanism.

Parameters

One of fsid and fsn via at least one of the methods below:

NameViaTypeDescription
fsidQuery ParamUUID (str enc.)Value of a query parameter called fsid
fsidQuery Param ValueUUID (str enc.)FSID: 123e4567-e89b-12d3-a456-426655440000
fsidForm FieldUUID (str enc.)Value of a form field called fsid
fsidForm Field ValueUUID (str enc.)FSID: 123e4567-e89b-12d3-a456-426655440000
fsnQuery ParamUUID (str enc.)Value of a query parameter called fsn
fsnQuery Param ValueUUID (str enc.)FSN: 123e4567-e89b-12d3-a456-426655440000
fsnForm FieldUUID (str enc.)Value of a form field called fsn
fsnForm Field ValueUUID (str enc.)FSN: 123e4567-e89b-12d3-a456-426655440000

Skeleton Processor Variables on Notification

Upon invocation with the required parameters any notification skeletons registered via .utilSetNotificationActionExecuteSkeleton will be executed. When executed these notification skeletons have access to the variables below:

NameTypeDescription
Props["NOTIFICATION"]Booleantrue allows easy if ( Props["NOTIFICATION "] ) { ... } checks
Props["NOTIFICATIONQUERYPARAMS"]Map<String,String>Param Name: Value
Props["NOTIFICATIONHEADERS"]Map<String,String>Header Name: Value
Props["NOTIFICATIONFIELDS"]Map<String,List<String>>Field Name: Array of values
Non-null if invoked as a multipart request
Props["REDIRECTBODY"]StringPost request body as a string if non-multipart, null otherwise

An example use case is for a payment API that requires return details of a transaction via an out-of-line asynchronous POST to a notification end point. Typically the post-payment form page will auto submit every n seconds, with its wizard next function checking a variable set by the notification skeleton when the notification is received. When the notification is received the check variable can be set, and the transaction data received can be made available via the form context on the next form page.

This method requires the formSessionId (fsid) and (typically) a formSessionNonce (fsn) to function. The notification method is protected by a nonce value, but if the field type is expecting multiple notifications then this notification checking can be turned off by setting:

Context["_FORMSSERVICE_"].checkNotificationNonce = false;

A provider must be able to return these parameters back to us as either a field value, as a query parameter, or as a value of a query parameter or form field in a certain format. The names of query parameters/fields that may contain both the formSessionId (fsid) and formSessionNonce (fsn) are set in the two worker.conf properties sessionIdWrapperQueryParams and sessionIdWrapperFormFields. They have the format:  "FSID:UUIDVALUE_FSN:UUIDVALUE".

This method will not operate if the "siteforms" iCM maintenance area is offline. The next call to getCommands will return a single RENDER command containing a user friendly message informing the user that site form rendering and submission is currently disabled. 

Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon