Integration With Brightpearl

Last Updated: February 4, 2024

ReturnGO integrates with Brightpearl to help you streamline your returns management. Brightpearl is an ERP software solution designed for online and in-person retail organizations to simplify operations. 

With features like inventory management, shipping, accounting, POS, and business intelligence, it offers a comprehensive platform for efficient management.


To connect your Brightpearl account you'll need:

  • Account ID
    • Your Brightpearl account ID.
  • Refund method code
    • Can be found in your Brightpearl Dashboard under Accounting > List bank accounts.  Click on needed, then click on edit and copy the 4-digit code.
  • New Sales Credit status ID (optional)
    • The ID of the status you want to assign to the Sales Credit. If no status ID is specified, the configured default is used.
  • New Sales Credit channel ID (optional)
    • The ID of the channel of the newly created Sales Channel. If no ID is provided, the default is used.
  • Customer reference prefix (optional)
    • Prefix to align to the RMA number as a customer reference.


The ReturnGO-Brightpearl integration supports:

  • Automatic creation of sales credits (RMAs) on Brightpearl
  • Updating refund information on Brightpearl
  • Receiving webhook updates from Brightpearl

Linking Your Brightpearl Account to ReturnGO 

To link your Brightpearl account to ReturnGO: 

  1. Go to Integration > Products & Services
  3. Choose Brightpearl from the drop-down list. 
  4. Click on the check mark.

5. Enter your credentials. 
6. Click CONNECT. 

Configuring Field Mapping for Sales Credit

You can upload a JSON config file to map the required fields for creating a Sales Credit on Brightpearl. This enables you to configure the specific data you want ReturnGO to transmit when creating a Sales Credit.

ReturnGO will use the provided mapping to automatically populate the relevant fields on the Sales Credit.

Note: This is particularly useful for more advanced users who have a developer and need to customize the information sent to Brightpearl.

externalRef (Optional)
This property is optional and can be used to define a function name for external reference transformation. The "transformFunc" field within "externalRef" is particularly useful.

ReturnGo utilizes the "externalRef" field to look up the original Sales Order during Sales Credit creation on Brightpearl.

The functions supported are:

1. getOrderNameNumericPart - Removes non-numeric characters from the order name.

Example: If the order name in Shopify is #12345, the transformed order reference in Brightpearl will be 12345.

2. getShopifyOrderIdWithSOPrefix - Adds the Shopify order prefix to the order ID.

Example: If the order name in Shopify is #12345, the transformed order reference in Brightpearl will be SO12345.

customFields (Optional)

This property is optional and contains an array of custom fields to be filled after Sales Credit creation. Each item in the array has two required fields:

targetField: Represents the 'code' of the custom field to be filled.

sourceField: Specifies the path to a value in ReturnGO. Please consult with customer support to get assistance with determining the appropriate path.

By configuring these properties in the JSON file, you can enhance the functionality and customization of your Brightpearl integration seamlessly.

Using the config file, you can set the following fields according to your requirements:

  1. Sales Order fields
  2. Tracking number information for the return label

rmaDetails.shipments.0.trackingNumber function - takes the tracking number from the RMA information sent to Brightpearl when creating the Sales Credit, and places it in the appropriate custom field on Brightpearl.

Uploading the Config File

To upload the config file:

  1. Go to Settings > Integrations > Products & Services.
  2. Under Brightpearl Integration, paste the contents of the config file into the relevant text box.
  3. Click on the save icon to confirm.

File Structure

There are 2 options for the structure of the JSON file:

Option 1

    "externalRef": { "transformFunc": "getOrderNameNumericPart" },
    "customFields": [
            "targetField": "PCF_RTNTRKCD",
            "sourceField": "rmaDetails.shipments.0.trackingNumber"

Option 2

    "externalRef": { "transformFunc": "getShopifyOrderIdWithSOPrefix" },
    "customFields": [
            "targetField": "PCF_RTNTRKCD",
            "sourceField": "rmaDetails.shipments.0.trackingNumber"

Note: If the config is not added, no custom fields will be added to the Sales Order object.

How the Integration Works

Create Sales Credits on Brightpearl

This integration enables the automatic creation of a Sales Credit (RMA) on Brightpearl when an RMA is approved in ReturnGO.

Update Refund Information on Brightpearl

Using the integration, ReturnGO will automatically update the Sales Credit on Brightpearl with refund information.

Webhook Updates from Brightpearl

Receive webhook updates from Brightpearl to automatically update the RMA card and status for the following events:

  • Items are received.
  • Items are restocked.

Item Validation and Restocking Features

When using the integration with Brightpearl, the item validation and restocking features in ReturnGO are disabled. 

Instead, ReturnGO will get updates from Brightpearl when items are received and when the inspection results are available. This will allow you to automate business processes based on these events.

Refund Reconciliation

Please note that refunds processed in ReturnGO will not be automatically reflected in your Brightpearl ERP. Visit your Brightpearl dashboard to manually reconcile the refund.

Troubleshooting the Integration 

Many of the issues encountered related to the integration can be identified during setup. 

Here are a few things you can check to try and fix such issues: 

Setup Issues 

Make sure your API credentials are accurate. 

  • There should be no extra spaces before or after each API entry. 
  • Make sure you are using live or production API credentials, and not dev or test APIs. 
  • Try to re-generate a new API key and reconnect. 

Brightpearl-Related Issues 

For Brightpearl-related issues, please contact Brightpearl support.

For any other issues, feel free to contact ReturnGO support through chat or email.