Salesforce Integration User Guide
Details about the Invocable Methods and Apex Triggers available in the SaaSquatch for Salesforce Integration.
Getting Started: Installation
Installation instructions for the SaaSquatch for Salesforce Integration can be found in our Salesforce Installation Guide. It is recommended to follow that guide to complete the initial installation before adding any of the customizations outlined in this guide.
Process Builder vs. Workflow Rules vs. Apex Triggers
Salesforce provides a number of tools for automating your business processes, including Lightning Process Builder, Workflow Rules, and Triggers.
The Salesforce Process Builder tool provides teams the ability to build and configure simple worksflows using drag-and-drop and point-and-click tools without the need to write any code.
Workflow Rules can help automate processes like Tasks, Email Alerts, Field Updates, and Outbound Messages. Each Workflow Rule consists of a Criteria and either an Immediate action or a Time-dependent action.
Apex Triggers are built using Apex code and are an advanced functionality available in Salesforce which provides the ability to build out custom functionality and workflows.
In most cases it is recommended to build something in Process Builder unless the desired functionality cannot be acomplished there. Business processes configured in Process Builder are much more stable in the long term compared to Workflow Rules, and Apex Triggers as they don't require continual updates to remain functional.
Further details about which tool to use when automating your business processes through Salesforce can be found in the Salesforce Trailhead.
Example Conversion Trigger via SFDC Process
The next part of this page will detail an example process that will convert a referral in a Growth Automation program via use of Custom Fields.
Note: Conversion by an
event
type trigger is not currently available with SaaSquatch for Salesforce Integration. Contact your support team for more details.
A. Add Custom Field to your Contact or Lead Object
1. Create a New Custom Field
From the Lightning "Fields & Relationships" menu in the Contact or Lead Object Manager page, select the option to create a New Custom Field.
After selecting the Field Type that suits your needs, make sure fill out the Field Label, the Field Name, and a description of the process and complete the rest of the Custom Field Creation.
2. Include Custom Field in Contact/Lead Layout
Head to the Lightning "Page Layout" menu in the Object (Contact/Lead) you just added that new Custom Field to, and ensure that that field is added to a Page Layout that is in use so you can make use of that field.
Details about adding a Custom Field to your Salesforce Object can be found in the Salesforce Trailhead.
B. Add SaaSquatch Process Builder Action
1. Create a New Process
From the Lightning Process Builder page select the option to create a New Process. Make sure fill out the Process name, a description of the process, and when the process starts.
It is also possible to add one of the SaaSquatch Envocable Methods to an existing Process. This can be done by adding an action in Step 4 of this guide.
2. Choose an Object
Click + Add Object
to select the subject of the Process start criteria. When this chosen object is either created or updated that will start the process.
3. Add Critera
The Critera being checked in order for your Process to continue running will depend on what you are looking to accomplish with your Process. For example, this Critera could be something like looking for a specific field in the contact record having been updated.
4. Add Action
The SaaSquatch Invocable Methods can be added as actions in Process Builder. Make sure you have created a Custom Object Field and displayed in the Page Layout of your Salesforce Object of choice (Lead or Contact) before proceeding with the next step.
- A. Click
+ Add Action
and select anApex
Action Type. Growth Automation programs will require an addition or change to a "Lead" or "Contact" Object.
See screenshot:
- B. Select and Define the Action:
- Select a name for your
Action
, something like "Convert Referral" or how frequently the action should run, like "Always".
See screenshot:
- Select the
Apex
class you would like to use. In this example the "Upsert User by Contact" class was used. Details about each of the available Invocable Methods in the SaaSquatch for Salesforce Integration can be found below.
See screenshot:
- Set the
Apex
Variables: The SaaSquatch Invocable MethodUpsert User by Lead
will sync acustomField
to the SaaSquatch record when the associated custom Field in SFDC is created or changed.
In this example the
field1Key
is equal to the SaasSquatchcustomField
value and thefield1Value is equal to the property of the
customField`'s attached value pairing:
- Select a name for your
Details about adding an actions or criteria to your Salesforce Process can be found in the Salesforce Trailhead.
Invocable Method List
The Referral SaaSquatch for Salesforce integration provides the following Invocable Methods for use in your Salesforce instance.
Please Note: Invocable Methods taged with Classic are only applicable to programs running on our Classic referral programs, not those on our Growth Automation platform. Please contact SaaSquatch to find out which method is right for your program.
Method Name | Version Introduced | Input Variable Name | Expect Variable Type | Expected Value | Description |
---|---|---|---|---|---|
Upsert User by Id | v1.3.0 | usersUpserts |
String | Id | Update a list of SaaSquatch Users based on their SaaSquatch User and Account Ids |
Upsert User by Lead | v1.3.0 | usersUpserts |
Lead | Lead | Update a list of SaaSquatch Users based on their associated SFDC Lead record |
Upsert User by Contact | v1.3.0 | usersUpserts |
Contact | Contact | Update a list of SaaSquatch Users based on their associated SFDC Contact record |
Upsert User by Opportunity | v1.3.0 | usersUpserts |
Opportunity | Opportunity | Update a list of SaaSquatch Users based on their associated SFDC Opportunity record |
Classic Convert Referral by Id | v1.2.0 | idsToConvert |
String | Id | Converts a list of SaaSquatch Accounts based on their SaaSquatch Account Ids |
Classic Convert Referral by Contact | v1.2.0 | contactsToConvert |
Contact | Contact | Converts a list of Salesforce Contacts |
Classic Convert Referral by Opportunity | v1.0.0 | opps |
Opportunity | Opportunity | Converts a list of Salesforce Opportunities |
Classic only Default SaaSquatch Triggers
The SaaSquatch for Salesforce Integration includes a number of built in triggers for Classic referral programs only. The majority of these triggers are enabled by default to provide the standard functionality of the integration.