FreshDesk as Managed Application

Manu269
All-Star
All-Star

Hi Team,

We are looking forward to integrate our SSM with Freshdesk system.

While referring to documentation : https://docs.saviyntcloud.com/bundle/Freshdesk-Guide/page/Content/Understanding-Integration-between-...

The json  provided for ImportAccountEntJSON is incorrect.

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxx.freshdesk.com/api/v2/agents",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "email~#~char",
"customproperty13": "groups[0].name~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"groups": {
"importAsEntitlement": true,
"listPath": "groups",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"groups": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}

Can someone assist with right jsons?

Anyhow upon hitting the

url : https://XXXX.freshdesk.com/api/v2/agents

we are able to retrieve the data via postman, but upon reconcilation via above json its not working. 

 

Manish Kumar
10 REPLIES 10

Manu269
All-Star
All-Star

@Sivagami @sk IF there is any input please assist here.

Manish Kumar

Sivagami
All-Star
All-Star

@Manu269 - I hope you have set up your connection json properly with the API key generated. 

What's the error you are receiving? Logs can help. 

Put below in your config json of the connector to gather detailed logs 

{"showLogs": true}

rushikeshvartak
All-Star
All-Star

share postman screenshot and logs

Manu269
All-Star
All-Star

Hello All,

Thanks for response. 

@Sivagami Yes the connection is successfully configured.

The problem is with importing Account/Entitlements and Association.

I have tested the provisioning/update of account which is working very well.

@rushikeshvartak I can see the data printed in logs with config {"showLogs": true}.

Please find below :

[{"available":false,"occasional":true,"id":89003797000,"ticket_scope":1,"created_at":"2023-02-03T08:37:12Z","updated_at":"2023-02-03T08:37:12Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"adamsl@xxxxx.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"ADAMSL","phone":null,"time_zone":"Eastern Time (US & Canada)","created_at":"2023-02-03T08:37:12Z","updated_at":"2023-02-03T08:37:12Z"},"signature":"<div dir=\"ltr\"><p><br></p>\n</div>"},{"available":false,"occasional":true,"id":89003757554,"ticket_scope":1,"created_at":"2023-01-28T21:44:13Z","updated_at":"2023-01-28T21:44:13Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"custserv@freshdesk.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"Customer Service","phone":null,"time_zone":"Casablanca","created_at":"2023-01-28T21:44:13Z","updated_at":"2023-01-28T21:44:13Z"},"signature":null},{"available":false,"occasional":true,"id":89003797003,"ticket_scope":1,"created_at":"2023-02-03T08:37:53Z","updated_at":"2023-02-03T08:37:53Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"kpark@xxxxx.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"G000706","phone":null,"time_zone":"Eastern Time (US & Canada)","created_at":"2023-02-03T08:37:53Z","updated_at":"2023-02-03T08:37:53Z"},"signature":"<div dir=\"ltr\"><p><br></p>\n</div>"},{"available":false,"occasional":true,"id":89003797022,"ticket_scope":1,"created_at":"2023-02-03T08:38:50Z","updated_at":"2023-02-03T08:38:50Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"rosison@xxxxx.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"N074128","phone":null,"time_zone":"Eastern Time (US & Canada)","created_at":"2023-02-03T08:38:49Z","updated_at":"2023-02-03T08:38:49Z"},"signature":"<div dir=\"ltr\"><p><br></p>\n</div>"},{"available":false,"occasional":true,"id":89003797024,"ticket_scope":1,"created_at":"2023-02-03T08:39:04Z","updated_at":"2023-02-03T08:39:04Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"jfrendewey@xxxxx.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"N075914","phone":null,"time_zone":"Eastern Time (US & Canada)","created_at":"2023-02-03T08:39:04Z","updated_at":"2023-02-03T08:39:04Z"},"signature":"<div dir=\"ltr\"><p><br></p>\n</div>"},{"available":false,"occasional":false,"id":89003757551,"ticket_scope":1,"created_at":"2023-01-28T21:44:10Z","updated_at":"2023-02-03T14:16:46Z","last_active_at":"2023-02-03T14:16:46Z","available_since":null,"type":"support_agent","contact":{"active":true,"email":"testsavintegration27@XXXXXX.com","job_title":null,"language":"en","last_login_at":"2023-02-03T11:14:06Z","mobile":null,"name":"test test","phone":"9865432123","time_zone":"Casablanca","created_at":"2023-01-28T21:44:10Z","updated_at":"2023-02-03T07:48:49Z"},"signature":null},{"available":false,"occasional":true,"id":89003799378,"ticket_scope":1,"created_at":"2023-02-03T13:48:06Z","updated_at":"2023-02-03T13:48:06Z","last_active_at":null,"available_since":null,"type":"support_agent","contact":{"active":false,"email":"esakamoto@xxxxx.com","job_title":null,"language":"en","last_login_at":null,"mobile":null,"name":"U060845","phone":null,"time_zone":"Eastern Time (US & Canada)","created_at":"2023-02-03T13:48:06Z","updated_at":"2023-02-03T13:48:06Z"},"signature":"<div dir=\"ltr\"><p><br></p>\n</div>"}]

 

Can you please help me in correcting the json?

Manish Kumar

can you share response of api

Hi @rushikeshvartak please find the same :

Manu269_0-1675749687186.png

 

Manish Kumar

Sivagami
All-Star
All-Star

Agents list API doesn't give group details of each agent as per fresh desk API documentation.

You need to use the below API's to get the needed details

List Agents - https://developers.freshdesk.com/api/#list_all_agents 

List Groups - https://developers.freshdesk.com/api/#list_all_admin_groups 

List Agents in the Group - https://developers.freshdesk.com/api/#list_all_agents_in_a_group 

Try something like below and alter the json as per the attributes you need to pull in from each API.

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "successResponses": {
      "statusCode": [
        200
      ]
    },
    "doNotChangeIfFailed": true,
    "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "accountThresholdValue": 1000,
      "deleteAccEntForActiveAccounts": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<TENANT URL>/api/v2/agents",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "contact.email~#~char",
          "displayName": "contact.name~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "groups": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "<TENANT URL>/api/v2/admin/groups",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "application/json"
              },
              "httpContentType": "application/json",
              "httpMethod": "GET"
            },
            "listField": "",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "name~#~char",
              "description": "description~#~char"
            },
            "disableDeletedEntitlements": true
          }
        }
      }
    }
  },
  "acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "groups": {
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "httpEntToAcct",
            "http": {
              "httpHeaders": {
                "Authorization": "${access_token}"
              },
              "url": "<TENANT URL>/api/v2/admin/groups/${id}/agents",
              "httpContentType": "application/json",
              "httpMethod": "GET"
            },
            "listField": "",
            "entKeyField": "entitlementID",
            "acctIdPath": "id",
            "acctKeyField": "accountID"
          }
        }
      }
    }
  }
}

 -Siva

@Sivagami can you also help with the json for add access and remove access?

Manish Kumar

@Sivagami I was able to create the respective json.

Thanks

Manish Kumar

Manu269
All-Star
All-Star

@uthra_rahul can you please get this information updated on Documentation Portal.

The details provided are incorrect. 

@Dave FYI

Manish Kumar