Freshdesk Integration
This guide explains how to send Freshdesk support ticket events as goal events to ABsmartly using Freshdesk Automation Rules. This allows you to track support ticket creation as a metric in your experiments — for example, to measure whether a new feature reduces or increases support requests.
Prerequisites
- ABsmartly account with access to the Web Console and a valid SDK API Key.
API Keys can be created under
Settings > API Keysin the ABsmartly Web Console. - Freshdesk account with Admin access to create automation rules.
- A unit type (e.g.
user_idoremail) that is shared between your ABsmartly experiments and your Freshdesk tickets so that events can be attributed to the correct user.
Step 1 — Create an Automation Rule with a Webhook
- In Freshdesk, go to Admin > Workflows > Automations.
- Select the Ticket Creation tab (or Ticket Updates if you want to trigger on updates).
- Click New Rule.
- Give the rule a name, for example:
Send ticket to ABsmartly. - Under Conditions, configure when the rule should fire. For example, to fire on every new ticket, you can leave the default conditions or add specific filters.
- Under Actions, select Trigger Webhook.
- Configure the webhook:
- Request Type:
POST - URL: Your ABsmartly Collector endpoint followed by
/context/publish. For example:https://your-subdomain.absmartly.io/v1/context/publish - Requires authentication: Toggle on, and enter your ABsmartly SDK API Key.
- Custom Headers (add each on a separate line):
X-API-Key: YOUR_ABSMARTLY_API_KEY
X-Application: www
X-Application-Version: 0
X-Environment: production
X-Agent: freshdesk-webhook
- Request Type:
- Select Encoding:
JSON. - Select Advanced content mode to write a custom JSON body.
- Enter the following payload:
{
"publishedAt": "{{ticket.created_at_with_timestamp}}",
"units": [
{
"type": "email",
"uid": "{{ticket.contact.email}}"
}
],
"goals": [
{
"name": "freshdesk_ticket_created",
"achievedAt": "{{ticket.created_at_with_timestamp}}",
"properties": {
"ticket_id": "{{ticket.id}}",
"subject": "{{ticket.subject}}",
"priority": "{{ticket.priority}}",
"status": "{{ticket.status}}"
}
}
]
}
- Click Save.
info
The
X-Application and X-Environment values must match existing entries in your ABsmartly Web Console under Settings > Applicationsand Settings > Environments.tip
Adjust the
units type and value to match the unit type you use in your ABsmartly experiments. For example, if your experiments use a user_id unit, you may need to use a custom Freshdesk contact field that contains the user ID.Step 2 — Create the Goal in ABsmartly
- In the ABsmartly Web Console, go to Settings > Goals.
- Create a new goal named
freshdesk_ticket_created(matching thenamein the webhook payload). - You can now use this goal as a metric in any of your experiments.
Available Freshdesk Placeholders
You can use Freshdesk placeholders in the webhook payload to dynamically include ticket data. Some useful ones:
| Placeholder | Description |
|---|---|
{{ticket.id}} | The ticket ID |
{{ticket.subject}} | The ticket subject |
{{ticket.contact.email}} | The requester's email address |
{{ticket.contact.name}} | The requester's name |
{{ticket.priority}} | The ticket priority |
{{ticket.status}} | The ticket status |
{{ticket.company.name}} | The associated company name |
{{Triggered event}} | The name of the event that triggered the rule |
Tracking Different Ticket Events
You can create multiple automation rules to track different types of events as separate goals:
- Ticket resolved — Create a rule under Ticket Updates with the condition
Status changes to Resolved, goal name:freshdesk_ticket_resolved. - High-priority ticket — Add a condition
Priority is Urgent, goal name:freshdesk_urgent_ticket_created. - Ticket assigned to group — Trigger when a ticket is assigned to a specific group,
goal name:
freshdesk_ticket_escalated.
info
Freshdesk automation webhooks are rate-limited to 1,000 calls per hour. Failed requests are automatically retried every 30 minutes for up to 48 attempts.
Verifying the Integration
- Create a test ticket in Freshdesk from a contact whose identifier (e.g. email) is also being tracked in an ABsmartly experiment.
- Check the ABsmartly Web Console under the experiment's goals to verify
that the
freshdesk_ticket_createdevent was received. - In Freshdesk, check the automation rule's activity log to confirm the webhook was triggered.
If you have any issues setting up the Freshdesk integration, please contact us at [email protected].