Skip to content

Implementation Guide

Chris Rolfe edited this page May 18, 2023 · 5 revisions

Setup & Considerations

Audience

This guide is intended for users who have an advanced knowledge of Salesforce. If you are not an advanced user of Salesforce and would like to implement this solution, we suggest completing the Advanced Admin trail on Trailhead.

Required Editions and User Permissions

General information on how to install a package can also be found in Salesforce Help.

Available in: Lightning Experience Only Available in: Enterprise, Unlimited, and Developer Editions

User Permissions Needed:

To install packages:

  • Download AppExchange Packages

To configure installed packages

  • Customise Application

To process and manage Animal records

  • Edit on the following Standard Objects: Accounts, Contacts
  • Edit on all objects deployed in Animal Shelter Starter Package

Install Animal Shelter Starter

Be sure to evaluate and test the Animal Shelter Starter app in a sandbox environment first to ensure compatibility with any managed packages or custom code you already have.

Also ensure that this is evaluated against the larger technology roadmap, Salesforce data model, and the environment management strategy.

  1. Visit the Animal Shelter Starter AppExchange page.
  2. Click on the Get it Now button.
  3. Login to the correct Salesforce org which you want to install the app.
  4. Set permissions for All Users or Administrators if you are testing.
  5. Click Install. The installation may take a while. Check your email for confirmation that the installation was successful.
  6. Once you have received the notification that Animal Shelter Starter has been installed, login to the Salesforce org and check that the Animal Shelter Starter is now listed in the App Launcher.
  7. Success! You can now start testing/using the app.

Quick Start Checklist

Once you have installed Animal Shelter Starter, follow this checklist to confirm correct configuration. All of these actions are done in Setup

  • Enable Path
  • Update Page Layout assignments on the Animal Action Object
  • Update Page Layout assignments on the Location Object
  • Update Page Layout assignments on the Contact Object (optional)
  • Load Breeds Data (See Breeds Migration document)
  • Review and check Flows
  • Review and check Custom Settings

Architecture

Data Model

Entity Relationship Diagram

Standard Object Usage

As can be seen in the data model diagram above, only the Account and Contact standard objects are used in the app.

The Account object is used for organisations that an animal may have come from or go to, it is also used for Medicine manufacturers, and details of Vets that can be looked up. There are two custom fields on Account;

  • Animal Organisation used to indicate that the Account is another shelter or other animal organisation
  • Medicine Manufacturer is used to indicate that the Account can be selected as a Manufacturer in the Medicine object

These custom fields are used to filter records in the associated lookups from other objects and in flows.

Contact is used for animal owners, adopters, and for Foster contact details. Two custom fields are present on the object (Is a Foster, Is An Adopter) to indicate if the Contact is a Foster, an Adopter or both. The ‘Is a Foster’ field is used to filter lookups.

The Adopter Profile is a child object to Contact and has a Master Detail relationship.

Record Types

There are two objects in the app that use Record Types;

Animal Action - record types have been created to indicate the different actions that can be created against an animal. These are;

  • Exercise - exercise actions, i.e. walk, swim, etc. Duration is only used on this record type.
  • Treatment - treatment actions, i.e. medication. Treatment Type is only used on this record type.
  • Nutrition - nutrition actions i.e. diet requirements.

Location - record types have been created to indicate the different locations that can be used in the app. These are;

  • Site - used to define a physical location for the organisation.
  • Block - used to define a block within the shelter, i.e. Kennel Block, Cattery, etc. A block can have a Site record as parent.
  • Unit - used to define a sub location within a Block, i.e. Pod 1, Cage 2, Enclosure 3, etc
  • Foster - used to define a Foster location. This record type uses a lookup to Contact so that a Contact, which has the “Is a Foster” flag, can be selected. Foster Preference is only used on this record type to indicate which animals the Fosterer can care for.
  • Organisation - used to define a 3rd Party Organisation location, i.e. this could be another Animal Shelter. This record type uses a lookup to Account so that an Account, which has the “Animal Organisation” flag, can be selected.

Data Dictionary

There is an online link to the Data Dictionary for this Starter Package located here

Configuration

Lightning Experience (LEX)

With the app being installed and hosted on Salesforce, you can further customise the app to your organisation's requirements by adding additional Fields and Lookups to connect data together. Add new objects of your own or use standard Salesforce objects to further extend the information you can record.

If you are unsure about LEX Customisation, then head over to Trailhead and run through this free training module:

https://trailhead.salesforce.com/en/content/learn/modules/lex_customization

Mobile compatibility

The application has been designed to be used on the Salesforce mobile application. However, currently, the Action lists from the Actions Tab on the Animal page will not display on the mobile app. This will be corrected in a future release.

Security

As with any implementation, you set up security controls to show users only what they need to do their jobs or to interact with the app.

This guide doesn’t exhaustively cover all the security considerations such as organisation wide defaults, sharing rules, user role hierarchies, etc. We leave that up to you to decide what is appropriate for your organisation’s security model.

Due to the nature of the information being stored within the Animal Shelter Starter app, a number of Security Considerations should be taken into account during implementation and ongoing, which are in addition to the standard Salesforce recommendations, detailed here

  • Ensure, where Account and Contacts are linked within the solution, that communication preferences are honoured throughout their engagement. A useful object for this process is the Individual object, provided as standard with Salesforce, which can be related to the Contact object and other related objects to store preferences. Check-boxes and additional fields can also be added to the record to increase the options available.
  • Field-Level-Security (FLS) - FLS can be used to control access down to a field level, ensuring that only authorised users see the data they should and have the correct level of access (Read Only or Edit). This should be configured during the initial implementation and reviewed often.

Permission Set

To assist with the security configuration, there is a Permission Set provided called Animal Shelter Starter, which provides read/write access to all the objects, apex and app. You should assign this permission set to those users who need to access Animal Shelter Starter.

Flows

There are a number of flows included within the app, which carry out various automation and provide UI screens to help users carry out tasks more efficiently. When you first install the application, remember that these will need to be reviewed and activated.

Adopter Profile - Clean up matches on Deactivation - When an Adopter Profile is deactivated the Adopter Match - Record Clean Subflow is called to remove Adoption Match records that were based on the deactivated Adopter Profile. (Record-Triggered)

Adopter Profile - Create new Adopter Profile - Guides the user through the creation of an Adopter Profile for a given Contact. (Screen Flow)

Adopter Profile - Find Adoption Match - When an Adopter Profile is approved this flow checks for possible adoption matches, and calls the Auto Match sub flow. (Record-Triggered)

Adoption - Start Adoption Process - Initiated from a Quick Action this flow starts the adoption process by prompting the user to select a Contact as the potential adopter. If the selected Contact does not have an Adopter Profile, then the user is prompted to create one. An adoption record is created based on an existing or newly created Adopter Profile. (Screen Flow)

Animal - Action Scheduler - Allows different Animal Actions to be scheduled. Provides UI for user to input a schedule and create Animal Actions records (Screen Flow)

Animal - Adoption Manual matching Process - Provides the user with a manual process to create Adoption Match records. A list of possible adopters is displayed, based on the Adopter Profiles, and the user can select one or more to create Adoption Match records. (Screen Flow)

Animal - Adoption Update Automation - When the adoption record for an animal reaches the ‘Adopted’ stage, the animal record is updated with the associated Contact record, and the status is updated. A new Movement record is created for the adoption. (Record-Triggered)

Animal - Animal Create Update Trigger - Flow triggered on Animal creation/update. Replaces Process Builder. (Record-Triggered)

Animal - Animal Location Flow - Captures geolocation coordinates from the browser or device and updates the geolocation fields on the Animal record. Flow initiated from Quick Action on Animal record, or from the Capture Lightning Page. (Screen Flow)

Animal - Animal Release Flow - Captures geolocation coordinates from the browser or device, allows an animal that is marked for release to be selected, and updates the release location fields on the associated Movement record. Flow initiated from the Release Lightning Page. (Screen Flow)

Animal - Block Capacity Calculations - Calculates and populates the roll-up fields on the Locations object, Block Record Type to indicate capacity. Flow is initiated by a Process Builder on the Locations object (Autolaunched Flow)

Animal - Block Status Change - Allows the mass update of Location Units that are part of a Block. Provides UI that only appears on the Locations Lightning Record Page when a Block record is viewed. (Screen Flow)

Animal - Breeds Migration Flow - Used to migrate Animal records to the new Breeds object based solution. Initiated from a button on the Breeds object. (Screen Flow)

Animal - Cleans Up Adoption Matches - If an animal changes status from ‘Available for Adoption’ this flow will remove Adoption Match records related to the Animal. (Record-Triggered)

Animal - Clone Animal - Allows the animal that the flow was initiated from to be cloned a selected number of times, and displays cloned records for edit before. (Screen Flow)

Animal - Create Reciprocal Animal Relationship - When a relationship is created between two animals, this flow ensures the relationship is reciprocal.(Record-Triggered)

Animal - Deceased Animal Flow - Captures the deceased reason for the animal, and updates the animal record. Clears the animal's current Location and Movement records (Record-Triggered)

Animal - Exercise Action Completion - Allows a User to select and mark an Exercise Animal Action as complete, and records the duration. Flow is initiated from a Quick Action on the Animal Record Page (Screen Flow)

Animal - Find Adoption Match - When an animal is marked as available for adoption this flow calls the auto match flow to establish matches against approved Adopter Profiles. (Record-Triggered)

Animal - Length of Stay Calculation - Calculates the length of stay and animal has been in the Shelter as a whole. The calculation is based on the movement records and is cumulative. Flow is initiated by a Process Builder on the Animal object (Autolaunched Flow)

Animal - Movement Process - Allows the user to change the location of the animal, including moving the animal out and back into the shelter. The flow creates/updates movement records to provide a history of the animal's movements. Provides UI on the Animal Record Page in the Movements Tab. (Screen Flow)

Animal - Set Location Assessment Date - Sets the Last Assessment date to “today’s date” and sets the Assessment Due Date to “today plus 12 months”. Flow is initiated from a Quick Action on the Locations Record Page (Screen Flow)

Animal - Update Location Unit Status - Sets the availability of the Unit based on the unit’s capacity (Autolaunched).

Animal - Generate Animal Name on Record Create - Based on a Custom Setting (see section on Custom Settings) being set to True the Animal Name will be set to a prefix (if specified) and the Animal record Name (Auto Increment Field). (Record-Triggered)

Animal - Get What3words - If the What3words integration is enabled, this flow will call out to the what3words api to retrieve and store the geo coordinates of the phase.

Breed - Name Update Flow - Updates the Name field in the Breed object After Save to be a concatenation of Type and Species. (Autolaunched Flow)

Assessment - Create New Assessment - Flow to take the user through the process of creating a new assessment record. User is presented with the previous assessment record for reference. (Screen Flow)

Assessment - Update Behaviours on Animal - This flow (if the custom setting is enabled) will update the behaviours selected in the Assessment, and set them on the Animal record. (Record-Triggered)

Location - Location Create/Update Trigger - Flow triggered on Location creation/update. Replaces Process Builder. (Record-Triggered)

Movement - Movement Create/Update Trigger - Flow triggered on Movement creation/update. Replaces Process Builder. (Record-Triggered)

Sub Flows

Adopter Match - Record Clean Up - Subflow - Cleans up redundant Adoption Match records.

Adopter Match - Create Adoption Match Records - Subflow - Creates Adoption Match records, based on 4 matching criteria. Animal Type, Size of Animal, Gender, Age.

Adoption - Create Adoption Record SubFlow - Creates an adoption record.

Animal - Generate Tasks Subflow - A flow used to generate tasks. Used by the Action Schedule and Movement Process flows

Animal - Movement SubFlow - A flow used to create/update movement records. Used by the Movement Process flow.

Process Builders

NOTE: the Process Builders still exist in the package, but have been replaced with Record Triggered flows, therefore do not enable these

There are two Process Builders included within the app, which carry out various automations and initiate flows to help users carry out tasks more efficiently. When you first install the application, remember that these will need to be reviewed and activated. NOTE that the app has been configured with a single Process Builder per object, as per Salesforce best practices

Animal Object - Animal Object Handler Process

  • Initiates the Length of Stay flow
  • When the Lost/Found checkbox is checked, an Animal Alert is created to remind the user that Lost and Found agencies should be contacted.

Location Object - Location Object Handler Process

  • Initiates the Capacity Calculations flow

Validation Rules

There are a number of validation rules used:

Adopter Profile

  • Checks the Profile End Date is not earlier than the Profile Start Date.

Animal

  • If the Neutered/Spayed checkbox is True, then a Date must be entered
  • An animal marked as deceased must have a date and reason
  • If an animal has been PTS, then a PTS Reason is required.

Animal Action

  • When an Action is marked as Completed, a completion date is required.

Animal Alert

  • Checks the End Date is not earlier than the Start Date.

Location

  • If Capacity is set for multiple animals, the the Capacity number must be entered

Path

There are three Paths used on the Treatment, Adopter Profile, and Adoption processes. Ensure Path is enabled for these to be visible.

Global Picklists

Included with the app are several Global Picklists. These are predefined lists of values which can be used to populate picklists (aka Drop-Downs) on records within Salesforce. These are known as Picklist Value Sets and can be found in Setup > Objects and Fields > Picklist Value Sets.

The Animal Shelter Starter app provides the following sets:


Picklist Description
Animal Behaviours [Animal Shelter] A list of behaviours associated with animals
Animal Location Status [Animal Shelter] Status of Unit locations
Animal Schemes [Animal Shelter] Schemes that an animal maybe part of
Animal Size [Animal Shelter] Animal Sizes
Animal Type (Legacy) [Animal Shelter] Types of Animals - not used post version 1.12
Assessment Conditions [Animal Shelter] Choice of Assessment conditions used on multiple fields on assessment
Breed (Legacy) [Animal Shelter] Breed of Animal - Not used post version 1.12
Buildings (Legacy) [Animal Shelter] - NOT USED - Buildings where animals are housed
Contact Accommodation [Animal Shelter] Type of accommodation and Contact has
Type of Animal [Animal Shelter] Used on Adopter Profile object

Update/Modify Picklists To update or add the picklists, go to Setup > search for “Picklist Value Sets” and then select Picklist Value Sets. Then open the required list and make the changes needed. Remember to review and related Field Dependencies after you have made changes.

To learn more about Picklists and Picklist Value Sets, please complete this free online tutorial https://trailhead.salesforce.com/en/content/learn/modules/picklist_admin

Note on Picklists From November 2022, The Type and Breed picklists have been replaced with the Breeds object, and may be removed in a future release. You should use the Breeds object by default.

Page Layouts

Several Page Layouts are provided for the objects included in the Animal Shelter Starter app however you don’t need to use these and can create your own or copy and modify the existing ones included in the app.

To learn more about modifying page layouts, see this free online tutorial: https://trailhead.salesforce.com/content/learn/modules/lex_customization/lex_customization_page_layouts

Please note that as this is a managed package, future updates will also update the included page layouts in the package. If you want to maintain your own page layouts, then please clone the included page layouts or create your own. You can then add/remove fields which are also included in the package.

Custom Settings

From version 1.12 we have introduced a number of Custom Settings.  These are:

Animal Shelter Settings:

Name Data Type Description
Breeds Migration Complete Checkbox Used by the Breeds Migration flow to determine whether the migration has been completed
Default Animal Name Checkbox Indicates whether auto-naming of the Animal record is enabled
Default Animal Name Prefix Text If using auto-naming a user selected prefix will be added to the Animal Name
Disable Behaviour Update Checkbox When selected the behaviour field on the Animal record is not updated by the behaviour captured in the assessment
Enable Auto Match Checkbox Enables the creation of Auto Match records based on the Adopter Profile and Animal
What3Words API Key Text Used to store the API key for the what3words api integration
Microchip API Token Text Used to store the API token for the chipndoodle api integration

Custom Metadata Types

From version 1.14 a custom metadata type was introduced to provide the Age Category of the animal, which is used by the Adoption Match process.


The Animal Age Ranges is configured with 4 Age Levels, and allows the user to adapt the Out Of the Box configuration to suit their individual needs.  The default settings are as follows:


Label Minimum Maximum Description
Age Level 1 0.0 0.9 Junior
Age Level 2 1.0 2.9 Adolescent
Age Level 3 3.0 6.9 Mature
Age Level 4 7.0 99.0 Senior

This means that an Animal aged 5 will be categorised as Mature


Nonprofit Success Pack (NPSP)

Although NPSP is not a requirement for the Animal Shelter Starter app, it should be considered if you are also looking to manage any of the following activities on Salesforce:

  • Easily and effectively manage users, donors, contacts, volunteers, and more. Track Households and connections between your organisation's critical constituents.

  • Track donations, pledges, recurring and planned giving, hard and soft credits, and much, much more. Reconcile general allocation units, cash, and revenue across your entire organisation.


For more information about this free Salesforce solution, visit the AppExchange page here: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3000000B5Gx6EAF


Volunteers for Salesforce (V4S)

Volunteers for Salesforce is not required, however it provides tools for managing your organisation's volunteering program. You are able to track who your volunteers are and the hours they have worked, all of your volunteer jobs, both ongoing, and for a specific event, and shifts for specific jobs. 


The app also provides several Sites pages that you can host in your website to allow people to tell you they want to be a volunteer, or to actually sign up for a specific job (and shift).


You can find out more information about this free Salesforce solution at the following AppExchange page:

https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000003JBggEAG


Person Accounts

The Animal Shelter Starter Pack has been tested in an Org where Person Accounts are enabled, with no issues experienced.  If using Person Accounts ensure the relevant fields that have been created on Account and Contact are added to the respective Page Layout.