Loan editor

A Partners can now enable lenders to navigate to Encompass standard forms without closing the partner integration UI. This can be done using using the new Java Script Library action launchLoanEditor

Launching loan editor

applicationObj.performAction("launchLoanEditor")

This action is supported only on Encompass SmartClient. When called a model window will open like the one below.

User could do loan updates through the loan editor and save them. Should that happen, partner integration would be notified when the user closes the loan editor. Partner integration will be notified using the Java Script Library new loan.committed event.

Partner integration should subscribe to the loan.committed if they need to know if user made loan changes through loan editor or not. loan.committed event will only indicate there was a change or not; it will not have content nor data.

Code examples

import host from '@elliemae/em-ssf-guest';

async function subscribeLoanCommitted(callbackFn) {
  try {
    const loan = await host.getObject('loan');
    const loanCommmittedToken = loan.committed.subscribe(callbackFn);
    return loanCommmittedToken;
  } catch (error) {
    console.log({ error });
  }
}

async function unsubscribeLoanCommitted(loanCommmittedToken) {
  try {
    const loan = await host.getObject('loan');
    if (loanCommmittedToken) {
      loan.committed.unsubscribe(loanCommmittedToken);
    }
  } catch (error) {
    console.log({ error });
  }
}

async function launchLoanEditor(options) {
  try {
    const actionName = 'launchLoanEditor';
    const applicationObject = await host.getObject('application');
    const capabilities = await applicationObject.getCapabilities();
    const supportedActions = capabilities.supportedActions;
    if (supportedActions.includes(actionName)) {
      await applicationObject.performAction(actionName, options);
    }
  } catch (error) {
    console.log({ error });
  }
}

function loanCommmittedListener(event) {
  console.log('Loan Committed event received', event);
}

// subscribe to loan.committed event
let loanCommmittedToken = await subscribeLoanCommitted(loanCommmittedListener);

// first launching example
await launchLoanEditor();

// second launching example
await launchLoanEditor({"fields":["4000","2", "3", "4"]});

// third launching example
await launchLoanEditor({"fields":["4000","2", "3", "4"],"landingPage":"1003 URLA Part 3"});

// forth launching example
await launchLoanEditor({"fields":["4000","2"],"landingPage":"VA Management"});

// unsubscribe from loan.committed event
await unsubscribeLoanCommitted(loanCommmittedToken);


Customizing loan editor

Below is the default loan editor experience resulting from just calling the action without request payload.

applicationObj.performAction("launchLoanEditor")

Partner integration can customize the loan editor user experience. You can specify list of fields that you want lender user to focus and/or a specific Encompass form you want the editor to land on:

applicationObj.performAction("launchLoanEditor", {"fields":["4000","2","CUST08FV","CX.LoanEditor", "ABC"],"landingPage":"1003 URLA Part 1"})

This will result on loan editor launched like below. Notice the top Go To Fields section. Notice also that the editor land on the specified landingPage form by default and it is selected already on the left Forms list.

Clicking on field Id in the top section will navigate the loan editor to the form containing that field. Invalid fields will not throw errors but will not navigate anywhere either.