Pages

Wednesday, September 28, 2016

Data.com Prospector Usage

When you subscribe for Data.com Prospector, each license user allow to import company and contact records into Salesforce or export to CSV file for maximum of 300 records /month/user.

You can monitor overall usage from Setup | Data.com Administration | Prospector Users



Or, you also can run a report with report type "Data.com Users and Usage". This report will show:
  • When is the transaction (created date)
  • Who is the user (created by)
  • Purchase Type (added or exported)
  • Purchase Count (number of record exported or added)

But if you want to drill-down to details of the contacts or accounts added, report will not show you that information.

Solution: use SOQL
There are 2 objects related to this DatacloudPurchaseUsage and DatacloudOwnedEntity.

1. DatacloudPurchaseUsage - this object will store all purchase history.
Sample query: SELECT Id, Name, Usage, DatacloudEntityType, PurchaseType, User.Name, CreatedDate FROM DatacloudPurchaseUsage WHERE Id = '09Fo0000000RZ7sEAG'



2. DatacloudOwnedEntity - this object will store each contact or account exported or added to Salesforce.
Sample query: SELECT Id, Name, PurchaseUsageId, DataDotComKey, DatacloudEntityType, PurchaseType, User.Name, CreatedDate FROM DatacloudOwnedEntity WHERE PurchaseUsageId = '09Fo0000000RZ7sEAG'

Even there is no Contact Name or Company Name recorded in this object, but there are a few pointers:
1. Data.com Key - you can match this key to match with data exported or added to Salesforce
2. DatacloudEntityType - 0 = Contact and 1 = Company
3. PurchaseType - 0 = added and 1 = export

As you see, DatacloudOwnedEntity object is lookup to DatacloudPurchaseUsage object, via field PurchaseUsageId. For you  that familiar with SOQL, as you see above queries using child-to-parent query. However, when try to use parent-to-child query, it is just not possible. Further check, I do not see DatacloudOwnedEntity as child relationship from DatacloudPurchaseUsage.

Screenshot of child relationship taken from DatacloudPurchaseUsage



Compare to standard object child relationship, example: Opportunity to OpportunityLineItem


Reference: