Use Twig in a PostingTemplate
Use Twig on a PostingTemplate attribute to pull in product data, add conditions and format values, then check the result in the preview pane.
The menu path in Acenda Admin.
CHANNELS > Integrations > Edit > Posting Templates > attribute > Twig tab
Use Twig in a PostingTemplate. Twig is the template language behind the Value Type tabs on your PostingTemplates. It pulls in your product data, applies conditions, and formats the result the way a channel expects.
Under Channels, Integrations, click Edit on a sales channel, open its Posting Templates, and pick an attribute. Each value has String, Property and Twig tabs. Twig is where conditions and formatting live. The same three tabs appear in Generic Templates and in Commonality rules. A few recurring export feeds also use Twig.
If you're not sure whether yours does, ask Acenda support.
Double curly braces output a value, such as product dot sku. Tags made of a curly brace and a percent sign run logic, like if, for and set. A pipe adds a filter that changes the value on its way out. Raw outputs real HTML instead of escaped text, lower makes text lowercase, length counts items, round rounds a number, and default fills in a value when a field is empty. Wrap a block in apply spaceless to remove extra whitespace, and use comment tags for notes that never print.
Here's an example for a color attribute. It checks whether one of the product's variant options is named color and has more than one value. If so, it outputs the variant's color field with the raw filter. The variables you can use depend on where you write Twig. In a posting template, you'll often use product dot sku, product dot variant options, and variant dot fields for a custom field on the variant.
Before you save, check the preview pane next to the editor. It shows exactly what your formula produces, and if something doesn't parse, it shows the error in plain English. If the output is blank, check the variable path. Twig doesn't flag an unknown or empty variable. It prints nothing.
When a mapped attribute comes out blank, Acenda leaves it out instead of sending an empty value, so the channel keeps what it already has. If HTML tags show as plain text, add the raw filter. And don't hardcode sales channel IDs, because they differ from one Acenda account to the next. An AI assistant can help you draft or debug a formula. Describe the data and the logic you need, then test the result in the preview pane.
To recap: pick the Twig tab on a template attribute, output values with curly braces, add logic and filters, and check the preview pane before you save. Questions? We're here to help. Chat with Acenda support in Acenda Admin, or visit acenda.com/help.
Want to see how onboarding works?
Book a DemoOr contact us.
Acenda provides these resources as a courtesy. While we strive for accuracy, they may contain mistakes, errors, or omissions, and information may become outdated. Vendors should use their best judgment, consult an attorney as appropriate, and confirm current requirements with the applicable sales channel.