New ContactAttribute - tsubotitsch/Brevo GitHub Wiki

New-ContactAttribute

SYNOPSIS

Creates a new contact attribute in Brevo.

SYNTAX

New-ContactAttribute [-attributeCategory] <Object> [-attributeName] <Object> [[-value] <Object>]
 [[-isRecurring] <Object>] [[-enumeration] <Object>] [[-multiCategoryOptions] <Object>] [[-type] <Object>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

The New-ContactAttribute function creates a new contact attribute in Brevo with the specified category, name, and other optional parameters.

EXAMPLES

EXAMPLE 1

New-ContactAttribute -attributeCategory "normal" -attributeName "FirstName" -type "text"
Creates a new contact attribute with the category "normal", name "FirstName", and type "text".

EXAMPLE 2

New-ContactAttribute -attributeCategory "category" -attributeName "Status" -enumeration @{"Active"="1"; "Inactive"="0"}
Creates a new contact attribute with the category "category", name "Status", and an enumeration of values.

PARAMETERS

-attributeCategory

Specifies the category of the attribute. Valid values are "normal", "transactional", "category", "calculated", and "global". This parameter is mandatory.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-attributeName

Specifies the name of the attribute. This parameter is mandatory.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-enumeration

Specifies a list of values and labels that the attribute can take. Use only if the attribute's category is 'category'. This parameter is optional.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-isRecurring

Specifies whether the attribute is recurring. Use only if the attribute's category is 'calculated' or 'global'. This parameter is optional.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-multiCategoryOptions

Specifies a list of options you want to add for a multiple-choice attribute. Use only if the attribute's category is 'normal' and the attribute's type is 'multiple-choice'. This parameter is optional.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-type

Specifies the type of the attribute. Valid values are "text", "date", "float", "boolean", "multiple-choice", "id", and "category". The default value is "text". This parameter is optional.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: Text
Accept pipeline input: False
Accept wildcard characters: False

-value

Specifies the value of the attribute. Use only if the attribute's category is 'calculated' or 'global'. This parameter is optional.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

Returns the created attribute object.

NOTES

RELATED LINKS

⚠️ **GitHub.com Fallback** ⚠️