Use Cases
  • 09 Sep 2022
  • 6 Minutes to read
  • Dark
    Light

Use Cases

  • Dark
    Light

Introduction

Below is a list of common use cases with sample configurations.

See below for the PayLink rollup, Transaction Reattempt auto-send PayLink process, and the Virtual Terminal mapping.

Scenario

A common use case is that a salesperson will close an Opportunity and send the customer a link to the payment request.

To do this, you can build three things without using code.

  • A Process Builder process to automatically create a Transaction record when the Opportunity Stage = "Closed Won".
  • A Process Builder process to automatically roll-up the PayLink on to the Opportunity record.
  • A Workflow Rule with an Email Alert to automatically email the PayLink to the customer.

Instructions

Step One

  1. Create a custom URL type field on the Opportunity object called PayLink.
  2. Create a lookup type field on the Opportunity object called Billing Contact that looks to the Contact object and is filtered by the Account record on the Opportunity. This is for sending a Workflow email all from one object (Opportunity).
  3. Alternatively, roll-up a related Opportunity Contact Role record from the Opportunity to populate this value too.

G_01_03 instructions pic 1

Step Two

Auto-create the Blackthorn Payments Transaction from the "Closed Won" Opportunity.

  1. Create a new Process Builder.
  2. Set The process starts when to "A record changes".
  3. Click + Add Object.
  4. Type in "Opportunity", and select "when a record is created or edited".
  5. Click Save.
  6. Click + Add Criteria.
  7. Enter a Criteria Name and select "Conditions are met" for Criteria for Executing Actions.
  8. Under Field, find the Opportunity Stage, set Operator to "Equals", and pick "Closed Won" for the Value.
  9. Under IMMEDIATE ACTIONS, click + Add Action.
  10. Action Type = "Create a Record"
  11. Ender an Action Name and set Record Type to "Transaction".
  12. Under Set Field Values, enter the following information.
Field Type Value
Amount Formula [Opportunity].Amount
Opportunity Field Reference [Opportunity].Id
Description Formula [Opportunity].Description
Due Date Formula [Opportunity].CloseDate
Contact Field Reference [Opportunity].Billing_Contact
  1. Activate the Process Builder.

As an alternative to the Contact field, you can populate the Account lookup field on the Transaction object with the Opportunity Account Name field. However, if you want both lookup fields on the Transaction, the Account lookup will supersede the Account Name lookup when viewing the PayLink form.

G_01_03 instructions pic 2

Step Three

Auto roll-up the PayLink from Transaction to Opportunity. This will allow you to use the PayLink in the Email Alert.

  1. Create a new Process Builder.
  2. Set The process starts when to "A record changes".
  3. Click + Add Object, type in "Transaction", and select "only when a record is created".
  4. Click Save.
  5. Click + Add Criteria, name your criteria and select " Conditions are met".
  6. Under field, find Transaction Opportunity, set operator to "IS NULL", type to "Boolean" and pick "False" for the value.
    This criteria tells the process to only fire when the Transaction has a related Opportunity.
  7. Under Immediate Actions, click + Add Action.
  8. Action Type = Update Records, enter your Action Name and set Record Type = "Opportunity".
  9. No criteria-just update the records!
  10. Field = PayLink; Type = Formula; Value = "[bt_stripeTransactionc].bt_paylinkPayLinkc".
  11. Activate the Process Builder.

G_01_03 instructions pic 3

Step Four

Create a Workflow Rule with an Email Alert to automatically email the PayLink to the customer.

  1. Create the Email Template.
    Here is an example Email Template.
    G_01_03 instructions pic 4

  2. Create the Workflow Rule and Email Alert. This will email your customer when the Opportunity Stage = "Closed Won", and there is a PayLink value.

    Here is an example Workflow Rule and Email Alert.
    G_01_03 instructions pic 5

    When PayLink field is not empty and the Opportunity Stage = "Closed Won" then send PayLink to customer.
    G_01_03 instructions pic 6

Boom! Done.

Transaction Reattempt Notifications

Failed Transaction Follow Up Automation

When Transactions fail and are reattempted, it is a good practice to follow up with the customer to notify them and update their card or bank account information if the Transaction continues to fail.

For the use case below, we will be creating a Process in Process Builder to send out an automated Email Alert to the customer on the second reattempt and then notify the Transaction owner via a Chatter Post on the third reattempt.

Step One - Create an Email Template and an Email Alert

These two records will be referenced later in Process Builder.

CREATE AN EMAIL TEMPLATE

  1. From Setup, navigate to:
    • Lightning: Email > Classic Email Templates
    • Classic: Administration Setup > Communication Templates > Classic Email Templates
  2. Click New Template
  3. Under "Choose the type of email template you would like to create," select "Text".
  4. Click Next.
  5. Under "Available Merge Fields" set Select Field Type = "Transaction Fields".

Be sure to only use merge fields from the Transaction object for this template. Merged fields from other objects will not populate.

  1. Select the folder where you want to store your Email Template.
  2. Available For Use checkbox should be checked
  3. Enter an Email Template Name and Template Unique Name.
  4. Enter a Description.
  5. Enter a Subject and an Email Body using a combination of text and Transaction merge fields

G_01_03 reattempt notifications pic 1


CREATE AN EMAIL ALERT

  1. From Setup, navigate to:
    • Lightning: Process Automation > Workflow Actions > Email Alerts
    • Classic: Create > Workflow & Approvals > Email Alerts
  2. Click New Email Alert.
  3. Enter a Description and Unique Name.
  4. For Object, select "Transaction".
  5. For Email Template, find and select your template from the prior step.

If you cannot locate your Email Template, please go back to the Template and make sure Available for Use is checked.

  1. For Recipient Type, select "Email Field".
  2. In the Available Recipients column, select "Email Field: Payment Method Billing Email" and use the Add/Remove buttons to move the value into the Selected Recipients column.
  3. If desired, enter any Additional Emails.
  4. Select the correct From Email Address.
  5. Click Save.

G_01_03 reattempt notifications pic 2

Step Two: Build the Process Using Process Builder

Create a Process with the Process Builder to automatically send out an Email Alert to notify the Customer of a second reattempt, as well as post to Chatter to notify the Transaction owner after the third reattempt.

CREATE A NEW PROCESS

  1. From Setup, navigate to:
    • Lightning: Process Automation > Process Builder
    • Classic: Create > Workflow & Approvals > Process Builder
  2. Click New.
  3. Enter the Process Name, API Name, and Description.
  4. Set The process starts when to "A record changes."

G_01_03 reattempt notifications pic 3


SELECT THE OBJECT FOR THE PROCESS

  1. On the canvas, click Add Object.
  2. For the Object field, select "Transaction".
  3. Under Start the Proces, select "when a record is created or edited".
  4. Click Save.

G_01_03 reattempt notifications pic 4


DEFINE THE CRITERIA THAT TRIGGERS THE PROCESS AND DEFINE YOUR ACTIONS

Second Reattempt Criteria

  1. On the canvas, click + Add Criteria.
  2. Enter the Criteria Name.
  3. Set Criteria for Executing Actions to"Conditions are met".
  4. Under Set Conditions, complete the following fields.
    • Field = "Reattempt Number"
    • Operator = "Equals"
    • Type = "Number"
    • Value = "2"
  5. Set Conditions to "All of the conditions are met (AND)".
  6. Click Save.

G_01_03 reattempt notifications pic 5

Second Reattempt Action 1

  1. On the canvas under IMMEDIATE ACTIONS, click + Add Action.
  2. For Action Type, select "Email Alerts".
  3. Enter an Action Name.
  4. Enter the Email Alert created in Step One in the Email Alert field.
  5. Click Save.

G_01_03 reattempt notifications pic 6

Third Reattempt Criteria

  1. Under your last element on the canvas, click + Add Criteria.
  2. Enter the Criteria Name.
  3. Under Criteria for Executing Actions, select "Conditions are Met".
  4. Under Set Conditions, complete the following fields
    • Field = "Reattempt Number"
    • Operator = "Equals"
    • Type = "Number"
    • Value = "3"
  5. Set Conditions to "All of the conditions are met (AND)".
  6. Click Save.

G_01_03 reattempt notifications pic 7

Third Reattempt Action 1

  1. On the canvas under IMMEDIATE ACTIONS, click + Add Action.
  2. For Action Type, select "Post to Chatter".
  3. Enter an Action Name.
  4. Under Post to, select "This Record".
Feed Tracking

The "Post to Chatter" option is only visible if the feed for Transaction object is enabled. Setup > Search for Feed Tracking > Select Transaction > Enable Feed Tracking > Save.

  1. In the Message field, enter your custom message.
    Example Message: @[{![bt_stripe__Transaction__c].OwnerId}] Contact the customer on this Transaction. Their Payment Method is incorrect and needs to be updated in order for the Transaction to process. An email has already been sent with a PayLink to update their Payment Method.
  2. Click Save.
  3. Click Activate.

G_01_03 reattempt notifications pic 8

G_01_03 reattempt notifications pic 9

On the third reattempt, a Chatter post will automatically be created and the Transaction owner notified.

Virtual Terminal

Prepopulating Examples

Related To Field: Opportunity.Account -> Transaction.Account

G_01_03 virtual terminal pic 1

Currency ISO Field

  1. Create a custom picklist field called Currency ISO on your Opportunity parent object.
  2. Insert the same values as the Currency ISO field from the Transaction. Only include the Currency ISO values that you need.
  3. Set a default value for this custom field, ie "USD".
  4. Create a new custom metadata type record.
    • Name: Opp_Currency_ISO
    • Label: Opp->Trans Currency
    • Screen: Single Transaction
    • Source Object: Opportunity
    • Source Field: Currency ISO
    • Target Object: Transaction
    • Target Field: Currency ISO
  5. Click Save.

Description Field: Opportunity.Description -> Transaction.Description
G_01_03 virtual terminal pic 2


Custom Field: Lead.Lead Source -> Transaction. Lead Source
G_01_03 virtual terminal pic 3

Additional Use Cases

If you have any suggestions for a use case with Blackthorn Payments please contact Blackthorn Support and provide details on your use case. We always appreciate hearing the solutions our customers create and love sharing that with our other customers!