transactionTemplate.save
Purpose:
Create a new transaction request template, containing a defined request type and set of request options, that Lender administrators can associate with a 1-click/automated ordering business condition set.
Sample Usage:
// Request template gathered from user selection
let transactionTemplate = {
name: 'TEMPLATE_NAME',
request: {
type: 'NEW_REQUEST',
options: {
stringOption: 'SOME_VALUE',
booleanOption: true,
numericOption: 1000
}
}
}
async function createTransactionTemplate(transactionTemplate) {
try {
const transactionTemplateObject = await elli.script.getObject('transactionTemplate')
const transactionTemplateSuccess = await transactionTemplateObject.save(transactionTemplate)
console.log(transactionTemplateSuccess)
} catch (error) {
console.log({error})
}
}
createTransactionTemplate(transactionTemplate)
// Request template gathered from user selection
let transactionTemplate = {
request: {
type: 'NEW_REQUEST',
options: {
stringOption: 'SOME_VALUE',
booleanOption: true,
numericOption: 1000
}
}
}
elli.script.getObject('transactionTemplate')
.then(
(transactionTemplateObject) => {
transactionTemplateObject.save(transactionTemplate)
.then(
(transactionTemplateSuccess) => {
console.log(transactionTemplateSuccess)
}
)
.catch(
(error) => {
console.log({error})
}
)
}
)
.catch(
(error) => {
console.log(error)
}
)
Interface:
Input:
Type: Object
{
name: 'TEMPLATE_NAME',
request: {
type: 'SUPPORTED_REQUEST_TYPE',
options: {
stringOption: 'SOME_VALUE',
booleanOption: true,
numericOption: 1000
}
}
}
Attribute | Description |
|---|---|
`$.name`
|
The listing If a template name is not provided here - an auto-generated name is assigned - following a format of |
`$.request.type`
|
The |
`$.request.options`
|
The set of selectable options that apply to the specific type of transaction request, as modeled by your application, being templated by the Lender administrator. This can be used to select from which bureaus to order a borrower's credit score for a Credit integration, or how many days of income information to pull for a borrower in the case of a Verification of Income/Employment integration. |
Returns:
Type: Promise
==> Resolved:
"success"
==> Rejected:
An error is raised, containing a message attribute with details on the error that occurred
{
message: "{{ERROR_DETAILS}}"
}
Not able to retrieve this object?
Remember, the
transactionTemplateobject is only accessible to the administrator-facing view of a Partner application, registered as the$.adminInterfaceUrlproperty in the product configuration. This object encapsulates functionality that is only relevant for products that support 1-click/automated ordering workflows (as specified by the$.tags.workflowstag in the product configuration), and is only applicable when an administrator is trying to create a 1-click/automated service ordering setup in the Web Version of Encompass Services Management section.This object is therefore not accessible to an integration's service ordering view, (registered as the
$.interfaceUrlproperty in the product configuration), wherein thetransactionandapplicationobjects are available for use as applicable.
Common Error Scenarios!
- You used a
$.request.typethat is not configured to be supported by your application
Updated about 24 hours ago

