One of the most powerful features of Amberflo is Usage Analytics. Amberflo extends this feature to its Salesforce managed app.
The application includes a sync job AFLO.UsageRecordDownloadScheduler which can be scheduled to import usage records from Amberflo. These usage records can be leveraged for reporting purposes in Salesforce. For each customer, usage is loaded by aggregating the values of the meter into a daily bucket.
The sync job can be scheduled to run daily. Every time the job runs, it fetches usage records from Amberflo with start date greater than the latest end date value in Salesforce. This way only the delta is synced between the two systems instead of bringing in all usage records.
Usage report records are maintained as a custom object: UsageRecord. These records are related to the Amberflo customer object.
|meterLabel||Meter label as displayed in Amberflo.|
|totalValue||The daily aggregated value for the meter and customer.|
|meterApiName||Meter API name as defined in Amberflo.|
|customerId||customerId that references the Amberflo customer custom object.|
|Start Date||Start of the daily aggregation bucket. The bucket is a day that starts at midnight UTC.|
|End Date||End of the daily aggregation bucket. The end marker is midnight UTC of the next day. Note this value will be used as a starting point to import records the next time the job runs.|
- Go to Setup
- Type "Apex"
- Select Apex Classes
- Click on the button Schedule Apex
- Enter the Job Name
- Select "UsageRecordDownloadScheduler" as Apex Class
- Set your schedule - we recommend to run daily at UTC midnight + 6 hrs
The job can also be run on demand from the Developer Console:
Updated 11 months ago