File tree Expand file tree Collapse file tree 3 files changed +101
-0
lines changed
_includes/konnect/metering-and-billing Expand file tree Collapse file tree 3 files changed +101
-0
lines changed Original file line number Diff line number Diff line change 1+ ### Assigned subjects
2+
3+ Billable events ingested into OpenMeter always include a ` subject ` .
4+ Subjects represent usage-producing entities within your system.
5+
6+ A customer can have ** one or many** subjects assigned, allowing you to group usage and billing.
7+
8+ Example scenario:
9+
10+ * A customer has multiple departments producing usage:
11+ * ` department1 `
12+ * ` department2 `
Original file line number Diff line number Diff line change 1+ ---
2+ title : " Customer"
3+ content_type : reference
4+ description : " Learn how Customers work in {{site.konnect_short_name}} Metering and Billing and how they access features."
5+ layout : reference
6+ products :
7+ - metering-and-billing
8+ tools :
9+ - konnect-api
10+ works_on :
11+ - konnect
12+ breadcrumbs :
13+ - /metering-and-billing/
14+ related_resources :
15+ - text : " {{site.konnect_short_name}} Metering and Billing"
16+ url : /metering-and-billing/
17+ - text : " Subjects"
18+ url : /metering-and-billing/subjects/
19+ ---
20+
21+ ## What is a customer?
22+
23+ Customers represent individuals or organizations that subscribe to plans and gain access to features.
24+ You can create and manage customers using the API or the Konnect dashboard.
25+ {% mermaid %}
26+ flowchart TB
27+ %% Left side
28+ Customer[ Customer]
29+ Subject[ Subject]
30+ UsageEventsLeft[ Usage Events]
31+
32+ Customer -->|1:n| Subject
33+ Subject -->|1:n| UsageEventsLeft
34+
35+ %% Right side
36+ ACME[ACME Inc.]
37+ Dept1[Department 1]
38+ Dept2[Department 2]
39+ UsageEvents1[Usage Events]
40+ UsageEvents2[Usage Events]
41+
42+ ACME --> Dept1
43+ ACME --> Dept2
44+
45+ Dept1 --> UsageEvents1
46+ Dept2 --> UsageEvents2
47+ {% endmermaid %}
48+
49+ ## Create a customer
50+
51+ When onboarding a customer, you must provide the following information in the request:
52+
53+ {% table %}
54+ columns:
55+ - title: Name
56+ key: name
57+ - title: Description
58+ key: description
59+ rows:
60+ - name: "Name"
61+ description: "The name of the customer, for example: ` ACME, Inc. ` "
62+ - name: "Assigned Subject"
63+ description: "The [ subject] ( /metering-and-billing/subjects/ ) associated with the customer."
64+ {% endtable %}
65+
66+
67+ ``` ts
68+ const customer = await openmeter .customers .create ({
69+ name: ' ACME, Inc.' ,
70+ usageAttribution: { subjects: [' my-identifier' ] },
71+ });
72+ ```
73+
74+ {% include_cached /konnect/metering-and-billing/assigned-subjects.md %}
75+
76+ ## Schema
77+
78+ [ Insert Schema here] ( https://openmeter.io/docs/api/cloud#tag/customers )
79+
80+ ## Set up a Customer
81+
82+ CRUD a subject here
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ For example:
5858
5959For more information, see ** subject assignment** in the Metering and Billing documentation.
6060
61+ {% include_cached /konnect/metering-and-billing/assigned-subjects.md %}
62+
6163## Data ingestion
6264
6365When shipping data to {{site.konnect_short_name}} you must include the subject within the payload:
@@ -74,6 +76,11 @@ When shipping data to {{site.konnect_short_name}} you must include the subject w
7476}
7577```
7678
79+ ### One subject during beta
80+
81+ During the billing beta, customers are limited to ** one subject** .
82+ Support for multiple subjects will be available in the future.
83+
7784
7885## Schema
7986
You can’t perform that action at this time.
0 commit comments