User Tools

Site Tools


library_functions

Workflow automation tasks

There are a number of workflow automation tasks you can use in your workflows. Set the CALL=workflow_automation_task attribute in the special treatment box to trigger the automation task for a specific field (usually when the field changes to “Ready”). All the return values listed below must be set up as options in the workflow designer (though they can be set to VISIBLE=NEVER where you only want the automation task to be able to select them).

Required library fields must be identified in your form using LIB=field_name. Input library fields will be used by the automation task for its work, and output library fields will be used to store the results of the task.

The available automation tasks are described below:

CALL=affordability_assessment

  • Summary: Uses national data and income to rate affordability
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer, Error
  • Required input library fields: afford_housing, afford_income_monthly, afford_current_debt, afford_debt_costs_monthly, afford_deps_older, afford_deps_younger
  • Required output library fields: afford_monthly_expenses, afford_monthly_income_net, afford_new_debt_spend_pc_income_net, afford_debt_spend_pc_income, afford_debt_pc_income

CALL=calculate_repayments

  • Summary: Calculates repayment values for the credit agreement
  • Trigger value: Ready
  • Return values: Calculated
  • Required input library fields: loan_amount,loan_term,loan_monthly_interest
  • Required output library fields: repayment_amount,total_repayable,interest_amount,loan_apr,repayment_amount,loan_interest_amount
  • Optional library fields: api_focus_system_interest (required if using FOCUS API),loan_new_amount,loan_current_balance
  • Other behaviour: sets loan_repayment_amount,loan_total_repayable,loan_interest_amount,loan_months,loan_apr,loan_monthly_interest,short_loan_apr,loan_repayment_amount

CALL=calculate_repayments_reverse

  • Summary: Calculates repayment values for the credit agreement to allow repayment amount to be set. CALL=calculate_repayments required before use
  • Trigger value: Reverese Calculate
  • Return values: Calculated
  • Required input library fields: loan_amount,loan_term,loan_monthly_interest,repayment_amount
  • Required output library fields: repayment_amount,total_repayable,interest_amount,loan_apr,repayment_amount,loan_interest_amount
  • Optional library fields: api_focus_system_interest (required if using FOCUS API),loan_new_amount,loan_current_balance
  • Other behaviour: sets loan_repayment_amount,loan_total_repayable,loan_interest_amount,loan_months,loan_apr,loan_monthly_interest,short_loan_apr,loan_repayment_amount

CALL=credit_check

  • Summary: Retrieves a credit score for the application and returns key information (requires CallCredit API)
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer
  • Required library fields: person_last_name
  • Optional library fields: update_credit_check (set to Ready on Pass), person_title, person_first_names, person_dob, abodeno, address_house_number, address_line1, address_line2, address_line3, locality, address_town, address_postcode, person_email
  • Other behaviour: sets cc_raw_result[PDS],cc_html_result[PDS]

CALL=credit_check_dummy

  • Summary: As for credit_check, but returns Pass, Refer or Decline at random for testing purposes

CALL=credit_check_refer

  • Summary: As for credit_check, but saves Pass, Refer or Decline in hidden field cc_action, while returning Refer to workflow

CALL=focus_api_newmemberloan

  • Summary: Calls FOCUS to create new member and loan account
  • Trigger value: Ready
  • Return values: Completed, Error
  • Required input library fields: person_title,person_forenames, person_surname,person_email,person_phone,person_dob,person_nino,address_house_number,address_line1,address_postcode,address_country,loan_amount,repayment_amount,api_focus_system_interest,loan_first_repayment_date,loan_purpose
  • Required output library fields: none

CALL=focus_api_newmember

  • Summary: Calls FOCUS to create new member account
  • Trigger value: Ready
  • Return values: Completed, Error
  • Required input library fields: person_title,person_forenames, person_surname,person_email,person_phone,person_dob,person_nino,address_house_number,address_line1,address_postcode,address_country
  • Required output library fields: none

CALL=focus_api_newloan

  • Summary: Calls FOCUS to create new loan account for existing member
  • Trigger value: Ready
  • Return values: Completed, Error
  • Required input library fields: person_forenames, person_surname,person_member_id,loan_amount,repayment_amount,api_focus_system_interest,loan_first_repayment_date,loan_purpose
  • Required output library fields: none

CALL=id_check

  • Summary: Retrieves an ID&V report for the application and returns key information (requires CallValidate API)
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer
  • Required library fields: person_last_name,person_title, person_first_names, person_dob, address_postcode, person_email
  • Optional library fields: update_id_check (set to Ready on Pass), abodeno, address_house_number, address_line1, address_line2, address_line3, locality, address_town, person_passport_line1, person_passport_line2, person_passport_expiry, person_driving_licence
  • Other behaviour: sets cv_raw_result[PDS],cv_html_result[PDS]

CALL=id_check_refer

  • Summary: As for id_check, but saves Pass, Refer or Decline in hidden field cv_action, while returning Refer to workflow

CALL=bank_check

  • Summary: As for id_check, but also validates sort code and bank account number (requires CallValidate API)
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer
  • Required library fields: person_last_name,person_title, person_first_names, person_dob, address_postcode, person_bank_account_no, person_bank_sort_code
  • Other behaviour: sets cb_raw_result[PDS],cb_html_result[PDS]

CALL=id_bank_check

  • Summary: As for bank_check, but returns both cv_action and cb_action (requires CallValidate API)
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer
  • Required library fields: person_last_name,person_title, person_first_names, person_dob, address_postcode, person_bank_account_no, person_bank_sort_code
  • Other behaviour: sets cb_raw_result[PDS],cb_html_result[PDS],sets cv_raw_result[PDS],cv_html_result[PDS]

CALL=bank_check_refer

  • Summary: As for id_check_bank, but saves Pass, Refer or Decline in hidden field cb_action, while returning Refer to workflow

CALL=set_rate

  • Summary: currently only available as a dummy function returning a random rate value. Selects a monthly interest rate at random from those allowed in the form
  • Trigger value: Ready
  • Return values: x% (where rate existing as an option for the form)
  • Required input library fields: none
  • Optional library fields: update_set_rate (update to Ready if set)

CALL=straight_thru_NI

  • Summary: currently only available as a dummy function returning Pass or Decline at random. Checks the application National Insurance Number against your backoffice system and returns key information if a match is found (requires backoffice API)
  • Trigger value: Ready
  • Return values: Pass, Decline, Refer
  • Required library fields: none
  • Optional library fields: update_straight_thru_NI (set to Ready on Pass)

CALL=lookup_match

  • Summary: match values in the form against a lookup table (stored in a custom form) - optionally read values into the current form
  • Format: CALL=lookup_match:article_id:LIB1,LIB2[:LIBA,LIBB] (eg CALL=lookup_match:123:person_nino,person_last_name (lookup only) or CALL=lookup_match:123:person_nino,person_last_name:person_member_id,person_member_type (lookup and read)
  • Trigger value: Ready
  • Return values: Pass, Fail
  • Required library fields: as defined in function call
  • Optional library fields: update_lookup_match (set to Ready on Pass)

CALL=lookup_nomatch (from v5.1)

  • Identical to lookup_match, but returns Pass when NO match is found and Fail is a match is found
  • Optional library fields: update_lookup_nomatch (set to Ready on Pass)

CALL=check_pdf

  • Summary: check that a PDF file has been correctly created for credit agreements, etc
  • Format: CALL=check_pdf:article_id (eg CALL=check_pdf:123 where 123 is the credit agreement PDF form template ID)
  • Trigger value: Agreed
  • Return values: PDF OK, PDF Failed
  • Required library fields: none
  • Optional library fields: none
library_functions.txt · Last modified: 2023/04/27 11:44 by andrewbreese