Embedded Cards in Salesforce: Dynamic Filter

Reply
Green Belt

Embedded Cards in Salesforce: Dynamic Filter

Hi all, does anyway know if there is a way to dynamically filter a Domo card embedded in salesforce on a unique value in the salesforce page (like customer or account ID).  We wanted to embed cards on a customer overview page to show historical sales for that customer, but I do not want to have to create one for every customer (15k +).  I doubt this is possible today, but I know I can use embedded links in Domo data tables to link directly to a salesforce page, I just wonder if anyone figured out a way to have that page id filter the Domo card embedded in Salesforce.  

 

Thanks,

Josh

 


Accepted Solutions
Highlighted
CJ
Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

Hey Josh, I had the same issue. I was reading this post and almost thought I wrote it. Lol.

Fortunately there is something you can do to start with. It’s not ideal as the ideal state would be all the way down to the card level filter parameters with the embed feature, but it works for us and I think it will work for you as well. So here we go.....

Domo pages can be passed filters via a query string. So you can embed pages via a visualforce page and pass account or any other id’s to the page. It will then filter the entire page on the field or fields you want.

Here is the pfilters structure you can append to any domo page or card url to pass filtering:
pfilters=[{"dataSetId":<ID>, "column": "<Column Name>", "dataType": "<string |number | date>" , "operand":"IN", "values":<Array of values>}]

One other neat feature is if you have cards that are using different data sets, blends or etl’s and want to filter them all on a common field then just leave the data set blank. As long as all of your data sets share the same field name they will all filter on the value you passed even though the are not the same data set.

I have not been able to find a solution for single cards yet but my suggestion to Domo is to add this querystring capability to the embed card functionality and now we have max flexibility and don’t need to load the whole Domo interface in the SalesForce view.

Hope this helps.

CJ
Green Belt

Re: Embedded Cards in Salesforce: Dynamic Filter

I got it to work!!!!

<apexSmiley Tongueage standardController="Account">

<iframe src="https://my.domo.com/embed/card/11111186?enable=title&pfilters=[{%22column%22:%22AccountId%22,%22dataType%22:%22STRING%22,%22operand%22:%22IN%22,
%22values%22:[%22{!Account.Id}%22]}]
" width="600" height="550" marginheight="0" marginwidth="0" frameborder="0" scrolling="yes"></iframe></apexSmiley Tongueage>

 


All Replies
Highlighted
CJ
Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

Hey Josh, I had the same issue. I was reading this post and almost thought I wrote it. Lol.

Fortunately there is something you can do to start with. It’s not ideal as the ideal state would be all the way down to the card level filter parameters with the embed feature, but it works for us and I think it will work for you as well. So here we go.....

Domo pages can be passed filters via a query string. So you can embed pages via a visualforce page and pass account or any other id’s to the page. It will then filter the entire page on the field or fields you want.

Here is the pfilters structure you can append to any domo page or card url to pass filtering:
pfilters=[{"dataSetId":<ID>, "column": "<Column Name>", "dataType": "<string |number | date>" , "operand":"IN", "values":<Array of values>}]

One other neat feature is if you have cards that are using different data sets, blends or etl’s and want to filter them all on a common field then just leave the data set blank. As long as all of your data sets share the same field name they will all filter on the value you passed even though the are not the same data set.

I have not been able to find a solution for single cards yet but my suggestion to Domo is to add this querystring capability to the embed card functionality and now we have max flexibility and don’t need to load the whole Domo interface in the SalesForce view.

Hope this helps.

CJ
Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

I am trying to follow the steps by attaching the pfilters query string to the DOMO Card URL in apex iframe. But I am not successful in acheiving it. Can you let me know how you acheived to filter the DOMO card via Saleforce.It would be helpful if you also provide the steps or a syntax to acheive this.

Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter


@CJwrote:
Hey Josh, I had the same issue. I was reading this post and almost thought I wrote it. Lol.

Fortunately there is something you can do to start with. It’s not ideal as the ideal state would be all the way down to the card level filter parameters with the embed feature, but it works for us and I think it will work for you as well. So here we go.....

Domo pages can be passed filters via a query string. So you can embed pages via a visualforce page and pass account or any other id’s to the page. It will then filter the entire page on the field or fields you want.

Here is the pfilters structure you can append to any domo page or card url to pass filtering:
pfilters=[{"dataSetId":<ID>, "column": "<Column Name>", "dataType": "<string |number | date>" , "operand":"IN", "values":<Array of values>}]

One other neat feature is if you have cards that are using different data sets, blends or etl’s and want to filter them all on a common field then just leave the data set blank. As long as all of your data sets share the same field name they will all filter on the value you passed even though the are not the same data set.

I have not been able to find a solution for single cards yet but my suggestion to Domo is to add this querystring capability to the embed card functionality and now we have max flexibility and don’t need to load the whole Domo interface in the SalesForce view.

Hope this helps.

CJ


Hi @CJ, I was able  to achieve the page filters as per your suggestion and also per the information available in Best Mode. But my requirement is When I login into Salesforce as an admin I need to view all the details in the embeded cards(My Cards is simple line Graph between Agents and No Of Consumers) and if I login as an Agent I need to view only that Agents data.

Any suggestions on the above filtering method would be helpful.

 

CJ
Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

Do you have a field in the data set that Id's the individual agent?  If you do then just pass that from Salesforce as a filter value on that column when not logged in as an admin.  When you are an admin then don't pass the filter value and you should get all the data to power those cards.

Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

@CJwrote:

Do you have a field in the data set that Id's the individual agent?  If you do then just pass that from Salesforce as a filter value on that column when not logged in as an admin.  When you are an admin then don't pass the filter value and you should get all the data to power those cards.


@CJ : Yes I do have the field in the Dataset that holds the ID's of the individual agent. As I am new to this tool as in DOMO and SalesForce. Can you please let me know the ellaborated steps to pass the id as a filter value when admin and when as an agent. It would be helpful for me as well other users. Thanks in advance for your support.

Visitor

Re: Embedded Cards in Salesforce: Dynamic Filter

Re: Embedded Cards in Salesforce: Dynamic Filter

This is great,we can use it to filter individual embedded cards within our visualforce page. Thank you so much for posting!!

Welcome to Dojo

Re: Embedded Cards in Salesforce: Dynamic Filter

Hi CJ,

By any chance did you have SSO enabled for DOMO?  We have SSO enabled but since this is embedded in Salesforce it is not allowing for the authentication without first signing into DOMO.

Any help would be great.

Thanks Dwayne

Green Belt

Re: Embedded Cards in Salesforce: Dynamic Filter

Is there any way you can share with me the url you used in the salesforce Iframe? (remove any sensitive data and replace with generic terms) 

 

I can't figure out how to pass the data in the URL....

 

this is all I'm able to get working:

 

<apexSmiley Tongueage standardController="Account">

<iframe src="https://mycompany.domo.com/embed/card/720220402?" width="350" height="250" marginheight="0" marginwidth="0" frameborder="0" scrolling="no"></iframe></apexSmiley Tongueage>
Announcements
Looking for the latest Community solutions? Please visit our accepted solutions board here!