The automatic emails sent to customers based on whether their payment is successful/unsuccessful. The email needs to be send to the customer contact with category Billing Contact as individual Emails for each payment records
Deliverables
Custom Record Creation-
- Bundle – GRW020 Payment Notification Development
- Custom record that holds the mapping of customer payment search, Customer billing contact Search, and Email Template in three fields.
- GRW_020 Payment Notification Development
- Customer Payment Queue – It will have either search for a successful payment record or a failed one as follows:
- GRW019 – Payment Status Deposited Email Notification
- GRW019 – Payment Status Failed Email Notification
(Note: The search should include “Payment Notification Sent” = F criteria as well.)
- Email Templates – It will have either template for approved or failed one as follows:
- Payment Approved Notification
- Payment Failed Notification
- Contacts Search – It will have the search of contacts with the category Billing Contact.
- Custom Record “GRW_020 Payment Notification Development” Search –
- Search Name: GRW_020 Payment Notification Custom Record Search
- Id: customsearch_grw020_pymt_notf_custom_rec
- Hence there will be only 2 entries for the custom record that is for the success case and failure case.
- Name – Payment Failed
- Name – Payment Success
Schema for Email template
Placeholder
Email Template
NS Field
Email Body Fields
1
<Payment.Amount>
${transaction.payment}
PAYMENT AMOUNT ( fiedld: payment)
2
<Account.Currency>
${transaction.currency}
CURRENCY SYMBOLS (fieldid: currency),
We will compare the transaction currency and then in the template itself we will check the corresponding symbols like $, £, € etc. which are on the system.
(If any new symbol arrives in the system, then they must update the template to incorporate the new currency symbol.)
3
<AccountNumber>
${transaction.customer}
CUSTOMER or Customer ID
4
<Payment.Date>
${transaction.trandate}
DATE (fieldid: trandate)
5
<payment method (bank account or credit card)>
${transaction.paymentmethod}
Payment Methods (fieldid: paymentmethod)
like – Cash, Check, VISA, MasterCard etc.
6
<last digits bank account or CC>
${transaction.ccnumber}
CREDIT CARD # (fieldid: ccnumber)
eg: ************1111
Email Subject Fields
7
Customer – <customername> –
${transaction.customer.altname}
Customer’s Name
8
Payment # – <PaymentID>
${transaction.tranid}
Transaction ID or Document number of payment record
Sample Success Email format:
Subject : Payment failed for Customer – Test Customer – Payment #123
Body: We are pleased to inform you that your payment of €2,00 for your account 70 test prospect ind test was successfully processed on 05/01/2024 via your VISA ending in the last digits ************1111.
Sample Failure Email format:
Subject: Payment Approved for Customer – Test Customer – Payment #123
Body: We regret to inform you that the payment for your account 70 test prospect ind test for €2,00 on 05/01/2024 was declined.
The declined payment was associated with your VISA ending in the last digits ************1111.
In both Email Subject we will append payment id #tranid following the Customer Name.
Scheduled Map/Reduce Script-
- A scheduled map reduce script will run regularly on the custom records.
- On each Customer payment from the search on the “Customer Payment Queue” field, it will find the correct contacts out of the saved search on the “Contacts Search” field, for each customer. And sent emails as per the attached email template in the custom record.
Testing steps
- Confirm the is updated to the latest version bundle – GRW020 Payment Notification Development in the target account.
- Modify the Email Template in the target account same as the developer Domain.
- Payment Approved Notification (2)
- Payment Failed Notification (3)
- Click on the script link GRW_020_MR_Customer_Payment_Notification
- Edit the the deployment
- Save and Execute the script deployment.
- Before executing confirm the parameters are filled
- Parameters:
- Email Author – should be set to the internal Id of the user.
- Custom Record Search ID – Script parameter to set the search id of the custom record “GRW_020 Payment Notification Custom Record Search” which will be automatically get updated on the bundle update.
- Verify the whether email send to Billing Contact of Customer. This email is attached on the corresponding contact under communication tab.
- The Emails will be sent to each customer’s contact as seperate individual emails for each payment records separately, meaning there won’t be any grouping based on customers anymore.
- The Payment Notification Sent check box is checked once email send.
- Sample Success Email –
- Sample Failure Email –
Note:
- The email will not send for parent customer if customer have a parent.
- Considered payment data from the given saved search.
- Sender of email is fetched from the script parameter. This is now set to one of our employee.
- We are maintaining a simple template without much complicated aberrations/complex conditionals within the template to make it more user friendly to modify in future. Thus in the template the Amout related field will follow the standard conventional formatting as – $10.00 instead of 10.00$.