Create a Custom Object Reads Per Day Recipe

This recipe produces a unique count of how many times per day a custom object was read.

In your org in Analytics Studio in CRM Analytics:

  1. In All items on the Datasets tab, select your DailyAggregation dataset.
  2. Select Charts.
  3. Click Column and leave Bar Length as Count of Rows.
  4. Under Bars, click + and search for timestamp_DMY.
  5. Select Year-Month-Day.
  6. Click Filters.
  7. Click +.
  8. Select custom_entity_type Equals CustomObject
  9. Click Apply.
  10. Click +.
  11. Select operation_type Equals READ.
  12. Click Apply.
  13. Click Data.
  14. Under Trellis, click +.
  15. Select custom_entity.
  16. Click Save.
  17. Name your lens Custom Object Reads Per Day.
  18. Select your PartnerIntelligence app.
  19. Click Save.

Example

A sample Custom Object Reads Per Day CRM Analytics lens
SAQL:
q = load "DailyAggregation";
q = filter q by 'custom_entity_type' == "CustomObject";
q = filter q by 'operation_type' == "READ";
q = group q by ('timestamp_derived_DAY_formula_Year', 'timestamp_derived_DAY_formula_Month', 'timestamp_derived_DAY_formula_Day', 'custom_entity');
q = foreach q generate 'timestamp_derived_DAY_formula_Year' + "~~~" + 'timestamp_derived_DAY_formula_Month' + "~~~" + 'timestamp_derived_DAY_formula_Day' as 'timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Month~~~timestamp_derived_DAY_formula_Day', 'custom_entity' as 'custom_entity', count() as 'count';
q = order q by ('timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Month~~~timestamp_derived_DAY_formula_Day' asc, 'custom_entity' asc);
q = limit q 2000;