Create a REST Web Service for Similar Records API
Here's how you create a REST Web Service for Similar Records API:
- Enter an active sandbox. From the navigator, go to .
- On the Web Services page, click the new web service icon.
- On the Select Connection Type window, select REST and click
OK.
- On the Create REST Web Service Connection page, enter a Connection
Name. For example, SalesMLQueryAPISimilarRecords.
Ensure that you use same connection name in Global Function Groovy as well. See the Create a Global Function for SalesMLQueryAPI Similar Records section in this topic.
- Leave the API-based REST Service check box blank.
- Select OData for REST Service Type.
- Enter a URL in the format,
https://<host>/crmRestApi/salesML/resources/latest/salesMLQueryAPI
For example,https://fuscdrmsmcxxx-fa-ext.oracle.com/crmRestApi/salesML/resources/latest/salesMLQueryAP
. - Select any of these values for Authentication Scheme:
- Call with Basic Authentication.
- Propagate user identity using SAML.
- Propagate user identity using SAML over SSL.
Here's a screenshot of the Create REST Web Service Connection page. The page shows the API name, REST service related settings selected, and a sample URL entered.
- Next, enter information in the Select and Configure Methods against the Resource
section:
- Select the POST check box.
- Let the Method Name be POST and Format be JSON.
- Select Code Sample for Request Payload and enter this
code into the text field:
{ "UseCaseCode" : "CX_SIMILAR_ACCOUNTS", "QueryMetadata":"whereClause:partyid = 300100006784914;numberOfRows:5" }
- Select Code Sample for Response Payload and enter
this code into the text field:
{ "PARTYID": "300100006785018", "INDUSTRYCODE": "", "ORGANIZATIONSIZE": "", "STATE": "CA", "COUNTRY": "US", "POSTALCODE": "94065", "CITY": "Redwood Shores", "EMPLOYEESTOTAL": "1", "PROB": "0.8740334165546894", "CLUSTER_ID": "370", "RNK_CLUS2": "6" }
- Click Save and Close.
The application creates a web service for the similar records API.