Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

getDistinctValues

Queries all distinct values of an attribute (max. 10,000) in Optimizely Campaign.

🚧

Caution

Using this method with the wrong argument (no threshold for instance) can lead to huge amount of data returned.

Type: String[ ]

Parameters

NameTypeValue
sessionIdStringID of the session
recipientListIdlongID of the recipient list
recipientFilterIdlongID of the target group
attributeNameStringField name (e.g. firstname, lastname etc.) to be queried for distinct values
thresholdintNumber of characters that are examined

Example: With a threshold of 4 , the values Test-A and Test-B are summed up to Test.

Return values

Distinct values of the attribute (max. 10,000)

Code structure

String[] getDistinctValues(String sessionId, long recipientListId, long recipientFilterId, String attributeName, int threshold)