Friday Nov 14, 2014

How to use the Oracle Sales Cloud New Simplified WebServices API

Over the last two years my organisation has been working with multiple partners helping them create partner integrations and showing them how to use the variety of SOAP APIs available for Sales Cloud integrators. Based on this work Ive been working with development with the aim to simplify some of the API calls which require "multiple" calls to achieve a single objective.. For example to create a Customer Account you often need to create the Location first , and then the contacts and then the customer account.. In SalesCloud R9 you will have a new subset of APIs which will simplify this.

So you all have a head-start in learning the API I've worked with our documentation people and we've just released a new whitepaper/doc onto Oracle Support explaining the new API in lovely glorious detail. It also includes some sample code of each of the operations you might use and some hints and tips!

Enjoy and feel free to post feedback 

 You can download the documentation from Oracle Support, the document is called "Using Simplified SOAP WebServices" , its docId is 1938666.1 and this is a direct link to the document

Wednesday Sep 25, 2013

Sample Payload : Batch insert/update

Question came up in a call today, is it possible to do batch webservice updates using the Oracle Sales Cloud webservice interface??

The answer is YES, but not all webservices support this. The operation is called "process<ObjectName>",and you need to check in the ADFService list of operations, in FusionOER , that the service supports the process<xxx> syntax.

For example LocationService and  OpportunityService support the process operation but the SalesPartyService does not.

Also you will find there are typically two operations, process<object> and processCS<object> the difference being that the first one you supply it with a list of objects and one operation (ie update all locations), whereas in processCS you can provide a unique operation for each and every object.

From FusionOER for the opportunity service



Operation Description  Parameters  Return value
processOpportunity Performs a Create, Update, Delete, or Merge operation on a list of Opportunity rows. The specified operation is applied to all objects in the given list. String changeOperation ,
java.util.List Opportunities,
processControl oracle.jbo.common.service.types.ProcessControl

 A list of opportunities that are successfully processed
processCSOpportunity  Performs a Create, Update, or Delete operation on a list of Opportunity rows. Different operations may be applied to different objects, depending on what is specified in the ChangeSummary object.

oracle.jbo.common.service.types.ProcesssData processData,
processControl oracle.jbo.common.service.types.ProcessControl

 A list of opportunities that are successfully processed

And a sample payload looks like

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/applicationModule/types/" xmlns:loc="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:loc1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/location/" xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:processLocation>
         <typ:changeOperation>Merge</typ:changeOperation>
         <typ:location>
            <loc:CreatedByModule>AMS</loc:CreatedByModule>
            <loc:Address1>510 Quercia Marcozzi</loc:Address1>
            <loc:Address2>Building 300</loc:Address2>
            <loc:City>Caserta</loc:City>
            <loc:Country>IT</loc:Country>
            <loc:State>CE</loc:State>
            <loc:PostalCode>90102</loc:PostalCode>
         </typ:location>
         <typ:location>
            <loc:CreatedByModule>AMS</loc:CreatedByModule>
            <loc:Address1>510 Quazi Marcozzi 2</loc:Address1>
            <loc:Address2>Building 500</loc:Address2>
            <loc:City>Caserta2</loc:City>
            <loc:Country>IT</loc:Country>
            <loc:State>CE</loc:State>
            <loc:PostalCode>90104</loc:PostalCode>
         </typ:location>
         <typ:processControl>
            <typ1:partialFailureAllowed>true</typ1:partialFailureAllowed>
         </typ:processControl>
      </typ:processLocation>
   </soapenv:Body>
</soapenv:Envelope>

Monday Aug 12, 2013

Some Fusion CRM payloads for creating SalesAccounts

Some payloads for creating customers in FusionCRM, namely

  • Create a location in Fusion CRM
  • Add the location to the Sales_Prospect making it into a SalesAccount
  • Add a sales person to the SalesAccount
  • Make the salesPerson the primary account owner

1.       Create a new  Location, using createLocation in the  LocationService

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/applicationModule/types/" xmlns:loc="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:loc1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/location/">

   <soapenv:Header/>

   <soapenv:Body>

      <typ:createLocation>

         <typ:location>

            <loc:CreatedByModule>AMS</loc:CreatedByModule>

            <loc:Address1>510 Quercia Marcozzi</loc:Address1>

            <loc:Address2>Building 300</loc:Address2>

            <loc:City>Caserta</loc:City>

            <loc:Country>IT</loc:Country>

            <loc:State>CE</loc:State>

            <loc:PostalCode>90102</loc:PostalCode>

         </typ:location>

      </typ:createLocation>

   </soapenv:Body>

</soapenv:Envelope>

2. Add the location to the Sales_Prospect making it into a SalesAccount using SalesPartyService

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

       xmlns:typ="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/types/"

       xmlns:sal="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/"

       xmlns:org="http://xmlns.oracle.com/apps/cdm/foundation/parties/organizationService/"

       xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/"

       xmlns:con="http://xmlns.oracle.com/apps/cdm/foundation/parties/contactPointService/"

       xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/"

       xmlns:con1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/contactPoint/"

       xmlns:org1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/organization/"

       xmlns:par1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/partySite/"

       xmlns:rel="http://xmlns.oracle.com/apps/cdm/foundation/parties/relationshipService/"

       xmlns:org2="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/orgContact/"

       xmlns:rel1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/relationship/"

       xmlns:per="http://xmlns.oracle.com/apps/cdm/foundation/parties/personService/"

       xmlns:per1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/person/">

       <soapenv:Header />

       <soapenv:Body>

              <typ:updateSalesParty>

                     <typ:salesParty>

                           <!-- PartyID of the organization -->

                           <sal:PartyId>100000000055273</sal:PartyId>

                           <sal:OrganizationParty>

                                  <!-- PartyID of the organization -->

                                  <org:PartyId>100000000055273</org:PartyId>

                                  <org:PartySite>

                                         <!-- PartyID of the organization -->

                                         <par:PartyId>100000000055273</par:PartyId>

                                         <!-- PartyID of the location you wish to add -->

                                         <par:LocationId>300000000599001</par:LocationId>

                                         <!-- Module which created the entry, ZCM is the code for the UI, can

                                                be others -->

                                         <par:CreatedByModule>ZCM</par:CreatedByModule>

                                         <par:PartySiteUse>

                                                <par:CreatedByModule>ZCM</par:CreatedByModule>

                                                <par:SiteUseType>BILL_TO</par:SiteUseType>

                                         </par:PartySiteUse>

                                  </org:PartySite>

                           </sal:OrganizationParty>

                     </typ:salesParty>

              </typ:updateSalesParty>

       </soapenv:Body>

</soapenv:Envelope>

3.       Add the Resource(SalesPerson) to the SalesAccount, using createSalesAccountResource, in the SalesPartyService

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/types/" xmlns:sal="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/">

   <soapenv:Header/>

   <soapenv:Body>

      <typ:createSalesAccountResource>

         <typ:salesAccountResource
          <sal:LockAssignmentFlag>false</sal:LockAssignmentFlag>

<!—The code indicating how the resource is assigned to the sales account team. The possible values are contained in the ZCA_ASSIGNMENT_TYPE lookup.à

            <sal:AssignmentTypeCode>MANUAL</sal:AssignmentTypeCode>

            <sal:ResourceId>300000000623680</sal:ResourceId>             <sal:SalesAccountId>300000000690006</sal:SalesAccountId> </typ:salesAccountResource>

</typ:createSalesAccountResource>
</soapenv:Body>
</soapenv:Envelope>

4.       Make the new person the Account Lead, using updateSalesParty, in SalesPartyService

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/types/" xmlns:sal="http://xmlns.oracle.com/apps/crmCommon/salesParties/salesPartiesService/" xmlns:org="http://xmlns.oracle.com/apps/cdm/foundation/parties/organizationService/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:con="http://xmlns.oracle.com/apps/cdm/foundation/parties/contactPointService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:con1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/contactPoint/" xmlns:org1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/organization/" xmlns:par1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/partySite/" xmlns:rel="http://xmlns.oracle.com/apps/cdm/foundation/parties/relationshipService/" xmlns:org2="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/orgContact/" xmlns:rel1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/relationship/" xmlns:per="http://xmlns.oracle.com/apps/cdm/foundation/parties/personService/" xmlns:per1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/person/">

5.    <soapenv:Header/>

6.    <soapenv:Body>

7.       <typ:updateSalesParty>

8.          <typ:salesParty>

9.             <sal:PartyId>100000000055273</sal:PartyId>

10.             <sal:SalesAccountId>300000000629280</sal:SalesAccountId>

11.          </typ:salesParty>

12.       </typ:updateSalesParty>

13.    </soapenv:Body>

14.               </soapenv:Envelope>

Monday Jun 10, 2013

FusionCRM :Adding a Product Item and a Product Group to a CRM Opportunity

Recently it was asked to me how one can insert a product item/group into a Fusion CRM Opportunity. First thing is one needs to understand the difference between a CRM Product Item and a CRM Product Group. 

A Product Item is a Item, usually managed externally from Fusion CRM, often from Fusion PIM or uploaded independantly.

A  Product Group is a collection of Product Items collected together in the "Manage Product Group" screen within Fusion Setup and Maintenance.

When inserting into an opportunity a product group, or a product item, you will need to know the product group ID (ProdGroupId) or the InventoryItemIds+InventoryOrgId respectively.

You can get a list of all your product group IDs, by exporting the object "ProductGroupDetailExpPVO" in the "Schedule Export Processes" task within "Setup and Maintenance" 

The payload for inserting a product Item within an Opportunity is

and for inserting a ProductGroup is similar but for product groups you dont need the InventoryOrgId.

Finally if you want to do this as part of a groovy script,e.g trigger from a button, the script would look something like this

About

Architect & Technology Evangelist - If its middleware,PaaS/SaaS integration then I'm interested

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Categories
Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today