# Brightpearl > Shopify - push catalog & pricing

## Introduction

This process flow creates and updates catalogs in Shopify from Brightpearl price lists.\
\
In Brightpearl, price lists are the equivalent of catalogs. Price lists are retrieved and compared with Shopify, then new price lists are created, and existing price lists are updated. Price breaks are supported.

{% hint style="info" %}
This blueprint includes two process flows to handle the sync of price lists between Shopify and Brightpearl: Brightpearl > Shopify (detailed here) and [Shopify > Brightpearl](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-brightpearl/available-process-flows-shopify-and-brightpearl/shopify-greater-than-brightpearl-sync-all-price-lists). You only need to run ONE, depending on which way you want the sync to work.
{% endhint %}

## Process flow snapshot

<details>

<summary><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FSUvxsp8XwrC9qsafJMIe%2Ficon%20process%20flow.svg?alt=media&#x26;token=ad1dc886-4a4e-4cad-9ad0-3d755e0f3b5a" alt="" data-size="line"> Click to view process flow snapshot</summary>

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FrtKJ2k8GcjAI9Rm2GvaJ%2FBrightpearl%20%3E%20Shopify%20-%20Push%20catalog%20and%20pricing%20-%20full%20flow.png?alt=media&#x26;token=eac8e40d-07f1-4b06-86b3-ef35b1091397" alt=""><figcaption></figcaption></figure></div>

</details>

## Limitations

<table><thead><tr><th width="266.79296875">Limitation</th><th>Summary</th></tr></thead><tbody><tr><td>Price list creation in Brightpearl</td><td>There is no dedicated API to create price lists in Brightpearl, therefore this flow cannot create Brightpearl price lists 'on the fly'. </td></tr></tbody></table>

## Assumptions

<table><thead><tr><th width="266.79296875">Assumption</th><th>Summary</th></tr></thead><tbody><tr><td>Brightpearl product cache must be up to date</td><td>It is assumed that the <a href="brightpearl-add-products-to-cache-for-price-lists">Brightpearl - add products to cache for price lists</a> flow has been run and your Brightpearl product cache is up to date.   </td></tr><tr><td>Price list creation in Brightpearl</td><td>This flow assumes that required price lists have been created in Brightpearl.</td></tr><tr><td>Sync direction</td><td>Running this flow assumes that you want to sync prices in this direction (i.e. from Brightpearl to Shopify). If required, a flow for the reverse direction is<a href="shopify-greater-than-brightpearl-fulfillment"> </a>available (<a href="shopify-greater-than-brightpearl-sync-all-price-lists">Shopify > Brightpearl sync all price lists</a>). You should run one or the other.</td></tr></tbody></table>

## Customisation

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

* [Flow variables](#flow-variables)
* [Process shape shapes](#process-flow-shapes)

### Flow variables

This process flow does not use flow variables.

### Process flow shapes

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

{% hint style="warning" %}
Shape settings determine the outcome of process flows. Do not change shape settings unless they are listed below.&#x20;
{% endhint %}

<table data-full-width="false"><thead><tr><th width="220.09375">Shape</th><th>Notes</th></tr></thead><tbody><tr><td>Trigger</td><td>The default schedule for this flow is to run <code>every weekday at 7pm</code>. This is the recommended run frequency given dependence on the <a href="brightpearl-add-products-to-cache-for-price-lists">Brightpearl - add products to cache for price lists</a> flow. If necessary, you can review/update schedules for these flows.  </td></tr><tr><td>Connector (Brightpearl)</td><td><p>If you did not add or select a Brightpearl instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Brightpearl</code> instance</p><p><code>Source endpoint</code> :  Set to <code>GET Get all price lists</code></p></td></tr><tr><td>Connector (Brightpearl)</td><td><p>If you did not add or select a Brightpearl instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Brightpearl</code> instance</p><p><code>Source endpoint</code> :  Set to <code>GET Get product prices from price list</code>  <br><code>Price list Id</code> :  Set to <code>[[payload.priceListId]]</code><br><code>Id</code> :  Set to <code>[[payload.product]]</code></p></td></tr><tr><td>Connector (Shopify)</td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Search Shopify catalogs</code><br><code>Catalog name</code> :  Set to <code>[[payload.catalog_name]]</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>First branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Create new catalog</code><br><code>Catalog name</code> :  Set to <code>[[payload.title]]</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>First branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Create a price list after catalog creation</code><br><code>Catalog title</code> :  Set to <code>[[meta.catalogtitle]]</code><br><code>Catalog ID</code> :  Set to <code>[[meta.catalogid]]</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>First branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Create publication after price list</code><br><code>Catalog title</code> :  Set to <code>[[meta.catalogid]]</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>First branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Update pricelist catalog v2</code><br><code>Price list ID</code> :  Set to <code>[[meta.pricelistid]]</code><br><code>Variant ID</code> :  Set to <code>[[payload.variantId]]</code><br><code>Amount</code> :  Set to <code>[[payload.amount]]</code><br><code>Currency code</code> :  Set to <code>[[payload.currencyCode]]</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>First branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Update products on catalog</code></td></tr><tr><td>Connector (Shopify)<br>branch: <code>Second branch</code></td><td><p>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Update pricelist catalog v2</code><br><code>Variant ID</code> :  Set to <code>[[payload.variantId]]</code></p><p><code>Amount</code> :  Set to <code>[[payload.amount]]</code></p><p><code>Price list ID</code> :  Set to <code>[[meta.pid]]</code><br><br><br><br><br><code>Currency code</code> :  Set to <code>[[payload.currencyCode]]</code><br><br><br><br><br><br><code>Minimum quantity</code> :  Set to <code>[[payload.minimumQuantity]]</code><br></p></td></tr><tr><td>Connector (Shopify)<br>branch: <code>Second branch</code></td><td>If you did not add or select a Shopify instance during the blueprint <a href="../installation-guide-shopify-and-brightpearl">installation process</a>, the following settings must be configured:<br><br><code>Source instance</code> : Set to your required <code>Shopify</code> instance.<br><code>Source endpoint</code> :  Set to <code>POST Update products on catalog</code></td></tr></tbody></table>

## Reference

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

* [Scripts used in this process flow](#scripts-in-this-process-flow)
* [Cross-reference lookups used in this process flow](#cross-reference-lookups-in-this-process-flow)

### Scripts in this process flow

<table><thead><tr><th width="293" valign="top">Script</th><th>Summary</th></tr></thead><tbody><tr><td valign="top">Match products to valid catalogs</td><td>Only outputs with a custom price list.</td></tr><tr><td valign="top">Make quantity price an array</td><td>Supports price break information.</td></tr><tr><td valign="top">Brightpearl - merge catalog data</td><td>Merges Brightpearl data into the required format.</td></tr><tr><td valign="top">Brightpearl - determine if a new or update catalog</td><td>Based on a comparison of Brightpearl and Shopify data, determines if a catalog needs to be created or updated.</td></tr><tr><td valign="top">Brightpearl - merge catalog and price list ids and output products</td><td>Adds new products with prices into new catalogs.</td></tr><tr><td valign="top">Transform to support break price</td><td>Adjusts the payload for Shopify so it can accept quantity breaks.</td></tr></tbody></table>

### Cross-reference lookups in this process flow

This process flow does not use cross-reference lookups.
