Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    jayarami reddy
    Read/pickup the desktop file push to incident of service...Answered
    Topic posted December 22, 2016 by jayarami reddyRed Ribbon: 250+ Points 
    672 Views, 22 Comments
    Title:
    Read/pickup the desktop file push to incident of service cloud
    Content:

    Hi,

    I am trying Read/pickup the desktop file push to incident of service cloud using Connect PHP API.

    but  i am getting  empty result and am using the below code

    please help me this issue

    Version:
    Service Cloud
    Code Snippet:

    Best Comment

    Pramod Vasudeva Murthy

    Jayarami,

    If you want to automate this process, place a file in a shared location and use web service calls to create/update records. I do not think any CRM(at-least I know) will have ability to pick a file in YOUR DESKTOP and import automatically.

    p.s: I don't see the reason on extending post anymore after all said and done. Please share your tryouts, we can guide you accordingly.

    - VIP

    Comment

    • Dietrik

      Have you tried the import wizard in the console ?

    • Rajan Davis
      Barrilito said:

      @Rajan: This is indeed getting a strange post wink I do like it that so many people (like yourself) come up with so many things and even give away full code samples. I appreciate that a lot, it realy is a compliment to all of you! However, I still don't see the actual usecase being explained here.  Reading a file is not a usecase. What is in the file, what do you what to do with the data, etc... Like Dietrik said, so many help but perhaps we should be clear about a usecase first.

      Regards

      View original

      You know what, when I read the title and some of the other posts, I was under the impression that he just wanted to have the ability to upload a file as an incident file attachment and create an incident. I was sorely mistaken LOL but I think there's some clarity now.

      I totally agree with you about the usecase, I had a script that did most of what I thought he was asking for and figured that would be the end of it. However, I was thinking about it a bit more this morning, but one really good use case that I can think of would be if you wanted to test Business Rules.

      Using the data import wizard, you would have to manually upload a .csv file and then run some reports to verify that the business rules worked as expected and potentially delete the incidents.

      If you script out the a process similar to the data import, you can essentially automate and validate the entirety of that process in a much shorter time span and have it be replicable across multiple interfaces. 

      This was not something that I thought about when I put the script up, but automating this process end-to-end would also save time in regards to performing the more difficult parts of user acceptance testing when performing an upgrade. You could even automate the portal testing using something like Mechanize and have a test suite to work against as features are developed...

      jayarami reddy said:
      @Rajan: my exact requirement is on system desktop one file there i want pickup the file data and i want do mapping the file data and incident fields and directly update the incident. any possible ways there ? please help me this issue.

      As both Barrilito and Dietrik had both mentioned, it sounds like you will want to use the Data Import Wizard.

      Here's the KnowledgeBase answer for how to the Data import process. The basic steps are to create a .csv file with headers for each field that you enter information into. For example, given a CSV with the following data:

      ID Subject
      123456 Testing please delete
      456789 DO NOT DELETE

       

      With the Data Import Wizard, you can choose the Object you want to modify (in this case, Incidents), and then map the fields from the .csv to how they correlate with the incidents you wish to update. This is probably the simplest of doing what you want to achieve.

      Hope this gets you closer to where you need to go.

      Kind Regards,

      Rajan

    • Barrilito van Dijk

      @Rajan: haha, Like I said I appreciated your answer a lot :)  I think it is great that there are people writing indept answers :) I just focused on the subject of this post and not the code given. This is why I think Erica and Danette are doing a great job on moderating the community and writing posts like "ask a good question" every now and then to keep the community lean and mean. It is sometimes difficult to keep a question simple and clear or to give an answer that makes sense!

      Anyway, hope all feedback in this post helped out jayarami.

      Regards

    • jayarami reddy

      @Rajan: i want with out manually import, i want automatic file pickup and do the mapping through coding only.

    • Rajan Davis
      jayarami reddy said:

      @Rajan: i want with out manually import, i want automatic file pickup and do the mapping through coding only.

      View original

      The script I wrote should do about 90% of the work needed; you can refer to this stackoverflow post as far as how to use Ruby to read a .CSV and convert it into JSON to and make use of the REST API. I would remove the portions in my script related to the file reading and setting of incident file attachment information and add in a section to parse a .CSV or .JSON file and set field information accordingly.

      If you would prefer to use PHP, here are links for how to read/write files from you local desktop, how to parse a .CSV file with PHP, and how to POST data with PHP.

      You just need to make sure that the file you are using is in a structured format such as .json, .csv, or .xml so that it can be read and parsed. You will have to do some manipulation to make sure that the JSON should be in the correct format for working as expected.

      You can refer to the REST API documentation for creating incidents which will tell you how the JSON should be formatted for the parameters described.

      Hope this helps.

      Kind Regards,

      Rajan

    • Pramod Vasudeva Murthy

      Jayarami,

      If you want to automate this process, place a file in a shared location and use web service calls to create/update records. I do not think any CRM(at-least I know) will have ability to pick a file in YOUR DESKTOP and import automatically.

      p.s: I don't see the reason on extending post anymore after all said and done. Please share your tryouts, we can guide you accordingly.

      - VIP

    • Danette Beal

      Hi Jayarami,

      I would agree with Pramod on this one and do not believe much else can be said on this particular post. There are quite a few solid recommendations on this thus far. Unfortunately, we haven't heard much about what steps you have taken from these solutions or where you are in your development process. If you need additional help, please give specific information on what steps you have taken and sample code if you are getting hung up. I would encourage you to read the following blog on how to ask a good question as I not only want you to get the best experience from our Community, but I also want to ensure your Community Members giving recommendations are also having a great experience. Please know, we do not want to discourage you from utilizing the Community but tweaking your responses to the recommendations by our Members will help encourage more participation and give them a better sense that their recommendations are helpful to you.

      For now I am going to close comments on this post. If you need specific help on the directions given to date, please post a new thread with as much detail as possible linking to this post.

      Regards,

      Danette, Community Manager