This customization allows the customer to set specific percentages of the Sold Price to be due at various stages of the job. In the example below we will use custom Date Fields based on the Sold On date ( 7 days after Sold On, 30 Days after Sold On, 45 Days after and 60 Days after the Sold On date). However, this customization could also be setup based on Sale Status or Status Detail, and we will cover that configuration in this Article as well. This customization starts at $1000 but will need to be Scoped based on each customer's specific requirements.
In this example the client wants 10% of the Sold Price to be due 7 Days after Sold On, and an additional 40% to be due at 30 Days after Sold On, then an additional 40% Due at 45 Days after Sold On and finally the last 10% is Due 60 Days after the Sold On date.
NOTE: If the customer would like this to be based on Status or Status Detail you will use the customization below in conjunction with the ideas presented in this Article below.
Stamp a Date field when a specific Picklist Value is selected
In this example, the customer would like the Payment Schedule Dates to be based on when the Status Detail is changed to "Approved for Production"
On the Sale object, create a new Custom Date Field.
This field will need to be populated via a Flow.
Create a new Record-Triggered Flow
On the Start Node set the Object to Sale
Choose only when the record is Updated AND meets the following Condition Requirements:
Status Detail equals "Approved for Production"
And be sure to set the Flow to run Only when a record is updated to meet the condition requirements
Next add an Element to Update the Triggering Record
Set the Approved for Production On date using the Flow > Current Date
Save and Activate your Flow!
Create Custom Date Fields for Payment Schedule Due Dates
Next, we will create custom Formula Date fields to capture the Date when each Payment is Due. In the example below I am using the Sold On date, but this might also be 7 Days after the Approved for Production On date that we used a Flow to update in Step 1.
On the Sale Object we will create 4 Custom Fields:
Payment 1 Due Date, formula: i360__Sold_On__c + 7
Payment 2 Due Date, formula: i360__Sold_On__c + 30
Payment 3 Due Date, formula: i360__Sold_On__c + 45
Payment 4 Due Date, formula: i360__Sold_On__c + 60
The formula fields might look something like this:
Create Custom Currency Formula Fields for Requested Payment Amounts
Next we will create four currency Formula fields to capture the total dollar amount each Payment should be for (if the Customer were to make exactly the requested payment amounts).
In this example it would be 10% of Sold Price, 40%, 40% and lastly 10% however, your customer's requirements may be different. Be sure to reference the individual Scope of Work for the client you are working with.
Payment 1 Requested Amount, formula: (i360__Sold_Price__c * 0.1)
Payment 2 Requested Amount, formula: (i360__Sold_Price__c * 0.4)
Payment 3 Requested Amount, formula: (i360__Sold_Price__c * 0.4)
Payment 4 Requested Amount, formula: (i360__Sold_Price__c * 0.1)
These dollar amounts represent the "ideal" payment schedule and the payments your customer wants to receive from the Prospect.
Note the example below, the Sold Price is $1000. The ideal Payment 1 Requested Amount is $100. However, the customer made a Deposit payment of $125. For this reason, we will also need to create four (4) Formula Currency Fields to calculate the actual Payment Amount which is Due. Note in the example below how the Payment 2 Amount Due has been adjusted to account for the Payments already received.
Create Custom Currency Formula Fields for Actual Payment Amounts Due
Next, we will create four currency Formula fields to capture the dollar amount each Payment should be for, based on the Requested Payment Amount and the Total Receipts and Adjustments already received.
These will each be different but if you have named the Fields exactly how we have listed above in this Article, you will be able to copy/paste the Formuals below.
Payment 1 Amount Due: formula:
IF(Payment_1_Due_Date__c > TODAY(),0,
IF(((Payment_1_Requested_Amount__c )- i360__Total_Receipts__c )<0,0,
IF (i360__Total_Receipts__c >0, ( Payment_1_Requested_Amount__c - i360__Total_Receipts__c),
( Payment_1_Requested_Amount__c ))))
Payment 2 Amount Due: formula:
IF(Payment_2_Due_Date__c > TODAY(),0,
IF (i360__Total_Receipts__c= 0,(Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c),
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c),0 ,
IF (i360__Total_Receipts__c> (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c),0 ,
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c ),Payment_2_Requested_Amount__c ,
IF (i360__Total_Receipts__c > (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c), (Payment_2_Requested_Amount__c - (i360__Total_Receipts__c - (Payment_1_Requested_Amount__c ))),
IF (i360__Total_Receipts__c < (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c ), (Payment_2_Requested_Amount__c - (i360__Total_Receipts__c - (Payment_1_Requested_Amount__c))),
(Payment_2_Requested_Amount__c ))))))))
Payment 3 Amount Due: formula:
IF(Payment_3_Due_Date__c > TODAY(),0,
IF (i360__Total_Receipts__c= 0,(Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c+Payment_3_Requested_Amount__c),
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c+Payment_3_Requested_Amount__c),0 ,
IF (i360__Total_Receipts__c> (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c+Payment_3_Requested_Amount__c),0 ,
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c + Payment_2_Requested_Amount__c ),Payment_3_Requested_Amount__c ,
IF (i360__Total_Receipts__c > (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c + Payment_3_Requested_Amount__c ), (Payment_3_Requested_Amount__c - (i360__Total_Receipts__c - (Payment_1_Requested_Amount__c + Payment_2_Requested_Amount__c ))),
IF (i360__Total_Receipts__c < (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c + Payment_3_Requested_Amount__c ), (Payment_3_Requested_Amount__c - (i360__Total_Receipts__c - (Payment_1_Requested_Amount__c + Payment_2_Requested_Amount__c ))),(Payment_3_Requested_Amount__c ))))))))
Payment 4 Amount Due: formula:
IF(Payment_4_Due_Date__c > TODAY(),0,
IF (i360__Total_Receipts__c= 0,(Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c+Payment_3_Requested_Amount__c+Payment_4_Requested_Amount__c),
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c+Payment_3_Requested_Amount__c+Payment_4_Requested_Amount__c),0 ,
IF (i360__Total_Receipts__c= (Payment_1_Requested_Amount__c + Payment_2_Requested_Amount__c +Payment_3_Requested_Amount__c ),Payment_4_Requested_Amount__c ,
IF (i360__Total_Receipts__c < (Payment_1_Requested_Amount__c +Payment_2_Requested_Amount__c + Payment_3_Requested_Amount__c+ Payment_4_Requested_Amount__c ), (Payment_4_Requested_Amount__c - (i360__Total_Receipts__c - (Payment_1_Requested_Amount__c + Payment_2_Requested_Amount__c + Payment_3_Requested_Amount__c))), 0 )))))
Creating these fields ensures that your customer is given the appropriate Amount Due based on the current Payment Due Date and the Total Payments already received.
Create Email Template for Staff Notifications
In this example, the client is using PaySimple to collect payments and send Payment Links. This email template is intended to be sent to the Staff members to remind them to send the Payment Link to the Prospect related to this Sale record.
Keep in mind, if your client does not use PaySimple, they can send an Email directly to the Prospect to remind them to make a payment.
Go to the My Templates menu
The Emails will be sent from the Sale object so we will need to create the templates in the Templates-Sale Folder.
Use the Formatting Controls to insert the desired Merge Fields into your Email Template. Below you can copy/paste the content for the Email template shown below.
Please send a Payment Request Link on the following Sale record:
Payment 2 Date: {!i360__Sale__c.Payment_2_Due_Date__c}, Amount Due: {!i360__Sale__c.Payment_2_Amount_Due__c}
Payment 3 Date: {!i360__Sale__c.Payment_3_Due_Date__c}, Amount Due: {!i360__Sale__c.Payment_3_Amount_Due__c}
Payment 4 Date: {!i360__Sale__c.Payment_4_Due_Date__c}, Amount Due: {!i360__Sale__c.Payment_4_Amount_Due__c}
{!Organization.Name}
{!Organization.Street}
{!Organization.City}, {!Organization.State} {!Organization.PostalCode}
Phone: {!Organization.Phone}
{!User.i360__Company_Website_URL__c}
Save your Email Template!
Next use Send Test and Verify Merge Fields button to send yourself a test Email.
Be sure to select a Sale record as the Related To Record and enter your Email address before clicking OK.
Be sure to test the Hyperlink by clicking on the link within the body of the Email. Make sure the link successfully takes you to the Sale record.
When I click the link, my web browser is launched and takes me to our instance of Salesforce and this specific Sale record, a successful test!
Next, we will create a new Email Alert
Choose the Sale object and select the Email Template we created earlier.
We recommend creating a Public Group and putting all the Users who should receive this notification into a Public Group. Then the Email Alert can be sent to everyone in that Public Group. In this example I used a Group called "Accounting" and it has two (2) Users in the Group.
Next we will need to create a Scheduled Flow to send this Email Alert notification when the Payment Amount is greater than zero and the Payment Due Date is reached.
Create a Scheduled Triggered Flow
This Flow will identify any Sales where the Payment Due date is Today AND the Payment Amount Due is greater than Zero. When this is True we want the system to send an Email reminder to the Staff, notifying them that it is time to generate a Payment Link and send it to the consumer.
This will be a Scheduled Triggered Flow, and we will set our Schedule to Daily at 7am. This means that when a Payment Amount becomes Due an Email notification will go out to our staff, notifying them of all the Sales where a Payment Link needs to be sent.
Start Node
Note the Condition Requirements are custom Logic which includes both AND and OR statements. We will only send the notice if the Payment 1 Due Date Equals Today AND the Payment 1 Amount is greater than Zero, OR the Payment 2 Due Date Equals Today AND the Payment 2 Amount is greater than Zero, OR the Payment 3 Due Date Equals Today AND the Payment 3 Amount is greater than Zero, OR the Payment 4 Due Date Equals Today AND the Payment 4 Amount is greater than Zero.
After the Start Node, add an Email Alert element
Be sure to select the correct Email Alert and in the Record ID, use the Sale record which triggered the Flow.