Use Cases
  • 13 Jul 2022
  • 4 Minutes to read
  • Dark
    Light

Use Cases

  • Dark
    Light

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 all without 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

  • Create a custom URL type field on the Opportunity object called PayLink.
  • 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). Alternatively, roll-up a related Contact Role record from the Opportunity to populate this value too.

L_06_automated paylink pic 1

Step Two

Auto-create the Blackthorn | Payments Transaction from the "Closed Won" Opportunity.
L_06_automated paylink pic 2

  • Create a new Process Builder.
    The process starts when A record changes.
  • Click the "+ Add Object", type in "Opportunity", and select "when a record is created or edited".
  • Save.
  • Click the "+ Add Criteria", name your criteria and select " Conditions are met".
  • Under field, find Opportunity Stage, set to "Equals", and pick "Closed Won" for the value.
  • Under Immediate Actions, click "+ Add Action".
  • Action Type = Create a Record, name your action and Record Type = "Transaction".
  • Set Field Values for five fields:
- Amount = Type: Formula, Value: Opportunity. Amount
- Opportunity = Type: Reference, Value: Opportunity. ID
- Description = Type: Formula, Value: Opportunity. Description
- Due Date = Type: Formula, Value: Opportunity.CloseDate
- Contact = Type: Reference, Value: Opportunity.Billing_Contact

Alternatively to the Contact field, you can populate the Account lookup onto the Transaction with the Opportunity Account. Just note, if you want both lookup fields on the Transaction, the Account lookup will supersede the Contact lookup when viewing the PayLink form.
L_06_automated paylink pic 3

Step Three

  • After the Immediate Action, select "Evaluate The Next Criteria".
  • Click the "+ Add Criteria", name your criteria "Amount is changed" and select " Conditions are met".
  • Set Condition: Opportunity Amount field, Is Changed, Boolean, True

L_06_automated paylink pic 4

  • Under Immediate Actions, click "+ Add Action".
  • Action Type: Update a Record, name your action: Update Transaction Amount
  • Select No criteria-just update the records!
  • Set the field values:
- Amount: Type: Formula, Value: Opportunity. Amount

L_06_automated paylink pic 5

  • Activate the Process Builder.

Step Four

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

  • Create a new Process Builder.
    The process starts when A record changes.
  • Click the "+ Add Object", type in "Transaction", and select "only when a record is created".
  • Save.
  • Click the "+ Add Criteria", name your criteria and select " Conditions are met".
  • Under field, find Transaction Opportunity, set operator to "IS NULL", type to "Boolean" and pick "False" for the value.
    This criteria is telling the process only to fire when the Transaction has a related Opportunity.
  • Under Advanced, check "Yes".

L_06_automated paylink pic 6

  • Under Immediate Actions, click "+ Add Action".
  • Action Type = Update Records, name your action and select Record Type = "Opportunity".
  • No criteria-just update the records!
  • Field = PayLink, Type = Formula, Value = "bt_stripeTransactionc. bt_paylinkPayLinkc".
  • Activate the Process Builder.

L_06_automated paylink pic 7

Step Five

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

  • Create the Email Template.
    Here is an example Email Template.

L_06_automated paylink pic 8

  • Create the Workflow Rule and Email Alert. This will email your customer when the Opportunity is "Closed Won" and there is a PayLink value.
    Here is an example Workflow Rule and Email Alert.

L_06_automated paylink pic 9


L_06_automated paylink pic 10

Boom! Done.


Transaction Reattempt Notifications

Failed Transaction Follow Up

When Transactions fail and are reattempted, it is a good thing 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 builder to send out an automated email notification to the customer after the second reattempt and then notify the sales rep on the third reattempt.

Step One

Create an Email Template and Email Alert
These two records will be referenced later in a Process Builder.

  • Example Email Template:
    L_06_transaction reattempt pic 1

  • Example Email Alert:
    L_06_transaction reattempt pic 2

Step Two

Create a Process Builder that will automatically send out the Email that we just created above and notify the Transaction owner.

  • Create a new Process Builder.
    The process starts when A record changes.

  • Click the "+ Add Object," type in "Transactions," and select "when a record is created or edited."

  • Save.

  • Click the "+ Add Criteria," name your criteria and select " Conditions are met."

  • Under field, find Transaction Reattempt Number, set to "Equals," and value of "2".

  • Under Immediate Actions, click "+ Add Action".

  • Action Type = Email Alerts, name your action and Email Alert = The name of your Email Alert you created above.

  • Click "Save."

  • Under "False" click the "+ Add Criteria," name your criteria and select " Conditions are met."

  • Under field, find Transaction Reattempt Number, set to "Equals," and value of "3".

  • Under Immediate Actions, click "+ Add Action".

  • Action Type = Post to Chatter, Action Name: "Notify Transaction Owner", Post To: This record.

  • Message: Enter any custom message you would like.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.

  • Click "Save."

  • Click "Activate."

L_06_transaction reattempt pic 3


L_06_transaction reattempt pic 4

On third reattempt, Chatter post will automatically get created and notify the Transaction owner.


What's Next