Sales

Get Involved. Join the Conversation.

Topic

    Jon Cooper
    Web Services for Sales Cloud
    Topic posted February 18, 2014 by Jon CooperRed Ribbon: 250+ Points, last edited February 18, 2014, tagged Web Services 
    395 Views, 25 Comments
    Title:
    Web Services for Sales Cloud
    Summary:
    Has anyone managed to achieve updating / creating of records via web service?
    Content:

    Hello,

    We're exploring a web service alternative to file import across customers, sales accounts, contacts, opportunities and revenue lines and I would like to get feedback from people who are currently using web services, for example, have they worked across releases? Have you had any issues with getting data out (fetchSize / fetchStart)? Are certain characters supported in file import but not web services and so on

    Any information / advice you have would be greatly appreciated

    Thank you,
    Jon

    Comment

     

    • Christian Airth

      Jon,

      Yes this is doable and this is what me and my colleagues do with all our Sales Cloud customers. Attached is the Web Services overview/white paper from Oracle for more info.

      If you have struggled importing via the import tool within Sales Cloud, you're not alone. Web Services is the way to go and after nearly 2-years me and my colleagues are still struggling to make the import tool work to achieve a successful import. Good luck!

      Questions, let me know.

      Christian

    • Raphael Weber

      Hi Jon,

      We have quite some experience using Oracle Fusion / Oracle Sales Cloud web services. While it is definitely feasible to import data using web services there are a couple of things you have to be aware of when using web services: Special syntax when building complex queries using the find operation, limits when using fetchSize, using projection to narrow down the size of the result set, no deletion of data, just to mention a few of them.

      To get a Customer/Sales Account into Fusion using web service is quite easy, once you have figured out what field have to be populated, but when it comes to keeping the Customer/Sales Account up to date, it is challenging sometimes, because you have to consider that you can hardly delete any information in Fusion. Instead you have to terminate the data (setting start and end date to define the validity of a record or using some status flags).

      A good starting point for exploring all the web services is Oracle’s public Enterprise Repository for Fusion Apps:

      https://fusionappsoer.oracle.com/oer/  (if the link is not working use google to find the current url)

      Look for web services (ADF Services) flagged as EXTERNAL, as they are exposed to the outside world in case you have a hosted cloud environment

      If you require some specific or further information, I will be happy to help you.

      Btw., where are you located? Maybe there is a chance to get in touch with you at one of the many upcoming Oracle Events?

       

       

      Regards,

      Raphael

      • Jon Cooper

        Hi Raphael,

        Thank you for your reply, it's definitely given us confidence with the web services.

        My initial update probably wasn't to clear, we have successfully loaded our data via file import, however we was looking at using a scheduled approach, taking data from a URL and updating the data that way, however after the responses within this thread it definitely looks like the route to go down would be web services.

        Through initial testing, we were seeing various issues around fetchsize and the payloads being produced, however it turns out it was related to the tool we were using, which isn't a great start!

        If you are available, it would be great to get an understanding of the web services you're currently using and what you're managing to achieve with them

        I'm currently located in the UK, how about yourself?

        Thank you,
        Jon

        • Raphael Weber

          Hi Jon,

           

          I'm located in Germany, so there is only one hour time difference ;-)

          Please check your private messages. I have provided you some contact information.

          Thanks,

          Raphael

        • Raphael Weber

          Hi Jon,

          we always recommend using soapUI for testing and discovering Fusion web services.

          We have dealt with most of the web services that are marked as EXTERNAL in Fusion. Just to give you an idea, we managed to successfully integrate on-premise systems with Fusion for updating Sales Account / Customer / Address/Custom Objects/Territories/etc. using real-time and batch synchronization.

          Fusion provides outbound and inbound web services, which means you can even do a two-way real-time synchronization.

          If you have any specific issue (like syntax issues using the web service's find operation, etc.) just let me know; I'll be happy to point you in the right direction.

           

          Regards,

          Raphael

    • Rahul Jith

      Dear Christian,

      I am also trying to import the details using p bulk export web services,but i am confusing with the parameters send to the method,which method need to run first and data type for the parameters.

       

      Thanks

      Rahuljith

      • Bhupendra Modi

        Hi Rahul,


        For technical questions, My Oracle Support Communities are the best option.

        Again For import webservices Francis has pointed out correct document. For Export batch, You may use export webservices, get the URL for file and then get it via UCM Command.

         

        Thanks.

        Bhupendra Modi

    • Bhupendra Modi

      Hi Jon,

      Webservices and Import both have different purposes and should be used based on context.

       

      Import can be used to load bulk data. Import is good approach for initial bulk load . It can also be used for recurring load when you do not need data immediately or in real-time. From performance point of view, Import will be quicker for large data-size than webservices. For Import, Any issues or feedback you may log SR with oracle and Oracle Support may help you for same.

       

      Webservices can be used to set integration near real-time. Webservices also allow benefits like it will also fire Groovy Code(Validation/Logic) for object in Sales Cloud. Also, Before calling webservices, we generally have flexibility  to change data based on complex logic too , which also helps for customers for their business integration scenarios at times.

       

      Regarding issues, Webservices are used heavily in Sales Cloud for integration. Various integrations with sales cloud are already being built using webservices and many are under progress for same too. Regarding fetchsize, Yes we do restrict it and hence anyone calling webservice should use fetchstart to iterate it multiple times to fetch all data.This is by design as otherwise payload may be huge and may cause performance issues too.

       

      I would also like to point you to our My oracle Support Communities page for Technical Questions which  is an another method for achieving follow up not just on this issue, but any other technical issue you are experiencing.  You can access the community from My Oracle Support as follows:

       
      http://communities.oracle.com
                       -or-
      Log into My Oracle Support
      Click the "Community" link at the top of the page.
      Click 'Fusion Applications' on the following page.
      Select the 'Sales Cloud' community from the "My Communities" list
       

      Oracle's Support Community is for :

      • Sharing your ideas about Oracle and our products
      • Interacting with other members of the Oracle Support community
      • Networking with members of the Oracle Support community
      • Asking and answering questions about Oracle
      • Learning about Oracle and our products
      • Contributing your knowledge and experience to the Oracle Support Community
      • Community is ideal to ask What-if, How-to, and Why-did, because beside product specific knowledge also product business knowledge is available
       

      Thanks.

      Bhupen

       

    • Raphael Weber

      Hi Rahuljith,

       

      please do not confuse the file import (through UI) with the web services for doing the file import/export.

      Are you using web services to do the bulk file import/export?

       

      Regards,

      Raphael

      • Rahul Jith

        Dear Raphael,

        Yes,we need to configure web services to export the details from CRM

        We are trying to configure web service BulkExportService to fetch the Opportunity detail from our CRM instance to another application.

        Thanks

        Rahuljith

        • Jon Cooper

          I'd be interested to here about how this goes, this is something we will be trying to achieve

          Thanks

    • Francis Chang

      Here is a white paper on how to invoke data importing using web services:

      https://support.oracle.com/epmos/faces/DocumentDisplay?id=1605219.1

       

       

      • Raphael Weber

        Keep in mind that as described in this document the used import mapping must already exists and that the mapping has to be created in the UI.

    • Sam Clark

      Hi, I have been attempting to follow this tutorial, https://blogs.oracle.com/fadevrel/entry/integrating_with_fusion_application_using4

      However when adding the web reference to Visual Studio it generates various errors relating to duplicate functions being created.

      The Reference.cs class generated contains the following two functions, amongst another 25 duplicates.

       

      public void updateSalesPartyAsync(SalesParty salesParty)
      {
          this.updateSalesPartyAsync(salesParty, null);
      }


      and


      [System.Web.Services.WebMethodAttribute(MessageName="updateSalesPartyAsync1")]
      [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/updateSal" +
          "esPartyAsync", RequestElementName="updateSalesPartyAsync", RequestNamespace="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/types/", OneWay=true, Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
      public void updateSalesPartyAsync(SalesParty salesParty) {
          this.Invoke("updateSalesPartyAsync1", new object[] {
                      salesParty});
      }

       

      Oracle have suggested that I comment one of these out, however I get different errors depending on which one is commented.

       

      If the first one is commented, the following error is generated when the web service call runs, "Method SalesPartyService.findSalesAccountMyFavoriteSalesAccountsVCAsync can not be reflected.".

      If the second method is commented then the following error is generated instead, "There is an error in XML document (1, 2957)."

      The second error looks a bit more of a promising path to investigate but my web service call appears to be very simple.

       

      SalesPartyService sps = new SalesPartyService();
      NetworkCredential nc = new NetworkCredential("username", "password");
      CredentialCache cc = new CredentialCache();
      cc.Add(new Uri(sps.Url), "Basic", nc);
      sps.Credentials = cc;
      sps.PreAuthenticate = true;

      FindCriteria findCriteria = new FindCriteria();
      findCriteria.fetchSize = 2;
      findCriteria.fetchStart = 0;

      FindControl findControl = new FusionSalesParty.FindControl();

      var aq = sps.findSalesAccount(findCriteria, findControl);

      foreach (SalesAccount sa in aq)
      {
          Response.Write(sa.SalesAccountUniqueName + "<br />");
      }

       

      Has anyone else experienced these issues before?

      • Sam Clark

        I have resolved this issue by adding the following line,

        findCriteria.findAttribute = new string[] { "SalesAccountUniqueName" };

        • Raphael Weber

          Hi Sam,

          what you have done is called "projection" and it is like limiting the fields in the resultset down to just SalesAccountUniqueName, hence you should be aware that with this query you can only access the field "SalesAccountUniqueName" an not other fields of the Sales Account/Sales Party.

          Btw, it should also work when there is no findAttribute specified.

           

          Regards,

          Raphael

    • Sam Clark

      I have stumbled upon another problem when trying to create a new Organization with an owner.

      The error I am receiving back is "You do not have the required permission to take this action. You can request that your help desk change your security settings."

      I am currently not sure my syntax is correct for creating the account and wanted to check it before raising an SR about this.

      SalesPartyService sps = new SalesPartyService();
      NetworkCredential nc = new NetworkCredential("user", "pass");
      CredentialCache cc = new CredentialCache();
      cc.Add(new Uri(sps.Url), "Basic", nc);
      sps.Credentials = cc;
      sps.PreAuthenticate = true;

      SalesParty salesParty = new SalesParty();
      salesParty.AccountDirectorId = 300000*********;
                              
      OrganizationProfile organizationProfile = new OrganizationProfile();
      organizationProfile.OrganizationName = dataRow["name"].ToString().Trim();
      organizationProfile.PrimaryAddressLine1  = dataRow["line1"].ToString().Trim();
      organizationProfile.PrimaryAddressLine2 = dataRow["line2"].ToString().Trim();
      organizationProfile.PrimaryAddressLine3 = dataRow["line3"].ToString().Trim();
      organizationProfile.PrimaryAddressCity = dataRow["line4"].ToString().Trim();
      organizationProfile.PrimaryAddressCounty = dataRow["line5"].ToString().Trim();
      organizationProfile.PrimaryAddressPostalCode = dataRow["postcode"].ToString().Trim();
      organizationProfile.PrimaryAddressCountry = dataRow["country"].ToString().Trim();
      organizationProfile.PrimaryPhoneNumber = dataRow["telephone"].ToString().Trim();
      organizationProfile.PreferredFunctionalCurrency = dataRow["currency"].ToString().Trim();

      OrganizationParty organizationParty = new OrganizationParty();
      organizationParty.OrganizationProfile = new OrganizationProfile[] { organizationProfile };
      OrganizationPartyResult opr = sps.createOrganizationParty(organizationParty);

      salesParty.OrganizationParty = opr.Value;

      SalesParty csp = sps.createSalesParty(salesParty);