When a payment is made on one of your forms, it is helpful to inform yourself or the end users themselves about the payment.
💡If you have not already done so, start by creating a form with a configured payment field.
In this section, we will explore how you can set up email notifications while working with Formstack Salesforce App forms.
There are several ways to send payment emails.
- Formstack Payment Field Emails
You can configure the payment field on your form to send emails. We have pre-configured most of the settings to make this seamless for most use cases. This is the easiest way to send custom email alerts. Also, if you are using other email alerts in the app, or if you have multiple payment fields on a form and want to send different alerts for each one then this method makes sense. This method is what will be discussed in this article.
- Payment Provider Service Emails
You can configure payment receipts or notifications from within your payment service (i.e. Stripe). Each payment service differs in what email functionality is available but they are fairly robust and straightforward. Usually only data available within the payment transaction can be mapped into the email.
The other benefit of using payment provider emails is for recurring payment receipts. Since recurring payments are managed by the payment provider completely without the involvement of Salesforce or Formstack, we do not know when this occurs and cannot send recurring emails beyond the email we send for the initial transaction. Some customers setup advanced syncing using a payment provider app to trigger Salesforce emails and this is an option for more advanced use cases.
- Salesforce Emails
You can setup a process builder to trigger off the creation or update off the submission record that contains your transaction details. This option is the most complicated but offers the greatest flexibility. It is especially useful if there are other processes (manual, automated or other form submissions) that need to take place before sending out an email. It is also a good option if you want to send all emails from Salesforce due to company policies or pre-configured SMTP email service in Salesforce.
Formstack Payment Field Emails
To configure payment emails, open the payment field settings on your form and navigate to the Email Confirmation tab.
The following three types of notifications are available:
- Success: This email is sent to one or more members of your team upon successful completion of payment.
- Failure: This email is sent to one or more members of your team when a failure occurs during payment submission. This will normally happen when either your payment field is configured incorrectly or there is an issue with your payment provider account. Failure emails will also include details of the failure underneath the provided message body.
🔺For PayPal Pro accounts, see PayPal Error Codes for details on the error codes provided by PayPal.
- Confirmation: This email is sent to the form submitter confirming their payment. For this email, you can additionally define the from name and email address of the email to be sent to the user.
You can configure most email fields and create a new email template or choose an existing template you have already created.
💡A powerful mechanism is to use templates created in Salesforce outside of the Formstack app and trigger them from the payment form submission. This allows you to share email templates between Salesforce and Formstack and only build/maintain from one place.
You can merge fields from your form into the email address fields, subject line, or message body.
🔺There are 2 common causes for missing payment emails.
- SPAM From email address - When the From address is set to something other than the email server sending the email, some recipient email systems will reject the email and mark it as SPAM.
It is best to leave the FROM address blank or use firstname.lastname@example.org as the FROM address to ensure delivery. Alternatively, use a different method for email alerts (i.e. native Salesforce emails as described above).