Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Sync Salesforce with Zendesk to retrieve Assets information

 
1
0
-1

Ticket starts off in Zendesk

We populate an Asset serial number in Zendesk

Requirement is to fetch the Install Date of that Asset from Salesforce, in addition to having a case object created. 


    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      In order to achieve this use case, the following code snippets were added to the standard Exalate code:


      Zendesk Outgoing
      replica.customFields."Asset Serial Number" = issue.customFields."Asset Serial Number"
      Zendesk Incoming
      issue.customFields."Asset Information".value = replica.SF_variable
      Salesforce Outgoing
      replica.SF_variable = entity.SF_variable
      Salesforce Incoming
      def res = httpClient.get("/services/data/v36.0/query/?q=SELECT+InstallDate+FROM+Asset+WHERE+SerialNumber+=+'${replica.customFields.'Asset Serial Number'.value}'")
      if (res.records.size()>0){
          entity.Client_Mood__c = res.records[0].InstallDate
          syncHelper.syncBackAfterProcessing()
      }


      A video demonstration of the solution is attached here:

      ZD SF Assets sync.mp4



      Thanks
      Majid


        CommentAdd your comment...