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.
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.
Go to Freshsales>Settings>Workflows
Click ‘New workflow’.
Select the Module as contacts
Add Condition as per requirement.
In the Action dropdown > Select ‘Trigger Webhook’
Select “Request type” as ‘POST’
Add the callback URL copied from the instructions in Freshsurvey in the URL.
Click on ‘+Add custom header’
Add the Key and Value respectively copied from Freshsurvey.
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.
Click on Save
Note: Please ensure that automation is turned on for the webhook to trigger.