Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Licensing Information
The feature described in this documentation is optional and might not be part of the edition covered by your company's license.

In order to process usage using Botbot AI assist example stream, you must create a meter type (the product you want to meter) and meters (bucket to measure the usage per customer for the product). This step is usually done using an APIs which are called from the external system. For convenience, there have been additional streams provided which can be executed to do this configuration.

Here is a step-by-step guide on how you can provision meters and meter types for an example stream - Botbot AI assist.

The helper streams can be copied from the links and can be imported using Usage Engine CE UI:

  1. Provisioning Meter Types - This stream helps to creates a meter type (AI Assist) which is a product definition for measuring the number of resolved cases by botbot’s offering. It uses the aggregation type Increment and has reset interval set as Monthly ie, the golden record is sent once the month has ended.

  2. Provisioning Meters - This stream provisions the meters for botbot’s customers with the user id being the company’s name.

  3. Purge Meters - This is an additional stream to clean up meters post-processing.

Step 1

Create a new application access for your account. This is needed for authenticating with the Usage Engine APIs, see Application Access.

Step 2

Create a new secret in secrets wallet of type OAuth 2.0 containing your applications credentials. Select authentication type “Client credentials“ and add client ID and client secret created in the previous step, see Secret Wallets.

Step 3

Import all helper streams using the above links.

Step 4

Update the authentication in all streams with your new secret. Ensure that the audience and access token URL of the OAuth 2.0 authentication is configured to match your Environments API base URL.

Step 5

Run stream 1. Provisioning Meter Types. When the stream has completed you will have a new meter type named "AI Assist" in the Usage metering view.

Step 6

Open the stream configuration of Botbot AI assist and copy the meter key from the Meter processor for later.

Step 7

Open the stream configuration of 2. Provisioning Meters and open the script named "Prepare Meters". Paste in the meter key that you got from the previous step.

Step 8

Run stream 2. Provisioning Meters. After the stream has completed, you will have 3 meters across your newly created meter type.

Step 9

The meters you created in the previous step is now associated with the Meter processor in the Botbot AI assist stream.

Run the stream. When it is completed, you will see the aggregated values from the input records in the Meter Inspector.

Step 10 (Optional)

If you want to delete your meters. Navigate to the stream configuration of 3. Purge Meters. Paste the meter key into the script "Prepare Filter". Run the stream. Now all meters related to Botbot AI assist have been deleted.

  • No labels