Details Automation Script
The details automation script provides the inputs for the pass-code generation and the available tokens for the pass-code message and authorization page templates. The script output must include a JSON object called operation, containing keys for the operationDetails (the components that will be used to generate the pass-code) and operationInfo (the components that will be available as tokens for the pass-code message and authorization page templates).
For example:
Copy
setAdminMode(true);
var E = server.query.getAlias('myPayment');
var rows = server.query.from('myPayment', E)
.where(E.myPaymentId.equals(context.Data.recordId))
.selectColumns(E.Payeename, E.PaymentAmount, E.DestIBAN, E.SourceIBAN)
.executeAndMapComplex({ entity: E});
log("Rows = ");
log(rows);
var operation =
{
operationDetails: {
paymentAmount: rows[0].entity.PaymentAmount,
sourceIBAN: rows[0].entity.SourceIBAN,
payeename: rows[0].entity.Payeename,
destIBAN: rows[0].entity.DestIBAN
},
operationInfo: {
paymentAmount: rows[0].entity.PaymentAmount,
sourceIBAN: rows[0].entity.SourceIBAN,
payeename: rows[0].entity.Payeename,
destIBAN: rows[0].entity.DestIBAN
}
];
setData(operation);