Connect to Freshservice from Trelica

In Trelica, go to Admin > Integrations > Freshservice and click Connect.

Find your API key

  1. Log in to Freshservice.
  2. Click on your profile avatar in the top right corner of your screen.
  3. Click on Profile settings:
  4. Copy your API Key to the clipboard:

Actions on Freshservice agents

Permanently remove access

The Delete action in Trelica is the same as Forget Agent in Freshservice.

  • All incidents and notes (public and private) created by this agent will be deleted.

  • All Service Requests which were requested for this user will also be deleted.

  • The 'Forgot Agent' action will be recorded under the Activities tab.

  • The previous actions performed by the forgotten agent (including their name) will remain in the audit log.

Reduce costs

If an agent is not active in Freshservice, either:

  1. Change the user license type from Full-Time to Occasional. This will switch billing to use day passes, rather than as a full-time agent.

    Change the user license type back to Occasional if the agent becomes more active to avoid purchasing additional day passes.


  2. Deactivate the user. The user will no longer have access to Freshservice:
    • You will not be able to assign entities (such as tickets, problems, assets and projects) to them.
    • All tickets assigned to the agent with Open, In Progress or Pending statuses will automatically become unassigned.

    • All tickets assigned to the agent with Resolved and Closed statuses will remain as it is.

    • The agent will automatically be removed from all account level configurations except workflow automator, in which users will have to manually remove the agent from the associated workflow.

Keep Trelica tasks and Freshservice tickets in sync

When you connect to Freshservice from Trelica you can enable the Create Tickets option.

To keep a Trelica task's status in sync with a Freshservice ticket, you will need to create a workflow using Freshservice's Workflow Automator that will update Trelica when the ticket's status changes.

Before starting, go to the Freshservice integration in Trelica, and find the Callback URL for the Freshservice ticket automator. You will need this when setting up the Freshservice workflow. 

Create a Freshservice workflow

  1. Navigate to the Admin page in Freshservice.
  2. On the Admin page, click the Workflow Automator link within the Automation & Productivity section. You can search for workflow automator.
  3. On the Workflow Automator page, click New Workflow, followed by selecting the Event Based Workflow type.
  4. Name the workflow Trelica tickets and select Tickets as the Module.

    We recommend an optional description like Keeps Trelica tasks in sync with Freshservice tickets that have been created via the Trelica source..

  5. Add the following events as triggers for the workflow:
    • Ticket is updated
    • Ticket is deleted
    • Ticket is marked as spam
    • Status is changed from Any Status to Any Status
    • Due date is changed
  6. Drag and drop a Condition after the Event (this will be named "Ticket is updated" if you've left the name as the default) in the workflow and select Ticket Fields.Source is Trelica.

  7. Drag and drop an Action after the Condition and select Trigger Webhook.

  8. Select POST for the Request Type,

  9. Enter the Callback URL which you took from Trelica. It will be something like:

  10. Select Credentials > Inline Credentials, and No Auth for the Authentication Type.

  11. Set Encoding to JSON and Simple

  12. Select the following properties for Content:

    • Ticket URL
    • Due By Time
    • Ticket ID (numeric)
    • Status
    • Source
  13. Set the label to Update Trelica and click Done.
  14. Once you have configured the event and action, click Activate on the workflow to ensure it's enabled.

    Note that you'll want to Deactivate or Delete the workflow you've created if you disconnect the Trelica integration.

Initiate a workflow from a Freshservice ticket

Much of the configuration for initiating a workflow from a Freshservice ticket is the same as that for keeping tickets in sync, but there are some important differences. Your exact configuration will depend on the ticket type and workflow process you are trying to implement. The following guide is based on using a Service Request ticket to initiate an offboarding workflow for an employee.

In Trelica

Create a workflow with trigger type API Webhook. Note the URL on the trigger step - this will be used as the callback URL when configuring your workflow automation in Freshservice.

fs ticket webhook 1.png

In Freshservice

  1. Create an Event Based workflow automation, as described in the steps above for sync'ing Freshservice tickets.
  2. For an offboarding workflow select the Event trigger as Service Request is Created.
  3. Add a Field Condition that that will apply an appropriate filter to limit the workflow to service request tickets that are used for offboarding (for example, using the ticket title).
  4. Drag and drop an Action after the Condition and select Trigger Webhook.

  5. Select POST for the Request Type,

  6. Enter the Callback URL from the Trelica workflow API Webhook trigger step.

  7. Select Credentials > Inline Credentials, and No Auth for the Authentication Type.

  8. If you want to apply additional security to your webhook messaging configure Custom Headers. Click here to learn more about sending a secret in a webhook header.
  9. Set Encoding to JSON and Advanced

  10. In the input field you can now define the JSON message structure that will be sent. Use dynamic placeholders to help you add the correct fields. It might look something like this:
      "fields": {
        "email": "{{ticket.offboarding_request.actor_1.cf_employee_email}}",
        "leaveDate": "{{ticket.offboarding_request.actor_1.cf_last_working_date_date_iso}}",
        "lineManager": "{{ticket.offboarding_request.actor_1.cf_line_manager_email}}",
        "ticketId": "{{ticket.id_numeric}}"
    Note, including ticket.id_numeric is useful if you want to update the originating Freshservice ticket as part of your Trelica workflow.
  11. Click Done.
  12. Remember to Activate the workflow when you are ready.

In Trelica

  1. In your workflow (assuming the new workflow is linked to a person) set the Context  as  Person.
  2. Select Type as Email.
  3. Enter the JSON (per the same webhook JSON above) as
  4. Add input fields for each attribute in the inbound JSON message that you want to use as a value in the workflow. e.g.:
    fs ticket webhook 2.png
    Once created, input fields will be available for selection as variables on various other Trelica workflow steps.
  5. Configure the rest of your Trelica workflow, and when you are ready Enable it (unless the workflow is enabled it will not receive webhook requests from Freshservice).

Useful Freshservice articles

Was this article helpful?

0 out of 0 found this helpful



Please sign in to leave a comment.