Dynamically Generated Filtered Dashboards

Back to Help Center

Set up unique survey dashboards for each of your teammates, support agents, or stakeholders using dynamic dashboard filters. Setting up dynamic dashboard filters helps you make the most of your GetFeedback dashboard reporting within Salesforce.

Getting Started

If you need a basic overview of how our dashboards work, please read over our basics of dashboards help article.

Before implementing automatically generated filtered dashboards in your own Salesforce Org, it's important to understand the link structure of GetFeedback’s dashboards and how to use the HMAC key your recipients will use to validate the dashboard link.

Input String Structure for HMAC Key

https://www.getfeedback.com/d/f/[DASHBOARD_TOKEN]?[QUERY_PARAMETERS]&gf_hmac=[HMAC_SIGNATURE]

kA61J000000VcIWSA0_en_US_1_0
  • Do not include the starting question mark “?” or the trailing ampersand “&” when generating your HMAC signature based on a given set of query parameters.

  • You will want include ampersands appearing in the middle of your query parameter string.

  • Retrieve your own unique dashboard token and encryption keys from the filtered dashboard view in GetFeedback.

Setup Filtered Views

1. In GetFeedback, open your survey dashboard and click Share this dashboard in the upper-right corner

2. Click the Filtered Views tab, and expand the drop down menu labeled Generate Your Own Links. Copy the  HMAC Key and Dashboard token.

kA61J000000VcIWSA0_en_US_1_2

3. In Salesforce Setup, type “Custom Labels” into the quick search. Create a new Custom Label with the name “GF_HMAC_Key“ and input your HMAC key from Step 2 as the value.

OGThDTk6B-F1N-a14A-BzgHeUW5IGHFvGNCuULhI7bVuolTkvamSkzlknWNcUzr8EekjMamO0DDMI0QNIkHa8MSS4DF001ZH9sD4YBOOWMQC7RHP87lwRKWxW6HoDwuXor4qXrC0

4. In Salesforce Setup > Object Manager, create a new field under the User object with a URL data type to store the link resulting from the Apex Trigger we will create in the next step:

x0XLFMG-Mi3W-vm2xmampCl0aID-uufqAK49GJd_tvRbQDxZ03MZ3b4MZEhi9MFoijxMT8Gdmxzc_4S4leVNSrdeQgbkMnzBYF7_08ANimjC1o9eos5DwIMAtZ_kKgiD-PTF5aLv

This field can be placed on any other object as appropriate. Take note of the API name of the field.

5. Add the following Apex Trigger named “gfHMACTrigger“ to your Salesforce Org, taking care to input the correct dashboard token, Custom Label and URL Field API names according to the prior setup steps:


trigger gfHMACTrigger on User (before Update) {
for (User u : Trigger.New) {
u.GetFeedback_Filtered_Dashboard__c = 'https://www.getfeedback.com/d/f/
[DASHBOARD_TOKEN]
?agent=' + UserInfo.getUserId() + '&gf_hmac=' +
EncodingUtil.urlEncode(EncodingUtil.base64Encode(Crypto.generateMac('HmacSHA256', Blob.ValueOf('agent=' + UserInfo.getUserId()), Blob.ValueOf(System.Label.GF_HMAC_Key ))),'UTF-8'); }
}

6. When sending surveys, make sure to append the values required for any and all of your filtering criteria as merge fields in the survey link e.g:

https://www.getfeedback.com/r/[survey_token]?agent=005360000038S2DAAU

After completing this implementation, your organization users will be able to click on their personalized dashboard links under their user profile to open each individual’s filtered view of the dashboard:

hW9h7V3QYenS2UzgOLY7GW_RyFglusiZ4pHL2kzy-4_slEOdqc_mLhbAoTAYpPFkO-vsVow8AUNwkMbfBYb8Q7A0ki6AzcxbfzmPcK-vKUKkEN3hs8FQCA2hooFvA-SdbJzEzOEl

NmKUkygk96g-Q4y22KlKjBy6M4X5qK4uEyv58g5J04kbrIKz2ObJnOG-hEdAzRf3Yx48xdfVmJakvF850uh_Wb7cU2BtWJOkN7uMGtRLBlEnDYevYWfNPdXVxgX-grdxNcqne6R4

© 2020 GetFeedback, Inc.|888-684-8821|Terms of use|Privacy notice|California privacy notice

*Net Promoter, Net Promoter System, Net Promoter Score, NPS and the NPS-related emoticons are registered trademarks of Bain & Company, Inc., Fred Reichheld and Satmetrix Systems, Inc.