System Functions (System Control)


Creates a billable event that tracks consumer usage of an installed monetized application. This system function can only be called from an application installed in a consumer account.






Identifier for the custom event class.

Type: String

The identifier has the following requirements:

  • Must start with a letter (A-Z) or an underscore (“_”).

  • Must contain only letters, underscores, decimal digits (0-9), and dollar signs (“$”).

  • Length cannot exceed 64 characters.

  • Must not start with SNOWFLAKE_. SNOWFLAKE_ is reserved for internal identifiers.

The class name is stored and resolved as uppercase characters. Class name comparisons are case-insensitive.


Specifies the timestamp (UTC) when the event was created as a Unix timestamp in milliseconds.

Type: Integer


Specifies the amount in US dollars to be charged for the billable event. The value must be greater than 0, less than 999.99, and must not exceed 2 decimal places of precision. For example, 1.00 or 0.07.

Type: Double



Identifier for the custom event subclass. This field is only used by the provider.

Type: String

The identifier has the same naming requirements as the class argument.


Specifies the start time of the event as a Unix timestamp in milliseconds.

Type: Integer

Use to set the start time in cases where providers want to emit an event based on a time range; otherwise set to the same value used for the TIMESTAMP argument.


A JSON string array containing fully qualified object names that apply to this event.

Type: String

The maximum size is 4 KB.


A JSON string of key-value pairs the provider can use to send additional info.

Type: String

The maximum size is 4 KB.


This function returns the following status messages:

Status Message


Type of Value Returned


Indicates that the billable event was successfully created.

Invalid parameter: <PARAM_NAME>.

Indicates that an unsupported parameter was passed to the function.

Only callable from within an application.

Indicates that the function was called from outside an application.

Payload length exceeds the limit of 9000 characters.

Indicates that the call to the function exceeds the character limit.

Number of events exceeds the limit of 100.

Indicates that the maximum number of events has been reached for a single call.

Too many calls. At most 1 call is allowed per 1 second window.

Indicates that an application made too many calls to this system function within a specific timeframe.

Usage notes

This system function can only be called from within a stored procedure in the setup script of an application created using the Snowflake Native App Framework.


See Billable event examples.