How to tell where an object was created in HOC (Tracking Fields for Public Site, Sharing Portal and Check-In Kiosk)
Objects that are created administratively in Salesforce always tell you who created it, and who (and when) it was last modified: These are standard SF fields called "Created by" and "Last Modified". They identify the Salesforce User who created and last modified the record. For example:
Who is the user HOC Admin XXXX?
The 'user' responsible for creating many of the records in Salesforce is the API user that is part of your HOC installation. This user typically has a name like HOC Admin, XXXX. (where XXXX is your HandsOn Connect client number. The email address of the API user is typically clientXXXX@handsonconnect.org (where XXXX is your HandsOn Connect client number.)
Records created by the API user include Volunteer Opportunities, Occurrences and other objects created via the Volunteer Opportunity Wizard or various workflows and automations built into the administrative end of HOC.
Also: Any contact, connection, volunteer opportunity, occurrence, or any other object created through actions on the public site, or in the sharing portal, or via the check-in kiosk will appear to be created by the HOC Admin (API user).
Is there anyway to know where the record was actually created then? Admin or Public Site?
Since all these records appear to be created by the same API user... is there any way to tell whether the record was created in SF, via the public site, or the sharing portal, or the check-in Kiosk?
Yes there is! Through hidden 'tracking fields" in most of these objects. If you have a need to know where a record was created, you can either add these tracking fields to the 'system admin' section of page layouts -- or, use list views or reports to find where the record was created and/or last modified.
This article will explain the HandsOn Connect tracking fields that can help you diagnose where a record was created and modified, and by whom:
Public site or Admin?
Creation Source - HOC__Source__c : This field has a value set to PUBLIC if created from public site or sharing portal, or kiosk. No value is set if the record was created administratively. (So if its null - you know it was done administratively in Salesforce.
Where on the public site was it created or modified?
Creation Source — HOC_CreationSource_c This field has a value which will tell you where the record was created.
Edition Source -- HOC_EditionSource_c This field has a value which will tell you where the record was last modified.
The possible values for these two fields are the following:
- 'HOC-VolunterPortal-3.0': When record is created or edited from the Volunteer Portal (Generally the action is performed by a volunteer or team captain)
- 'HOC-SharingPortal-3.0': When record is created or edited from the Sharing Portal (The action is performed for a Partner Staff or a Volunteer Leader)
- 'HOC-VolunterPortal-OrgCreation-3.0': This to identify the contacts created via the Organization Registration form.
- 'HOC-VolunterPortal-MultipleConnections-3.0': This is to identify the connections created as a part of a group of connections created at the same time.
- 'HOC-Kiosk-3.0': To identify contacts or connections created via the Check-In Kiosk.
- 'HOC-ContactlessKiosk-3.0' - To identify connections modified by the Touchless Check-in App.
Can we tell which contact actually created or modified the record via the public site or sharing portal?
Even if we know a record was created or modified via the sharing portal (for example), is it possible to know WHICH contact (partner staff) created or modified the record. Yes it is.
The fields that track this are:
Site 3.0 Created By.
These fields store the contact id identifying who created or edited the record, If done via public site or sharing portal or check-in kiosk)
You can then look up the contact ID to find out WHO created or modified the record.
Just add the Salesforce ID found in this field (example: 0031N00001y15S8QA). to a SF URL to look up the record associated with that ID.
And now we know the record was created or modified by Ashley Schmidt.
Since HOC returns the contact ID for the person who created or modified the record in the sharing portal, you'd can always look up the contact via the ID in Salesforce. HOC does not return the 'name' of the contact associated with that ID.
However, if you wanted to see that name without having to look up the ID (because you often want to know WHO created or modified the record) you COULD create a custom field called Site 3_0 Creator Name, and one called Site 3-0 Modifier Name (both of type 'text', and a process builder that would populate the field with the name of the contact record matching the ID.
If you have experience with process builder, you can do this. Here's how to do it for identifying the name of the person creating or modifying the connection record in the sharing portal:
Create two custom text fields in the connection record called:
Site 3-0 Modifier Name
Site 3-0 Creator Name and build the following process.
(Screen shots of the process you would build using Process Builder
Object = Connection
First Criteria: Site 3.0 Modified is Changed
use the following criteria and one immediate action
Second Criteria: Site 3.0 Creator is Populated,
Use the following criteria and one immediate action
And add a stop after the 2nd criteria!
If you wish, you can create this same process builder for the fields Volunteer Opportunity, Occurrence and/or Contact so that you can always get the name of the sharing portal user who created or modified a record!