AMPScript Beautifier

This extension helps you format (beautify/prettify) your SFMC AMPscript for easier readability and maintenance.

AMPScript Beautifier Features:

  • Automatic formatting including indentation and method organization.
  • Option to set case-sensitivity of keywords for better consistency.
  • Indents IF statements correctly (including nested IF statements)
  • Uppercases all controls and functions (IF, THEN, DO, UPSERTDATA etc.)
  • Standardized indenting by removing excessive whitespace (fixes bad user formatting)
  • Standardized string formatting
  • Standardized function formatting
  • Formatting can be applied to whole code or selected code only

To simplify your SFMC development, click [here](link to extension).

Usage:

  1. Mark your file as AMPscript (save as .amp or select AMPscript from the Language Mode selector).
  2. Run the “Format Document” command.

The format command can also run automatically based on your settings (editor.formatOnSave).

Extension Settings: This extension contributes the following settings:

  • beautyAmp.maxParametersPerLine: Maximum number of method parameters allowed on one line.
  • beautyAmp.capitalizeVar: Use uppercase characters for ‘VAR’ keywords (false for lowercase).
  • beautyAmp.capitalizeSet: Use uppercase characters for ‘SET’ keywords (false for lowercase).
  • beautyAmp.capitalizeAndOrNot: Use uppercase characters for ‘AND’, ‘OR’, ‘NOT’ keywords (false for lowercase).
  • beautyAmp.capitalizeIfFor: Use uppercase characters for ‘IF’ and ‘FOR’ block keywords (false for lowercase).

Default values for these settings can be found in Features Contributions.

Note: This extension was originally developed in collaboration with Merkle DACH (formerly Isobar Switzerland) and is now available to the developer community.

Known Issues:

  • Statements and For iterations are not fully formatted.
  • NOT operator is not formatted.
  • Function and variable names are not handled by the formatter.

Make AMPscript beautiful again!

This Brackets extension reformats AMPscript (from Salesforce.com Marketing Cloud/ExactTarget) for enhanced readability.

Download Brackets here: http://brackets.io/

You may download and install this extension in one of three ways. Using Extension Manager to find it through the extension registry you always find the latest stable release conveniently within Brackets.

You can also get the latest work-in-progress version by downloading or installing the extension directly from the repository. This allows you to try new features that might not have been tested fully yet.

🔔🔔  Follow us on LinkedIn  🔔🔔

Related Posts
Salesforce Marketing Cloud Transactional Emails
Salesforce Marketing Cloud

Salesforce Marketing Cloud Transactional Emails are immediate, automated, non-promotional messages crucial to business operations and customer satisfaction, such as order Read more

Perfect Drip Campaign
Sending Emails Through Salesforce

In an ideal world, you effortlessly conquer the lead generation challenges with one creative arm tied behind your back, craft Read more

Salesforce Content Builder
Salesforce Content Builder

Salesforce Content Builder empowers you to craft compelling emails and landing page templates, complete with reusable and interactive content blocks. Read more

Demandbase Salesforce Integration
Salesforce and Demandbase

The integration of Demandbase with Salesforce creates a seamless connection between Demandbase One and your Salesforce CRM, establishing a bidirectional Read more