# 2025 03 05 release notes (core)

## Release summary <a href="#release-summary" id="release-summary"></a>

This page summarises items scheduled for the following release to the Patchworks Core Production environment.&#x20;

| Release version | Release date   |
| --------------- | -------------- |
| v2025-03-05     | 5th March 2025 |

New features, updates, and enhancements are summarised below.

## **Pre and post-request scripts**

Until now, if a `post-request` script was required for an endpoint it could be [added to connector shapes in process flows](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape/using-connector-shape-response-scripts) - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FfIJSYK4Kia04AuuUH5mj%2Fcurrent%20response%20script%20option%20b.png?alt=media&#x26;token=2b987c18-0f71-440b-ad84-1efcc77af323" alt=""><figcaption></figcaption></figure></div>

After this release, `post-request` scripts can also be added to connector endpoints, which means they are applied automatically wherever the endpoint is used in process flows. We've also added the ability to apply `pre-request` scripts to endpoints.

We aren't changing the existing [response script functionality in connector settings](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape/using-connector-shape-response-scripts) and **you don't have to make any changes to your setup**. However, if you currently use response scripts via connector shape settings, we do advise considering whether this is the best approach for your needs. Please see below for general guidance.

### Recommended use for post-request scripts

* If your response (i.e. `post-request`) script must *always* be applied when an endpoint is used, we recommend adding the script to the endpoint rather than connector shapes. This is a great time saver (no more having to remember to update connector shapes across your flows!) and makes ongoing maintenance easier. For more information please see our [post-request script](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/post-request-script) page.&#x20;
* If your response script is only needed when the endpoint is used in a specific process flow, it should be [added to relevant connector shapes in process flows](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape/using-connector-shape-response-scripts) OR called from a [script shape](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/script-shape) after the connector step.

{% hint style="danger" %}
If a connector shape is configured for an endpoint associated with a `post-request` script AND a `response script` is applied in connector shape settings, **the connector shape takes precedence**. In this scenario, the `response script` applied in the connector shape is used and the `post-request` script applied to the endpoint is ignored.
{% endhint %}

### Recommended use for pre-request scripts

`Pre-request` scripts for endpoints are introduced in this release. When a `pre-request` script is added to an endpoint, it is applied every time that endpoint is called. With this in mind:

* If your `pre-request` script must *always* be applied when an endpoint is used, you can simply add the script to your existing endpoint. <br>

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Please see our <a href="../../developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/pre-request-script">pre-request script</a> page for more information.</p></div>

* If your `pre-request` script is only needed when the endpoint is used in a specific process flow, you should:
  * Clone the existing endpoint
  * Edit the cloned endpoint - change the name as appropriate and add the `pre-request` script
  * Where needed, configure connector shapes to use the endpoint associated with your pre-request script. Otherwise, use the standard endpoint.<br>

    <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Please see <a href="../../process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-callback/passing-the-patchworks-signature-as-a-header-for-callback-requests">using a pre-request script in some process flows but not others</a> for more information.</p></div>
