---
schema_version: "1"
id: b7b32c8fa9d017c777864993640f9e53bc5d96687811b38927810ea9e6b8e2d7
title: The Scripting Pipelet
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/guides/scriptprogramming/thescriptingpipeletexplained.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/thescriptingpipeletexplained.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 68a28b24c8923cad58538ec709af80ab6ca62c3e209f518578d0dbcf2080a88d
products:
  - Composable Storefront
  - Salesforce APIs
---
# The Scripting Pipelet

There’s only one scripting pipelet, located in the Scripting folder in the B2C Commerce API. This pipelet executes a Server-Side JavaScript, which might require a database transaction.

The pipelet's configuration parameters are:

| Properties    | Description                                                                           |
| ------------- | ------------------------------------------------------------------------------------- |
| OnError       | Calls PIPELET_ERROR to process the error                                              |
| ScriptFile    | The name of the actual script relative to the script's folder containing the pipeline |
| Timeout       | Timeout in seconds. Default is 30 seconds.                                            |
| Transactional | Selection of false or true                                                            |

## Using ScriptLog

`ScriptLog` is a transient object for retrieving detailed log information during script execution. Use ScriptLog information during development to report any errors.

**note:** Put this object into the Pipeline Dictionary before using it. To add it to the pipeline dictionary, in the script node, under Dictionary Output, add a variable name to the `ScriptLog` property. For example, add `myLog` as the variable name.

Display ScriptLog data in any template with a simple ISML statement.

```
<pre>
<isprint value="${myLog}">
<pre>
```

**note:** To generate persistent log information, use `dw.system.Logger`.

## Using Trace()

Write your own information with the `trace()` function.

Use the following syntax:

```
trace(msg : String, params : Object...)
```

To use the `trace()` command, you must first specify the variable and then show it in a window, as shown here:

```
var res = googlesvc.doGoogleSearch(
...
);
trace( res );
```

This example writes to the ScriptLog output.
