Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Property Schema Docs #767

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
dc07065
Custom Property Schema Docs
katemacfarlane Oct 21, 2024
1f6ef78
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 21, 2024
b1d2bf0
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 21, 2024
374dc2e
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 21, 2024
2e7b866
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 25, 2024
9b78f1a
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 25, 2024
59ee6f1
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Oct 25, 2024
bc45d1c
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 7, 2024
2b05ae8
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
263fe73
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
f01ad49
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
00703b4
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
c22cd23
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
f189a16
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
f0f1915
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
6f079f1
Update docs/platform/advanced-targeting/custom-properties.md
katemacfarlane Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/platform/feature-flags/targeting/custom-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,41 @@ You can target users in numerous ways using Custom Properties. The following lis
**Special Users**. Sometimes organizations want to release a feature to special users only, such as users with a paid membership, those with a free trial, or those who have made large contributions to the company. In this case, some property name suggestions are `accountType` `pricingPlan` `isSubscriber` `isTrialUser` `amountContributed` etc.

**User Behaviour or Preferences.** You can experiment on users based on their behaviour or preferences. Some examples include `numberOfPageVisits` `gaveConsent` `preferredColor` etc.

## Custom Property Schemas

Similar to [Variable Schemas](/platform/advanced-variables/variable-schemas.md), Custom Property Schemas allow you to set up a schema and define a list of possible values for a Custom Property, which will appear in a dropdown when setting up Targeting Rules. Labels can be defined for each value to make selections more human-readable and easier to identify. This removes the need to remember valid inputs for a specific Custom Property.


![Custom Property Schema Targeting Rule](/oct-2024-cust-prop-schema-targ-rule.png)

### Setting Up a Custom Property Schema

You can find a list of all existing Custom Properties in the Project Settings section of your [Settings page](https://app.devcycle.com/r/settings).

![Custom Property Section on Settings Page](/oct-2024-cust-prop-settings-page.png)

To add a schema to a Custom Property, click on the Custom Property you want to modify. On the Custom Property Details page, locate the Schema section. Schemas can be added to Custom Properties that are already in use.

![Schema Section on Details Page](/oct-2024-schema-on-cust-prop-det-page.png)

From there, select an Enum Schema from the dropdown. This allows you to specify allowable values for string or number properties.

If you want to require this property to be set when passing custom data to the SDK, click the toggle icon next to Property Required. Enabling Property Required provides an additional safeguard when passing user data into Typescript-based SDKs.

Currently, this setting only affects the output of our [type generators](/sdk/client-side-sdks/javascript/javascript-typescript). When enabled, TypeScript enforces that the property is present in custom data. If any Custom Property flagged as required is missing, the SDK will generate a TypeScript error to alert you about missing data.





Once you select an Enum Schema type, define the allowable values in the Allowed Values section below.

If desired, you can turn on the Allow Additional Values setting, which will permit additional values to be used in Targeting Rules that aren't directly defined in that Custom Property's schema.

For example, if you defined three options—Alberta, Quebec, and Ontario—in the Allowed Values section and toggled this option on, you wouldn’t be limited to those three values, even though they appear in the Custom Property value dropdown.

![Custom Property Schema Targeting Rule](/oct-2024-cust-prop-schema-filled.png)

Once you save your changes and apply the schema to the Custom Property, a dropdown with the allowed values will be available when setting up Targeting Rules for that Custom Property.

Binary file added static/oct-2024-cust-prop-half-fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/oct-2024-cust-prop-schema-filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/oct-2024-cust-prop-schema-targ-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/oct-2024-cust-prop-settings-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/oct-2024-schema-on-cust-prop-det-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.