Shopify > Brightpearl - company and contact update/create

Introduction

This flow retrieves company, contact and location details from Shopify and creates/updates correlating details in Brightpearl.

Process flow snapshot

Click to view process flow snapshot

Limitations

No limitations to note.

Assumptions

Assumption
Summary

Sync direction

Running this flow assumes that you want to sync data in this direction (i.e. from Shopify to Brightpearl). If required, a flow for the reverse direction is available (Brightpearl > Shopify - create/update companies, contacts & payment terms). You should run one or the other.

Customisation

To ensure that this process flow runs as required, some customisation options are available. These are documented in the following sections:

Flow variables

The table below summarises flow variables defined for this process flow.

Flow variable
Summary
Default value

datesince

Set the relative number of days to look back for updates. Update the default value as required. This variable is referenced in the first map shape in the flow, where a custom string transform passes the lookback value into the subsequent Shopify query.

-4 hours UTC

For information on working with flow variables, please refer to our flow variables documentation.

Process flow shapes

This process flow includes some shapes that can be configured with your own settings. Please see guidelines in the table below.

Shape
Notes

Trigger

The default schedule for this flow is to run every 4 hours at 0 minutes past the hour. This is the recommended run frequency but the schedule can be changed if necessary.

Connector (Shopify)

If you did not add or select a Shopify instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Shopify instance. Source endpoint : Set to POST Get updated companies and contacts Updated since : Set to [[payload.lookback]]

Connector (Brightpearl)

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to GET Search company Parameter : Filter defined to retrieve only companies where the name field is set to [[payload.company_name]].

Connector (Brightpearl) branch: new company ➤ branch: first branch

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create new locations

Connector (Brightpearl) branch: new company ➤ branch: second branch

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create new contacts

Connector (Brightpearl) branch: new company ➤ branch: new branch

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create company locations to company ID

Connector (Brightpearl) branch: update company ➤ branch: create location ids

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create new locations

Connector (Brightpearl) branch: update company ➤ branch: new contacts

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create new contacts

Connector (Brightpearl) branch: update company ➤ branch: assign location id to company

If you did not add or select a Brightpearl instance during the blueprint installation process, the following settings must be configured: Source instance : Set to your required Brightpearl instance. Source endpoint : Set to POST Create company locations to company ID

Reference

Reference information for this process flow is documented in the following sections:

Scripts in this process flow

Script
Summary

Brightpearl - determine new or current companies

Checks if the company is new or already exists in Brightpearl.

Brightpearl - create array of addresses

Put Shopify addresses into an array.

New company - assign location IDs to contacts

Assign location IDs (from location creation) to the contacts.

BP - new contact update locations

Adds contact IDs to locations.

Brightpearl - determine new contacts and new locations

Checks new contacts and locations for existing companies in Brightpearl.

Assign location IDs to contacts

Adds location IDs to new contacts for existing companies.

Determine id map for location add

Transforms location data and associates location ids.

Cross-reference lookups in this process flow

This process flow does not use cross-reference lookups.

Last updated

Was this helpful?