annotation_build {cjar} | R Documentation |
Build the annotation in CJA
Description
This function builds an annotation in Customer Journey Analytics
Usage
annotation_build(
name = NULL,
description = NULL,
date_range = c(Sys.Date() - 30, Sys.Date() - 1),
color = "blue",
applyToAllReports = FALSE,
metric_id = NULL,
metric_compType = NULL,
filter_id = NULL,
filter_verb = NULL,
filter_dimType = NULL,
filter_terms = NULL,
filter_compType = NULL,
create_annotation = TRUE,
debug = FALSE,
dataviewId = Sys.getenv("CJA_DATAVIEW_ID")
)
Arguments
name |
This is the name of the new segment (required) |
description |
This is the description of the segment (required) |
date_range |
The date range of the annotation |
color |
Color name string representing the annotation's color. Supported values include 'blue', 'purple', 'green', 'orange', 'red', 'light green', 'pink', 'dark green', and 'yellow'. |
applyToAllReports |
A boolean that determines if the annotation applies to all report suites. |
metric_id |
The id for the metric scope as found in the |
metric_compType |
The component type. This is either 'm' for metric or 'cm' for calculated metric. This needs to be a "list()" array of items. |
filter_id |
The id for the metric scope as found in the |
filter_verb |
The verb is the operator of the filter. The options include 'equals', 'equals_any', and 'exists'. If the 'dimension type' is 'enum' or 'ordered_enum' it can only use one of the verbs, 'equals' or 'exists'. This needs to be a "list()" array of items. |
filter_dimType |
The dimension type as defined by the 'type' column in |
filter_terms |
If the verb is "equals_any" then this argument should contain a list of values. If the verb is "equals" then the argument should be a single item. This needs to be a "list()" array of list items. |
filter_compType |
The component type is either a 'd' (dimension) or an 's' (segemnt). This needs to be a "list()" array of items. |
create_annotation |
Default is TRUE. Set this to FALSE if you want to get the json string that hte function creates. |
debug |
This enables the api call information to show in the console for help with debugging issues. default is FALSE |
dataviewId |
Required The id of the dataview for which to retrieve dimensions. If an environment variable called |
Value
An id of the newly created annotation