Creating Formula attributes & transformations

How to use formulas to automate calculations, transform values, and customize your data for specific Destinations

Plytix lets you use formulas in two different ways, depending on what you need. This article covers both: Formula attributes, which create a real, stored attribute in your PIM, and Attribute Transformations, which only change how a value displays for one Channel or Brand Portal.

Formula Attributes vs. Attribute Transformations

A Formula attribute is a real attribute, stored in your PIM like any other. It's calculated using a formula that references other attributes or properties, and it shows up everywhere that attribute would, on the Product Detail page, in the Product Overview, and in any Destination you assign it to.

An Attribute Transformation only changes how a value displays for one specific Channel or Brand Portal. It doesn't create or change anything in your PIM itself, it's an output-only formula that applies at the point of export.

Use a Formula attribute when you want the calculated value to exist as part of your product data generally. Use an Attribute Transformation when you only need to reformat a value for one specific Destination, without affecting your PIM data or any other Destination.

Use cases for Formula Attributes

There are several use cases for Formula attributes, including:

  • Calculate pricing and tax: apply tax costs based on your marketplace's requirements.
  • Convert currencies: automatically set up price conversions across different currencies.
  • Set conditioned sale prices: apply discounts automatically based on stock levels, sales performance, or seasonal promotions.
  • Add or change tags: customize your tags to optimize product search across different sales channels.
  • Calculate date estimations: compute estimated delivery dates or product lifecycle stages based on manufacturing or shipping dates.
  • Derive complex attributes: automatically derive complex attributes, like an environmental impact score, from multiple data points (e.g. materials used, production methods).

This isn’t an exhaustive list. If you’re looking for ways to apply Formula attributes to your own use case, reach out to our team.

Creating a Formula Attribute

To create a new Formula attribute:

  1. Go to Settings, click Attributes in the side menu, then click + Create attribute.
  2. Name your attribute, personalize the label, and optionally add a description.
  3. Select the Formula attribute type.
  4. In the Formula Editor, add your formula. See our Formula Cheat Sheet for a full guide on writing formulas in Plytix, and a list of available operations.
  5. Click Validate Formula to test it with mockup values for the attributes you selected.
  6. Click Run Test.

Once created, your Formula attribute is automatically assigned to your products, you’ll see it on each product’s Detail page and in the Product Overview.

The Formula Editor includes a built-in Formula Assistant that can help you build your formula from scratch, or fix errors in one you’ve already written.

If your formula references other attributes, its value updates automatically every time those attributes change. For example, a CONCAT formula combining Label and SKU updates automatically whenever either one changes.

Creating Attribute Transformations

While Formula attributes are useful when you want to manage and view a calculated value alongside your other product data, there are times when you only need to transform a value for one specific Destination, like formatting data to meet that platform's requirements. In those cases, create an Attribute Transformation directly within your chosen Channel or Brand Portal instead.

To learn how to use channel transformations to autoformat your product feeds for different sales channels, check out the video below.

Want the full picture? Check out the complete playbook: Product Feed Formatting

To create an Attribute Transformation:

  1. Go to the Channel or Brand Portal you want to add it to.
  2. Open the Attributes tab, where you manage all your attributes.
  3. Click Add Attributes to open the attribute selection area.
  4. On the right side, click Apply an attribute transformation.
  5. Click your newly created attribute to edit its label.
  6. Click Add attributes.
  7. Save your changes.

Your new attribute appears in the attribute list, marked TRA.

To build your formula for this new attribute, hover over it and click Settings.

In the side panel, you'll see the attribute's name and its formula. To modify it, click Edit formula.

The Formula Editor here includes the same built-in Formula Assistant available for Formula attributes, so you can get help building your transformation’s formula, or fixing errors in it.

To get started with Plytix operations, check out the Formula Cheat Sheet and Guide.

Inserting attributes and properties into formulas

The properties you can use in a formula are:

  • System attributes
  • Your custom attributes
  • Special properties, like $IS_VARIATION

Media attributes, Relationships, Variants, Variant of, Categories, and Families currently aren’t available for use in formulas.

To insert a property into a formula, use the $ prefix. This also lets you search for all available properties to insert.

 Don’t enclose the property in quotation marks.

Special properties

There are two special properties that aren't attributes or another entity in Plytix, they're only used in formulas.

$IS_VARIATION

Identifies whether the product in question is a variant. Returns true if it's a variant, or false if it's a parent product.

$HAS_VARIATIONS

Identifies whether the product in question is a parent. Returns true if it has variants, or false if it doesn't.

Frequently Asked Questions

A Formula attribute is a real attribute stored in your PIM, calculated from other attributes and visible everywhere in Plytix. An Attribute Transformation only changes how a value appears in one specific Channel or Brand Portal, without creating or changing anything in your PIM.

Not currently. Media attributes, Relationships, Variants, Variant of, Categories, and Families can’t be used in Plytix formulas at the moment.

Type $ in the formula editor, then search for the attribute you want to use. Don’t wrap it in quotation marks.

$IS_VARIATION and $HAS_VARIATIONS are special properties you can use in Plytix formulas, not real attributes. $IS_VARIATION tells you whether a product is a variant, and $HAS_VARIATIONS tells you whether a product is a parent with variants.

Yes. The Formula Editor in Plytix includes a built-in Formula Assistant that can write a formula for you from scratch, or fix errors in one you’ve already written. It works for both Formula attributes and Attribute Transformations.