Parameters

class NotebookParametersMixin

This class defines all functions related to parameters. Using the parameter functions, the marketer can specify values to be used in your notebook code. This is especially useful to ask for settings that you use to train your models. Or you can ask for a segment for which you want to process all the profiles and retrieve data from profile properties that the marketer has specified.

There are a limited number of parameter types that can be specified. See the table below for all the possibilities.

Parameter type

Return type

Extra information

bool

bool

Boolean

channel

str

Returns the channel ID

connection

str

Returns the connection ID

date

datetime.date

Returns value in UTC time

datetime

datetime.datetime

Returns value in UTC time

dialogue

str

Returns the dialogue ID

external_tracker

str

Returns the tracker ID

float

float

group_property

str

Returns the group property ID

int

int

listener

str

Returns the listener ID

lifecycle

str

Returns the lifecycle ID

lifecycle_stage

str

Returns the stage ID within a lifecycle

notebook

str

Returns the notebook ID

objective

str

Returns the objective ID

password

str

Returns the value of the password field

plugin

str

Returns the plugin ID

profile_property

str

Returns the profile property ID

profile_property_unique

str

Returns the profile property ID

segment

str

Returns the segment ID

str

str

text

str

Alias of str

get_blueconic_parameter_value(parameter_name, parameter_type)

Gets and returns the value of this parameter. In case multiple values are retrieved, the first value is returned by this function.

Parameters:
  • parameter_name (str) – Name of this parameter; will be shown in the user interface to the marketer.

  • parameter_type (str) – Type of the parameter; determines what type of object marketers can select or enter for this parameter.

Returns:

The requested parameter if it exists. Otherwise None.

Return type:

NotebookParameterValues or None

get_blueconic_parameter_values(parameter_name, parameter_type)

Gets the values of this parameter.

Parameters:
  • parameter_name (str) – Name of this parameter; will be shown in the user interface to the marketer.

  • parameter_type (str) – Type of the parameter; determines what type of object marketers can select or enter for this parameter.

Returns:

A list of values of the parameter if it exists. Otherwise None.

Return type:

[NotebookParameterValues]

class Parameters
get_type(key)

Gets the (optional) parameter type, e.g. property, listener, connection.

Parameters:

key (str) – The key of the parameter type to retrieve

Returns:

The parameter type

Return type:

str

get_value(key)

Gets and returns the value of this parameter. In case a list of values is retrieved, the first value of the list is returned by this function.

Parameters:

key (str) – The key of the value to retrieve

Returns:

The first value

Return type:

str

get_values(key)

Gets all values of this parameter.

Parameters:

key (str) – The key of the values to retrieve

Returns:

All the values of the requested key in the parameter

Return type:

[str]

property keys

Returns the keys from the parameters.