简体   繁体   中英

RunAnalyticsReport returning incorrect rows

I have a problem with the RightNow SOAP API, specifically requesting a RunAnalyticsReport, the code is below. The export works when I set the report to return a fixed period, eg 4 or 6 hours. When I set the report to require a start date (AlertClosedAfter in this case), it timed out. Then I re-ran it after disabling the start date requirement and it only returns the rows that are created after the time out, no matter if I set any filters or not (I'm pretty sure my filter is wrong, so if you can help me with that it would be perfect). So now every time I run it it only returns the rows since the time out. Do you guys have any ideas? Thanks in advance!

Here's the code:

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v1="urn:messages.ws.rightnow.com/v1_2"
xmlns:v11="urn:base.ws.rightnow.com/v1_2"
xmlns:ns2="urn:objects.ws.rightnow.com/v1_2"
xmlns:ns3="urn:generic.ws.rightnow.com/v1_2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<v1:ClientInfoHeader>
<v1:AppID>Create</v1:AppID>
</v1:ClientInfoHeader>
<ns4:Security SOAP-ENV:mustUnderstand="1">
<UsernameToken xsi:type="ns4:UsernameToken">
<Username>username</Username>
<Password>password</Password>
</UsernameToken>
</ns4:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<n0:GetResponse xmlns:n0="urn:messages.ws.rightnow.com/v1_2" xmlns:n2="urn:base.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1=
"urn:objects.ws.rightnow.com/v1_2">
<n0:RNObjectsResult>
<n0 :RNObjects xsi:type="n1:AnalyticsReport">
<n2:ID id="103151"></n2:ID>                 
<n1:Filters xsi:type="n1:AnalyticsReportFilter">
<n1:Name>AlertsClosedAfter</n1:Name>
<n1:Operator>
<n2:ID id="6"></n2:ID>
<n2:Name>></n2:Name>
</n1:Operator>
<n1:Values>29/01/2015 13:40</n1:Values>
<n1:Attributes>
<n1:Editable>true</n1:Editable>
<n1:Required>false</n1:Required>
</n1:Attributes>
<n1:DataType>
<n2:ID id="4"></n2:ID>
<n2:Name>DATETIME</n2:Name>
</n1:DataType>
<n1:Prompt>AlertsClosedAfter</n1:Prompt>
</n1:Filters>
<n1:Filters xsi:type="n1:AnalyticsReportFilter">
<n1:Name>Lead Rejection Reason</n1:Name>
<n1:Operator>
<n2:ID id="1"></n2:ID>
<n2:Name>=</n2:Name>
</n1:Operator>
<n1:Values>~any~</n1:Values>
<n1:Attributes>
<n1:Editable>true</n1:Editable>
<n1:Required>false</n1:Required>
</n1:Attributes>
<n1:DataType>
<n2:ID id="1"></n2:ID>
<n2:Name>MENU</n2:Name>
</n1:DataType>
<n1:Prompt>Lead Rejection Reason</n1:Prompt>
</n1:Filters>
</n0:RNObjects>
</n0:RNObjectsResult>
</n0:GetResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I believe the format for dates is:

<year-month-day>T<24 hour time>Z

For example:

2015-01-29T13:40:00Z

Change your AlertsClosedAfter filter value to something like that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM