Swan Retail System - pagination update timestamp response script

Introduction

Where required, Swan Retail System endpoints are paginated based on the amended date for items, so subsequent queries start from the amended date of the last item returned.

For this to work as required, we use a response script to add 5 milliseconds to the time stamp for last items. To implement this you must:

  • Install the Swan Pagination Update Timestamp response script from the Patchworks marketplace.

  • Apply this script to any process flow connector shapes where the Swan Retail System connector is used with a paginated endpoint.

For more information about how response scripts work, please see our Using connector shape response scripts page.

Paginated endpoints

Having installed the Swan Retail System connector from the Patchworks marketplace, you'll find that two endpoints are configured for pagination:

  • Get web updates

  • Get web stock

Installing the Swan Pagination Update Timestamp script

Step 1 Log into your Patchworks dashboard and navigate to the marketplace.

Step 2 Select the scripts tab and locate the Swan Pagination Update Timestamp script (use the search field to find it quickly):

Step 3 Install the script:

The script is installed and ready for use when called from a connector shape in process flows.

Applying the Swan Pagination Update Timestamp script

If a process flow includes a connector shape configured to use the Swan Retail System connector with a paginated endpoint, you must apply the Swan Pagination Update Timestamp script to connector settings. To do this, follow the steps below.

Step 1 Click the settings icon associated with the connector shape:

Step 2 Scroll down to the response handling section and click on the response script field:

Step 3 Select the Swan Pagination Update Timestamp script:

Any scripts installed from the marketplace or created by users associated with your company profile are available for selection.

Step 4 Select the latest version available:

Step 5 Save changes. Now whenever this process flow runs, this script is applied to responses.

For more information about how response scripts work, please see our Using connector shape response scripts page.

Last updated