Conversational Automation

In your Freshdesk account go to the Admin section and open Automations.

Add New Rule

In Automations make sure you are on the Ticket Updates tab.

Next, Click the New rule button to add new automation and a name to the automation: DG Conversational Automation

Conditions

  1. When an action is performed by - Select Requester

  1. Involves any of these events: - Select Reply is Sent

  1. Ticket Properties - Select Match ALL of the bellow and add the condition if Tickets Status is not Closed

  1. In order to avoid sending the tickets that were not previously sent to DG, you need to specify that the automation will run only on tickets where dg-processed is present:

These are all mandatory conditions, but you can also add any other conditions that are custom for your accounts. You can also filter by subject, requester, assignee, etc.

Actions Performed

Now we are going to set up an action that will send this ticket to the DigitalGenius platform.

  1. In the choose action dropdown select Trigger webhook

  2. In the Request Type dropdown select POST

  3. As URL, use either https://flow-server.us.dgdeepai.com/v2/execution or https://flow-server.eu.dgdeepai.com/v2/execution depending on whether your DigitalGenius account is in US or EU region respectively. This is something you should see in the URL of the DigitalGenius dashboard - us.digitalgenius.com vs eu.digitalgenius.com.

Authentication

  1. Toggle Requires authentication to on. This will expand the authentication section. For the authentication type keep, I have username & password selected.

  1. For the Username and Password, we are going to use API Key and Secret from the DigitalGenius dashboard. Follow the steps in API Key/Secret. Put the API Key into the Username field and API Secret into the Password field.

  2. Keep Add custom headers toggled off and Encoding as JSON.

Content

  1. In the Content section select Advanced.

  1. In the content text area enter the following and replace the {REPLACE WITH FLOW ID} with the ID of the MASTER FLOW flow from the DigitalGenius dashboard:
{
    "action_id": "{REPLACE WITH FLOW ID}",
    "external_id": "{{ticket.id}}",
    "inputs": {
        "ticket_id": "{{ticket.id}}",
        "subject": "{{ticket.subject}}",
        "description": "{{ticket.description_text}}"
    },
    "conversation": {
        "external_id": "{{ticket.id}}",
        "title": "{{ticket.subject}}",
        "name": "{{ticket.requester.name}}",
        "email": "{{ticket.from_email}}",
        "messages": [
            {
                "external_id": "{{ticket.modified_on}}",
                "timestamp": "{{ticket.modified_on}}",
                "from": "customer",
                "sender_name": "{{event_performer.name}}",
                "sender_email": "{{event_performer.email}}",
                "content": "{{ticket.latest_public_comment}}"
            }
        ]
    },
    "enable_relaunch_on_inputs_change": false
}
  1. Click on Add new action and a new dropdown will be displayed:

  1. Choose Add tag action and Add "dg-conversational" tag. This is needed for reporting.

Save

  1. Click Preview and Save button and you should see a preview pop-up like this.

  2. Click Save and enable button to save the automation.

Now you should be all set to start receiving customers' replies inside DigitalGenius Flows.