Happy Business Starts Here

Re: Cannot Retrieve Deleted Amendments From AQuA

Highlighted

Cannot Retrieve Deleted Amendments From AQuA

According to this doc, the Aggregate Query API (AQuA) supports the retrieval of deleted data.

 

When we run a query to retrieve Amendments, specifying the deleted column ('Deleted) and format ('Boolean') in our query parameters, the data that is returned contains a 'Deleted' field, but it always =False and we do not retrieve any of the Amendments that have been deleted.


Does Zuora support retrieving deleted Amendments from the AQuA?

5 REPLIES 5
Highlighted
Support SME
Support SME

Re: Cannot Retrieve Deleted Amendments From AQuA

Can you please attach your AQuA request and response with a text file?






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Highlighted

Re: Cannot Retrieve Deleted Amendments From AQuA

Sure -- we sent this on behalf of one of our customers, and I want to make sure that the file we share with you will not be publicly viewable since it will include sensitive information.  Thanks!

Highlighted

Re: Cannot Retrieve Deleted Amendments From AQuA

Actually, I can just redact sensitive info, and if you need the actual data returned in the export, then we'll have to find a way to private share that with you.  Here  is the cURL request/response:

 

```

------ Request ------
curl -X "POST" -H "Authorization: Basic *******************" -H "Content-Length: 820" -H "Content-Type: application/json" -d "{\"version\": \"1.2\", \"name\": \"Amendment\", \"queries\": [{\"name\": \"**********\", \"deleted\": {\"column\": \"Deleted\", \"format\": \"Boolean\"}, \"type\": \"zoqlexport\", \"query\": \"select UpdatedById, Code, EffectiveDate, ContractEffectiveDate, TermStartDate, CreatedById, RenewalSetting, Type, CustomerAcceptanceDate, SuspendDate, ResumeDate, SpecificUpdateDate, RenewalTerm, CreatedDate, CurrentTerm, Status, CurrentTermPeriodType, UpdatedDate, SubscriptionId, Id, Name, AutoRenew, Description, ServiceActivationDate, RenewalTermPeriodType, TermType from Amendment where UpdatedDate >= '2019-01-28 13:03:52' order by UpdatedDate asc\"}], \"format\": \"csv\", \"partner\": \"***********\", \"useQueryLabels\": \"true\", \"incrementalTime\": \"2017-04-17 00:00:00\", \"dateTimeUtc\": \"true\", \"project\": \"*********\", \"encrypted\": \"none\"}" "https://www.zuora.com/apps/api/batch-query/"

 

or in a prettier format:

 

{'auth': ('**********', '**********'),
'json': {'dateTimeUtc': 'true',
'encrypted': 'none',
'format': 'csv',
'incrementalTime': '2017-04-17 17:00:00',
'name': 'Amendment',
'partner': '**********',
'project': '**********',
'queries': [{'deleted': {'column': 'Deleted', 'format': 'Boolean'},
'name': '**********',
'query': 'select TermType, SuspendDate, Id, '
'TermStartDate, ResumeDate, UpdatedDate, '
'SpecificUpdateDate, Code, '
'ServiceActivationDate, Name, Status, '
'CreatedDate, Type, CustomerAcceptanceDate, '
'UpdatedById, RenewalTerm, AutoRenew, '
'CurrentTermPeriodType, Description, '
'CurrentTerm, EffectiveDate, '
'RenewalTermPeriodType, ContractEffectiveDate, '
'SubscriptionId, RenewalSetting, CreatedById '
'from Amendment where UpdatedDate >= '
"'2017-04-18 00:00:00' order by UpdatedDate "
'asc',
'type': 'zoqlexport'}],
'useQueryLabels': 'true',
'version': '1.2'}}

 

------ Response ------
{
"incrementalTime" : "2017-04-17 00:00:00",
"project" : "**********",
"encrypted" : "none",
"batches" : [ {
"deleted" : {
"column" : "Deleted",
"format" : "Boolean"
},
"localizedStatus" : "pending",
"recordCount" : 0,
"batchId" : "**********",
"batchType" : "zoqlexport",
"apiVersion" : "92.0",
"full" : false,
"status" : "pending",
"name" : "**********",
"query" : "select UpdatedById, Code, EffectiveDate, ContractEffectiveDate, TermStartDate, CreatedById, RenewalSetting, Type, CustomerAcceptanceDate, SuspendDate, ResumeDate, SpecificUpdateDate, RenewalTerm, CreatedDate, CurrentTerm, Status, CurrentTermPeriodType, UpdatedDate, SubscriptionId, Id, Name, AutoRenew, Description, ServiceActivationDate, RenewalTermPeriodType, TermType from Amendment where UpdatedDate >= '2017-04-18 00:00:00' order by UpdatedDate asc"
} ],
"useLastCompletedJobQueries" : false,
"partner" : "**********",
"status" : "submitted",
"name" : "Amendment",
"id" : "**********",
"version" : "1.2",
"format" : "CSV"
}

```

Highlighted

Re: Cannot Retrieve Deleted Amendments From AQuA

ping. Just wanting to be sure this hasn't fallen off the map. Any response would be helpful.

Highlighted
Zuora Staff

Re: Cannot Retrieve Deleted Amendments From AQuA

Hi @stitch_sources

The mechanics behind requesting AQuA statful deletes are outlined in this thread:

https://community.zuora.com/t5/API/Fetching-deleted-rows-with-incremental-time-not-working/m-p/12755...

Basically, there must be an established FULL AQuA output prior to the deleted record in order for the record to 'show up' in your output as per the design of the AQuA service.  

 

Hopefully this makes sense.  

 

Reguards,  Scott



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √