Skip to main content
link_black
Gainsight Employee ⭐️⭐️
June 8, 2020

Tip of the Week: Using a PX Dialog Engagement to collect additional information from your users to store on their PX User Profile

  • June 8, 2020
  • 11 replies
  • 1822 views

I had a great conversation with one of our PX customers last week about this use case.   

 

As a refresher, PX does not create PX Users and User attributes on its own.  PX relies on your user/account data to be passed through the PX Identify call code in your applications, developer inserts/updates using our PX REST API, imports/updates using our PX Data Loader, mapped fields synched with the CRM system using our Salesforce integration, and/or updates from the Customer Success platform using our new “Load to PX” CS Rule Action type.

 

All of the above are great options for creating rich PX User profiles with many attributes that can be leveraged for PX Analytics and PX Engagement targeting … plus many other use cases for sure.  

 

So, the specific use case that we discussed was… “In addition to application usage data, how can PX help us to collect additional user information that we do not already have available within our business systems, such as job role, job responsibility, interests, etc.?”  Well, PX has you covered here too!

 

 

Here is how it can be done…

 

Our PX Web SDK (JavaScript) API has a newer method available that can be used as a standalone JavaScript call within your application or even used on a Custom Button in a PX Dialog Engagement, which is the focus of this post.  This Javascript method looks like the following:

 

aptrinsic('set', 'user', {'[attribute_api_name]':’[attribute_value]’});"

 

[attribute_api_name] is the PX User Attribute API name from your Users Model in PX.

[attribute_value] is the PX User attribute value you want to record on the users profile in PX.

 

While you cannot add a bunch of JavaScript code to the source of a PX Engagement, you can make simple JavaScript calls when the user clicks a Custom Button using the “onclick” <a href> property.  You will need to edit the source code of your Engagement to do this, but it is not hard, and below is an example screenshot of how this can be implemented on a PX custom button:

apt_Wgg2hDMBY5HxipV9fIyZiVL98SJWRWBM2GB-vHNiEdhgmePczAfZ0kTkbMINwBv_jl2r4fAei_IKKOaf-4zg84xXc34CNouBhKPLKkg_LBov4uU-cLWa2ySMUtusCRlMDRCQ

 

And here is how the actual PX Dialog Engagement could look for your users:

vT2bxwzmgpjB3btXBvSLkHUQuCyzb11VFRRBYjZbhKOn1oM9zvLkoARvBQ21tV9j8ex78e9GdGDZ04YbGLdzg8yzsydT1ArFiSSA1DHuF3AP99Cmget7blrWxu4ttgv8LMUEUJ8O

 

As for Audience Logic, you will probably want to set this up to be triggered when the desired PX User Attribute field is empty such as the following:

m6c8EKtTono0RGmNaIzeyVu-raNZKAmVs55hfdxZXb3h5xF2Wcby10dvQggs30hx-GCEVoErwbxCKFYtkpHwieAGgItzzPg_eLr35Niw2fscNhErkbYombzcIBNa1m90t0-XVw8i

And, for Qualification Scope you would probably want to give the user many chances to update their data with some time in between requests such as the following.

ps19BG_Ec81VH4iVmnqDzqNu5KNUka33ScpeVsmfxIFSZWhBNJmOnmc9crFgVMZn_d0w9P7fVoc9DKy57yGnoAgJYYxlyNNq5Ca1R2nlIHJe22I8a9lK4Q5nB2lD2t7cUTxP5iA1

 

 

I hope this helps someone with similar use cases, but we would love to get your feedback and other interesting use cases that you come up with too.

 

Happy PX-ing!

11 replies

brenna.oneill
Contributor ⭐️⭐️
February 22, 2024

Edited to add: I got help from the amazing PX Support team and my issue is solved 😄

 

Hello everyone! We are trying to use this api call to update a user attribute. We are not using the no code solution because we are actually also utilizing a branching flow in this engagement to capture additional data points, but only showing the need to know steps to users. Unfortunately it does not seem to work as expected. The code in the new editor looks much different than the screenshots shared above, so I am hoping we set it up correctly, but any extra eyes on it to see what could be going on would be helpful. Thanks in advance!


  


<p>
<button data-gramm="false" data-lt-tmp-id="lt-461595" id="pxCustomButton-123e8338-34af-4838-84ef-937b8c515672" onclick="aptrinsic{'set','user',{'Job_Department':'IT/Technology'});" spellcheck="false" style="
padding-right: 16px;
padding-top: 16px;
padding-left: 16px;
padding-bottom: 16px;
border-radius: 16px;
background-color: rgba(4, 112, 247, 1);
color: #ffffff;
font-size: 14px;
font-family: Helvetica, Helvetica;
font-style: unset;
font-weight: unset;
text-decoration: none;
border-style: none;
border-width: 0px;
border-color: #0470F7;
cursor: pointer;
display: inline-block;">IT&nbsp;/&nbsp;Tech</button>
</p>