Skip to content

Commit bb1898f

Browse files
committed
Adding new property, replace the value of a current property, and change the value of a property if a user triggers an event
1 parent b4ee4fd commit bb1898f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/protocols/transform/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,13 @@ Here's a list of Segment Transformations with some use case examples.
117117

118118
- **Add a new property name and assign a value:** If you want to create a new property and set a static value, use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to create `new_property: static_value`. Segment currently supports setting static values for top-level fields with `propertyValueTransformations`. However, Segment doesn't support changing fields outside the properties or traits object with `propertyRenames`.
119119

120-
- **Change property value casing:** Transform property value casing to lowercase, uppercase, snake case, kebab case, or title case. For example, transform the property value `united states` to `USA` to remain consistent with your data tracking.
120+
- **Change property value casing:** Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to transform property value casing to lowercase, uppercase, snake case, kebab case, or title case. For example, transform the property value `united states` to `USA` to remain consistent with your data tracking. You can transform these properties using static casing functions (`"uppercase("United States")"`) or dynamic casing functions (`"lowercase(property value 1")"`).
121121

122+
- **Create a new property**: Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to create a new property and set the value of the new property to the transformed value of an existing property. For example, create a new property (`prop2`) with a value of `lowercase(properties.prop1)` by including `prop2: lowercase(properties.prop1)` in your payload.
123+
124+
- **Replace the value of a current property**: You can replace the property value of an existing property using static casing functions, for example `prop1: "titlecase(value 2)"`, or dynamic casing functions (`"prop1: kebabcase("properties.prop1")"`) with [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"}.
125+
126+
- **Change the value of a property if a user triggers an event:** Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to dynamically assign the value of one existing property to another property, or assign the value of an property to a new property. For example, you can assign a new property, `property2`, to have the same value as `property1` if a user clicks a button.
122127

123128
> info ""
124129
> Segment displays an error if the following property conflicts occur:

0 commit comments

Comments
 (0)