Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Drawio
mVer2
zoom1
simple0
inComment0
pageId2856616143
custContentId2916811124
lbox1
diagramDisplayNameJarvis Receipting Process
contentVer1
revision1
baseUrlhttps://sydneyuni.atlassian.net/wiki
diagramNameJarvis Receipting Process
pCenter0
width351
links
tbstyle
height441

...

Test Scenario

Contact is selected on the receipt

Transaction Signator

Organization Account no direct linked contacts

Gift created

directly link a contact (do not mark as primary)

(tick)

(error)

Organization Account no direct linked contacts

Gift created

directly link 2 contacts (do not mark as primay)

(error)

(error)

Organization Account no direct linked contacts

Gift created

directly link 2 contacts (mark one a primary)

(tick)

primary contact

(error)

Organization Account no direct linked contacts

Gift created

directly link a contact (do not mark as primary)

manually add a different contact to transaction signatore

(tick)

signator

(tick)

manually added

Household Account (assume always created with direct contact)

no primary contact selected on account

Gift Created

(tick)

signator

(tick)

forced to select in batch creation

Household Account (assume always created with direct contact)

multiple contacts set as primary and secondary

Gift Created - signator is secondary contact

(tick)

signator (secondary)

(tick)

forced to select in batch creation

...

Merge Document

Jarvis / Apsona

Date

«ReceiptDate»

Heading

«IF CareOf»«AccountName»

«ELSE IF AccrecordType !="Household"»

«AccountName»«ENDIF»

«IF CareOf»Care Of: «CareOf»

«ELSE IF Deceased»Sir/Madam

«ELSE IF LegalCreditCheckLess100Greater0»

«IF PSalutation»«PSalutation»«ENDIF»

«PFirstName» «PLastName»«IF PSuffix»«PSuffix»«ENDIF»

and «IFSSalutation»«SSalutation»«ENDIF»

«SFirstName» «SLastName»«IF SSuffix» «SSuffix»«ENDIF»

«ELSE IF LegalCreditCheck100»

«IF LegalCreditSalutation»«LegalCreditSalutation»«ENDIF»

«LegalCreditFirstName» «LegalCreditLastName»

«IF LegalCreditSuffix» «LegalCreditSuffix»«ENDIF»«ENDIF»

«IF MailingLine1»«MailingLine1»«ENDIF»

«IF MailingLine2»«MailingLine2»«ENDIF»

«IF MailingLine3»«MailingLine3»«ENDIF»

«IF City»«City»«ENDIF» «State» «PostCode»

«Country»

"CareOf":"Receipt____AQB__AccountId__c___USYD_Receipting_Care_of__c"

"AccrecordType":"Account____RecordTypeId"

"AccountName":"Receipt____AQB__AccountId__c___Name"

"Deceased":"Receipt____AQB__ContactId__c___AQB__Deceased__c"

"LegalCreditCheckLess100Greater0":"Calculated_Steps____>0<100"

Salutation

«SalutationJava»

Code Block
languagejs
(function () {
    var accountType = {!Account.Account.Account Type};
	var grclc = {!Gift Recognition Credit.Gift Recognition Credit.Legal Credit %};
	var PLastName = {!Account.Primary Contact.Last Name} ? {!Account.Primary Contact.Last Name} : "";
	var PFirstName = {!Account.Primary Contact.First Name} ? {!Account.Primary Contact.First Name} : "";
	var SLastName = {!Account.Secondary Contact.Last Name} ? {!Account.Secondary Contact.Last Name} : "";
	var SFirstName = {!Account.Secondary Contact.First Name} ? {!Account.Secondary Contact.First Name} : "";
	var salutation1 = {!Account.Primary Contact.Salutation} ? {!Account.Primary Contact.Salutation} : "";
	var salutation2 = {!Account.Secondary Contact.Salutation} ? {!Account.Secondary Contact.Salutation} : "";
	var careof = {!Receipt.Account.Receipting Care of};
	
	var method = 0; // Dear Salutation + First Name + Last Name
	if ((PLastName != "" && salutation1 == "") || (SLastName != "" && salutation2 == "")){
		if ((PFirstName != "" && PFirstName.length > 1) || (SFirstName != "" && SFirstName.length > 1 )){
			method = 1; // Dear First Name
		} else {
			method = 2; // Dear Supporter
		}
	}
	if ((accountType == 'Household') && (grclc < 100) && (PLastName == SLastName)) {
			switch(method){	
				case 1:
					return (PFirstName + " " + "and" + " " + SFirstName + " " + SLastName);
					break;
				case 2:
					return ("Supporter");
					break;
				default:
					return (salutation1 + " " + "and" + " " + salutation2 + " " + SLastName);
			}
	} else if ((accountType == 'Household') && (grclc < 100) &&  (PLastName != SLastName)) {
				switch(method){
					case 1:
						return (PFirstName + " " + "and" + " " + SFirstName);
						break;
					case 2:
						return ("Supporter");
						break;
					default:
						return (salutation1 + " " + PLastName + " " + "and" + " " + salutation2 + " " + SLastName);
				}
			} else if ((accountType != 'Household') && (careof)){
					return ({!Receipt.Account.Receipting Care of});						
				} else if ((accountType != 'Household')){
							return ("Sir/ Madam");
				} else if ((grclc == 100)){
					
						switch(method){	
							case 1:
								return (PFirstName);
								break;
							case 2:
								return ("Supporter");
								break;
							default:
								return (salutation1 + " " + PLastName);
						}						
				} else {
					return "";
				}
 })()

Body

Date

«IF Pledge»«LastPaymentDate»«ELSE»«GiftDate»«ENDIF»

Receipt__value__USYD_Gift_Date__c

Receipt__value__AQB__GiftDate__c

Received from

«GiftRecognitionCredit»

Gift/Pledge Number.GRC roll-up

Flow: Gift Pledge Update - V6

Trigger: Gift/Pledge Created or Edited

If GRC exist:

concatenate contacts’:

Contact.Receipt Name

or

Contact.FirstName Contact.LastName

else:

Account.Account Name

Gift Pledge Update - V6

Amount

«GiftAmount»

Receipt____AQB__Amount__c

Receipt

«ReceiptNum»

Receipt____Name

«COADesignation»

Receipt____USYD_Transaction_COA_Acc_Num_Roll_Up__c

...