Ad-hoc survey requests are sent on a need basis as-and-when a specific contact becomes qualified to take the survey. These requests are triggered through API to Freshsurvey from Freshsales. These requests can be triggered to both email and web app embed collectors across all the survey frequencies (Transactional/ One-time/ Recurring). For example, when the contact status changes or when the contact is moved to the next stage in the sales pipeline.


How to configure an ad-hoc/transactional trigger request:


Note: When configuring the collector in Freshsurvey, select 'Transactional' as the survey frequency to trigger transactional surveys.  Read this article to know more about Freshsurvey's on-demand survey requests.


  1. On clicking ‘Show instructions,’ you will find the instructions to configure ad-hoc/transactional trigger requests via API (or webhook). Please select “Others” from the product dropdown.

  1. Go to Freshsales>Settings>Workflows

  2. Click ‘New workflow’.

  1. Select the Module as contacts

  2. Add Condition as per requirement.

  3. In the Action dropdown > Select ‘Trigger Webhook’

  1. Select “Request type” as ‘POST’

  2. Add the callback URL copied from the instructions in Freshsurvey in the URL.


  1. Click on ‘+Add custom header’

 

  1. Add the Key and Value respectively copied from Freshsurvey.


  1. Select the Encoding format as JSON and copy the pre-populated sample JSON payload with the respective placeholders you need to pass along with the request for contact creation and trigger.

(You can add the placeholder by clicking on ‘Insert placeholder’). And, add any additional payload information you may need in Freshsurvey under the  “transaction_context” section.

For instance, if you intend to capture contact owner details, you can achieve this by incorporating a custom contact field within Freshsurvey. In this case, I've added a field labeled 'Lead owner.' To ensure data capture, associate the appropriate placeholder.


  1. Click on Save 

  2. Click ‘Enable’

Note: Please ensure that automation is turned on for the webhook to trigger.