# How can we help?

## Overview

Smart Code Assist is a type-ahead feature that makes it easier to write Smarty within your data transformations. Once you type the `{` character, a list of methods will display, and you can choose one to populate your script.

## Enable Smart Code Assist

1. To enable this feature in your account, click on **Profile Settings** in the upper right corner of your screen.

2. Click the **Edit** button in the **Auto Complete Preference** pane.

3. Click the radio button to **Enable** Smart Code Assist.

## Modify configuration

You can modify the configuration by changing the JSON. Here is one example of how you could replace the method `getEventRecords`.

```
    {
        "snippet": "{\$events.eventName = 'browse'}\n{\$events.newerThan = ''}\n{\$events.properties = []}\n{\$events.limit = 2}\n{\$events.sort = []}\n{\$events.data = \$utils->getEventRecords(\$events.eventName, \$events.newerThan, \$events.properties, \$events.limit, \$events.sort)}\n\n<h2>Debug events</h2>\n{\$utils->jsonPrettyPrint(\$events)}\n",
        "description": "Data stored within the contact activities collection can be referenced and used within any message body.",
        "name": "$utils->getEventRecords",
        "value": "{$utils->getEventRecords}",
        "parameters": [
            {
                "name": "eventName",
                "description": "The name of the event stored in the contactactivities collection.",
                "required": "*",
                "expected": "String",
                "defaultValue": ""
            },
            {
                "name": "newerThan",
                "description": "Filters the event records returned based on the timestamp of the events.",
                "required": "",
                "expected": "String",
                "defaultValue": ""
            },
            {
                "name": "properties",
                "description": "Filters the event records returned based on a matching property value(s).",
                "required": "",
                "expected": "Array",
                "defaultValue": ""
            },
            {
                "name": "limit",
                "description": "Maximum number of records returned.",
                "required": "",
                "expected": "Integer",
                "defaultValue": ""
            },
            {
                "name": "sort",
                "description": "Sort order of the returned records.",
                "required": "",
                "expected": "Array",
                "defaultValue": ""
            }
        ]
    }
```

## Use Smart Code Assist in a data transformation

1. When configuring your data transformation, click **Edit** in the **Data Transformation** pane.

2. Type `{` into the script pane to access a list of Smarty utilities you can use in your transformation.

- You can [learn more about data jobs and transformations here](https://support.cordial.com/hc/en-us/articles/14659667437453).
