How do I run a report in the Connect Web Services for SOAP API?
Oracle B2C Service (OSvC), all supported versions
Before running the report through the Connect Web Services for SOAP API there are a few checks that need to be done:
- Make sure the report is public (not private)
- Make sure the report is associated to the interface your script runs on
- Make sure the profile associated to the staff account you use to authenticate has "Open" access to the report. This can be verified in the agent desktop console by opening a profile from Configuration -> Staff Management -> Profiles and then selecting Analytics from the ribbon.
- Make sure to enable access to the interface the script runs on from the Interfaces section in the ribbon on the account profile.
- Make sure your account has access to the Public SOAP API from the Profile Permissions section.
- Make sure you identify the ID of the report. The ID can be found in the Reports Explorer after adding the ID column or from the Report Definition upon running the report from the console.
For B2C Service product versions May 2017 B2C Service and older, the WSDL is retrieved from the following URL:
<ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_4">
<ns7:AppID>Run report sample</ns7:AppID>
<wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<ns7:AnalyticsReport xsi:type="ns4:AnalyticsReport" xmlns:ns4="urn:objects.ws.rightnow.com/v1_4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID id="101228" xmlns="urn:base.ws.rightnow.com/v1_4"/>
The above example runs the report by explicitly using the value "email@example.com" for the "contacts.email" filter. This is an unnamed filter and should be replaced with the actual name of the filter if the filter has a name. If the filter does not have a name, the table.column format should be used. Note that if the specific table.column does not exist as a filter, it would not work.
For more information please review the SOAP API documentation: