User Tools

Site Tools


special_treatment

This is an old revision of the document!


Special Treatment

Output fields

The special treatment field in article segments for text segments allows you to select different display formats.

HIGHLIGHT highlights the text block so special messages stand out. Text marked as [b]bold[/b] will be displayed as a header (HTML5 only)

SECTIONHEAD uses a large font to show the start of a new section of the form (bold text in HTML4 option)

Input fields

The special treatment field in article segments for user input allows you to access features such as address lookups. The main features are listed below:

You can use a semicolon to apply multiple special treatments to the same column - eg READONLY;ADDRESS_LOOKUP_LINE2 will mark the column readonly, and identify it as Address Line 2 for a lookup

TYPE validation

TYPE=field_type - this carries out additional validation on text field input. Field types include EMAIL, NUMBER, POSTINT, POSTINTORZERO, POSNUMBER, POSTNUMBERORZERO, PHONE, DATE, NINO (National Insurance Number)

TYPE=EMAIL:DOMAIN=somedomain.com,otherdomain.org.uk - a specific case of the email type, which will only allow emails matching the given domains to be used

[due 1-August-2015]: TYPE=DATE expanded to allow all of the following

  • TYPE=DATE:FUTURE - allow only future dates
  • TYPE=DATE:PAST - allow only past dates
  • TYPE=DATE:FUTURE/PAST:Lxb - less than x days/months/years in the future/past
  • TYPE=DATE:FUTURE/PAST:Gxb - greater than x days/months/years in the future/past
  • TYPE=DATE:FUTURE/PAST:LExb - less than or equal to x days/months/years in the future/past
  • TYPE=DATE:FUTURE/PAST:GExb - greater than or equal to x days/months/years in the future/past

Examples

  • TYPE=DATE:FUTURE:L30D - less than 30 days in the future
  • TYPE=DATE:PAST:GE18Y - greater than or equal to 18 years in the past (eg age at least 18)
  • TYPE=DATE:FUTURE:G0D:L1M - less than 1 month in the future, and not today
  • note:Today's date will be allowed by both PAST and FUTURE - eg FUTURE:L1Y allows today. Use G0D to exclude today's date.

READONLY

READONLY - this makes a field readonly, this is particularly useful for address lookup fields where the lookup will populate the field, and you do not want the user to be allowed to overwrite the information

JS function

JS=javascript_function - this is used to access functions such as lookups, and is normally attached to a button. The main lookups available are as follows:

JS=Javascript:SPLGetAddressData(document.getElementById('article_form_user_xx').value)

This uses an external postcode lookup to find the address details matching a given postcode. This does not lookup the house name or number which must be entered by the user.

  • article_form_user_xx must identify the column containing the postcode
  • READONLY;LIB=address_line1 - address line 1 to be populated
  • READONLY;LIB=address_line2 - address line 2 to be populated
  • READONLY;LIB=address_line3 - address line 3 to be populated
  • READONLY;LIB=address_town - address town to be populated
  • READONLY;LIB=address_county - address county to be populated
  • READONLY;LIB=address_country - address country to be populated
  • READONLY;LIB=address_client - (optional) if using a multi-client setup, this can be used to lookup the client identified with the postcode

UPDATESOURCE

Attach special treatment to column (eg Enter AGREE here):
- UPDATESOURCE:[col_name] - will update the source column with the data from this column
- UPDATESOURCE:[col_name] = value?use_value,value?use_value,default?use_value - will update the source column with use_value where this column contains value (case-INsensitive!)

Examples
- UPDATESOURCE:[First payment date] - will update the source column with the description “First payment date” with the contents of this field
- UPDATESOURCE:[Credit Agreement]=AGREE?agreed,DECLINE?declined,default?declined - will update the source column “Credit Agreement” with “agreed” if this field contains AGREE, “declined” if it contains DECLINE or contains any other value

LIB=library_field

You can give the fields in your forms whatever names you like, but in order to carry out standard calculations and other tasks, we need to be more precise.

Whenever you plan to use the contents of a field in a calculation, use the LIB attribute. For example, for monthly interest use LIB=monthly_interest

This will allow you to use library functions, such as CALL=calculate_repayments, and cuForms will know where to find the information it needs.

Here is the current list of library field names:

Person fields

  • org_name – organisation name (text)
  • person_title – Mr, Mrs, etc (text)
  • person_first_names – the first name or names of a person (text)
  • person_last_name – the full name of a person (text)
  • person_email – the email address of a person (text in email format)
  • person_phone – the phone number of a person (text)
  • person_dob – the date of birth of a person (dd/mm/yyyy or yyyy-mm-dd)
  • person_nino - the national insurance number of a person (text)
  • person_member_id - the backoffice membership number of a person (text)
  • person_bank_account - the applicant's bank account number (99999999)
  • person_sort_code - the applicant's sort code (999999)

Address fields

  • address_house_number - the number or name of a house (text)
  • address_line1 (text)
  • address_line2 (text)
  • address_line3 (text)
  • address_town (text)
  • address_county (text)
  • address_country (text)
  • address_postcode (text)
  • address_client - the credit union or other client matched to this address (text)

Loan fields

  • loan_amount – amount of loan (whole number with or without leading £)
  • loan_term – loan term in months (whole number with or without training “month” or “months”)
  • loan_monthly_interest – monthly interest rate (decimal number with or without trailing %)
  • loan_apr - annual APR rounded to 1 decimal place with or without %)
  • loan_repayment_amount – repayment amount (decimal number with or without leading £)
  • loan_total_repayable – total repayable (decimal number with or without leading £)
  • loan_interest_amount - interest amount (decimal number with or without leading £)
  • loan_first_repayment_date - first repayment date (yyyy-mm-dd)
  • loan_purpose - (text)

API fields

  • api_focus_system_interest – interest rate required for FOCUS API (decimal number)

Affordability fields

  • afford_housing - housing type ('Rented', 'Mortgaged' or 'Owned outright')
  • afford_income_monthly - monthly income amount (decimal number with or without leading £)
  • afford_current_debt - total current debt (decimal number with or without leading £)
  • afford_debt_costs_monthly - current monthly repayments (decimal number with or without leading £)
  • afford_deps_older - number of people in household over 14 - including applicant (whole number - 1 or above)
  • afford_deps_younger - number of people in household under 14 (whole number or zero)
  • afford_monthly_expenses - calculated monthly expenses based on NSO data and including debt repayments (decimal number)
  • afford_monthly_income_net - calculated monthly disposable income (decimal number)
  • afford_new_debt_spend_pc_income_net - repayments on proposed loan as a % of disposable income (decimal number)
  • afford_debt_spend_pc_income - total debt repayments (including proposed loan) as a % of total monthly income (decimal number)
  • afford_debt_pc_income - total debt amount (including proposed loan) as a % of total annual income (decimal number)

There are a number of library fields associated with the processing of automated tasks, and these are listed in the next section

CALL=automation_task

There are a number of standard automation tasks you can use in your workflows. Use the CALL attribute 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)
  • 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,cc_html_result

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=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,
  • Other behaviour: sets cv_raw_result,cv_html_result

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=id_check_bank

  • 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_sort_code,person_account_number
  • Other behaviour: sets cv_raw_result,cv_html_result

CALL=id_check_bank_refer

  • Summary: As for id_check_bank, but saves Pass, Refer or Decline in hidden field cv_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)
special_treatment.1461092497.txt.gz · Last modified: 2017/02/20 16:49 (external edit)