Skip to main content
Solved

Webhook from slider custom button


Alistair FIeld
Forum|alt.badge.img+2

Good day fantastical people.

 

I am creating a slider with different CTAs on each slide. I would like to link the custom button to a webhook that gets caught by zapier.

 

I have the webhook set in PX

I have the catch in Zapier

 

How can I trigger the webhook from the button?

Best answer by link_black

Thanks for posting to PX Community ​@Alistair FIeld !

 

The PX Engagements Webhooks messages do not provide that level of “button” specificity, only that something was “clicked”.  I suspect you may already know this if you have tested that option.

 

For this use case, I would recommend using the PX Custom Event Webhook instead.  Other than creating the PX Webhook for that Custom Event, you would need to the necessary JavaScript code to your HTML source code in that Engagement for your button(s).  After that, when the Engagement button is clicked a new PX Custom Event is also created, which will be sent as a PX Webhook message to your destination for processing.

 

Here is some sample Engagement source HTML for doing this is on a button:

-------------------

<span class="apt-custom-button" style="color: #ffffff; font-family: Arial, Helvetica, sans-serif;">&nbsp; <a href="http://www.gainsight.com" onclick="aptrinsic('track', 'LearnMore', {'clicked': 'true'});" rel="noopener noreferrer" style="text-decoration: none; color: inherit;" target="_blank"><span style="text-align: center; line-height: normal; border-radius: 3px ; background-color: #0181c8; padding: 10px 15px 10px 15px; display:inline-block; margin-left: auto; margin-right: auto; cursor: pointer; font-size: 13px;">I want to Learn More</span></a></span>


 

I hope this helps, Happy PX-ing!!!

View original
Did you find this topic helpful?

4 replies

link_black
Forum|alt.badge.img+2
  • Gainsight Employee ⭐️⭐️
  • 316 replies
  • Answer
  • February 7, 2025

Thanks for posting to PX Community ​@Alistair FIeld !

 

The PX Engagements Webhooks messages do not provide that level of “button” specificity, only that something was “clicked”.  I suspect you may already know this if you have tested that option.

 

For this use case, I would recommend using the PX Custom Event Webhook instead.  Other than creating the PX Webhook for that Custom Event, you would need to the necessary JavaScript code to your HTML source code in that Engagement for your button(s).  After that, when the Engagement button is clicked a new PX Custom Event is also created, which will be sent as a PX Webhook message to your destination for processing.

 

Here is some sample Engagement source HTML for doing this is on a button:

-------------------

<span class="apt-custom-button" style="color: #ffffff; font-family: Arial, Helvetica, sans-serif;">&nbsp; <a href="http://www.gainsight.com" onclick="aptrinsic('track', 'LearnMore', {'clicked': 'true'});" rel="noopener noreferrer" style="text-decoration: none; color: inherit;" target="_blank"><span style="text-align: center; line-height: normal; border-radius: 3px ; background-color: #0181c8; padding: 10px 15px 10px 15px; display:inline-block; margin-left: auto; margin-right: auto; cursor: pointer; font-size: 13px;">I want to Learn More</span></a></span>


 

I hope this helps, Happy PX-ing!!!


Alistair FIeld
Forum|alt.badge.img+2
  • Author
  • Helper ⭐️⭐️⭐️
  • 246 replies
  • February 7, 2025

Thanks ​@link_black I will give it a go. I was trying to use product mapper and  feature trigger to send the webhook but knew the custom event was the way.

 

I will let you know how it goes.


Alistair FIeld
Forum|alt.badge.img+2
  • Author
  • Helper ⭐️⭐️⭐️
  • 246 replies
  • February 10, 2025

Thank you ​@link_black that was the guidance I needed.


Alistair FIeld
Forum|alt.badge.img+2
  • Author
  • Helper ⭐️⭐️⭐️
  • 246 replies
  • March 6, 2025

Just to close the loop here.

I have a PX slider give the user options for their avatar.

We need to keep the avatars locked down for privacy, BUT using the engagement I can use the webhook to kick off the engagement and using the API update the user avatar.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings