PayLink: Automated PayLink with Opportunities
  • 06 Oct 2023
  • 2 Minutes to read
  • Dark
    Light

PayLink: Automated PayLink with Opportunities

  • Dark
    Light

Article summary

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.
FieldTypeValue
AmountFormula[Opportunity].Amount
OpportunityField Reference[Opportunity].Id
DescriptionFormula[Opportunity].Description
Due DateFormula[Opportunity].CloseDate
ContactField 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.

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!