Ad-hoc survey requests are sent on a need basis as-and-when a specific contact becomes eligible to take the survey. These requests are triggered through API to Freshsurvey from Freshdesk. These requests can be triggered to both email and web app embed collectors across all the survey frequencies (Transactional/ One-time/ Recurring). For example, you can trigger the survey to a Freshdesk requester whenever a support agent resolves a ticket.
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.
Once you activate the collector, Click on ‘Show instructions’.
On clicking ‘Show instructions,’ you will find the instructions to configure ad-hoc/transactional trigger requests via API (or webhook). Please select ‘Freshdesk’ from the product dropdown.
Go to Freshdesk> click on ‘Admin’.
Search for ‘Automations’ under Workflows
Click on ‘Ticket updates’> New Rule
Enter the Automation rule name
Select the respective ‘Action performed by’ option that meets your requirement.
Select the ‘Events’ on which you would like the automation to be triggered.
Ex: When ticket status is changed from ‘Any status’ to ‘Resolved’ from any agent.
In ‘Perform these actions
> Select ‘Trigger webhook’
> Request type as ‘POST’
> In URL, add the callback URL copied from the instructions in Freshsurvey.
> Toggle on the ‘Add custom headers’ and pass the ‘Key’ and ‘Value’. You can find the values from the Freshsurvey instructions.
{
"apiKey": "<Value>"
}
Now, Copy the pre-populated sample JSON payload with the respective placeholders you need to pass along with the request for contact creation and trigger. Add any additional payload information you may need in Freshsurvey under the “transaction_context” section.
6. Click on ‘Preview and Save’>Save
Note: Please make sure that automation is turned on for the webhook to trigger.