Tutorials: billingTags

The billingTag provides a way to track your platform usage across components which track usage and costs.

Using billingTags, you can create a string that is used for combining expenses on your invoices. For example, you can group multiple pipelines together for a project or activity where you want to highlight those specific costs.

User-defined billingTags

User-defined billingTags have the following rules:

  • between four-16 characters.
  • case-sensitive.
  • allowed characters are alpha/numeric ASCII characters [A-Za-z0-9] and the following special characters:
  • _
  • the billingTag is not allowed to begin or end with the special characters:
  • _
    • up to six billingTags can be concatenated with + to a long string, for example, tag1+tag2+tag3+tag4+tag5+tag6

An invalid billingTag results in the following error:

{
  "title": "billingTag is invalid",                    
  "status": 400,                                                      
  "code": "<to be defined by the service>",                            
  "cause": "The billingTag passed does not meet validation rules",
  "action": "Please provide a valid billingTag according to service specification",
  "correlationId": "4199533b-6290-41db-8d79-edf4f4019a74"          
}

Valid and invalid characters

Technical accounting removes invalid characters from faulty billingTags. For example, "My#In%validTag_ThatIsVeryLong" → "MyInvalidTag_Tha". The following table shows some valid billingTags.

Sample Text
https://samplehost/sampleresource?billingTag=ABC&other_tag=123
https://samplehost/sampleresource?billingTag=DEF+GHI&other_tag=123
https://samplehost/sampleresource?billingTag=ABC2&other_tag=123B
https://samplehost/sampleresource?billingTag=DEF2+GHI2&other_tag=olp-test-123C
Regex for a single billingTag
([A-Za-z0-9][A-Za-z0-9-_]{2,14}[A-Za-z0-9])
Regex for multiple, concatenated billingTags
([A-Za-z0-9][A-Za-z0-9-]{2,14}[A-Za-z0-9])(+([A-Za-z0-9][A-Za-z0-9-]{2,14}[A-Za-z0-9])){0,5}

billingTag for Projects

This is part of the new HERE platform account management paradigm known as "Projects."

A project is identified by the following:

Purpose Example
name non-unique, purpose for UI "Happy Project"
id constructed from name for uniqueness in a organization "project/happy-project"
hrn globally unique identifier "hrn:here:authorization::olp-here:project/happy-project"
scope scope in token = hrn "hrn:here:authorization::olp-here:project/happy-project"

The cost allocation for projects is handled internally and is independent from user-defined billingTags. The scope from the token is extracted and / without "project/" is used as billingTag, for example, "olp-here/happy-project" is shown in the previous table.

The project related billingTag appears in your invoicing for the specific project cost split.

results matching ""

    No results matching ""