Shopify Configuration
How integration from Pimics to Shopify works
As every export from Pimics, also integration with Shopify needs to have a publication. The integration is done the way that Pimics send data to Shopify API and keep all shopify identifactions and other important metadata in Pimics database.
The integration works together with standard Shopify integration. So Shops and Items need to be first define there.
Enable Shopify in Pimics
Shopify integration is not enabled be default in Pimics. You don't need to install a new packages, all the functions are in the Pimics PIM. Anyway, you need to have the Shopify in your license as addition connector. During the process you can be asked to extend the license.
To enable Pimics follow the steps below.
- Search for Catalog Setup and select related link
- Go to Application Area group
- Enabled Shopify
- Restart your session
Connection
The first thing that needs to be set is the connection between Pimics and Shopify. Unfortunatly, the process is not so smoothly as Microsoft has it.
- Create custom app in Shopify. Read Shopify documentation
- Application needs to get Admin API scopes. Read Shopify documentation
- The last point is to get access token to the API and save it for Pimics. Read Shopify documentation
- Open Business Central
- Search for Pimics Authentications and select related link
- Create a new record on the page
- Select Shopify from the list in field Type. The field Code should be fill up automatically if not set it.
- In the group Shopify set Admin API Key to the key from point 3
- Set on the authentication field Default to Yes if you have 1 shop OR select Shopify shop in the field Shop Code if you have more shops
- Close the page
Prepare and synchronize data
When the connection is avaialable you can start with data. Pimics send product data to Shopify API.
Synchronizae metadata
All metafields needs to be defined in Shopify. There is two ways how to do it in Shopify after the data upgrade or in Pimics before the data upgrade. Below is process how to synchronize features and texts as metafields, this needs to be run before synchronization, otherwise it will not create the definition and the definition needs to be done in Shopify. See How to define metafields.
- Open Business Central
- Search for Synchronize Shopify Metafield Definitions and select related link
- Enable Synchronize Features
- Enable Synchronize Descriptions
- Select the shopify shop in the field Shopify Shop Code
- We suggest to set filter in the group Feature
Shopify has a limit of number of metafields. So we need to synchronize only the main features for filtering or other moduels in Shopify
- Add new filter by selecting + Filter ...
- Find field Default Feature Type
- Set the value of Default Feature Type to Filter
- Start synchronization by selecting OK
Usually upgrades should run automatically on the background, see section Automatically update data on background for the configuration.
Synchronize product data
We need to have a publication with the certain configuration to be able to synchronize product data to Shopify.
- Open Business Central
- Search for Publications and select related link
- Create new publication. If you have a template for Shopify use it otherwise create empty publication.
we suggest to use our RapidStart for default shopify integration see the list of available configurations
- Set or verify the setup of channel. See the field Export Channel
- If it is empty you need to create a new one by sleecting action New and set field Code to SHOPIFY
- If there is a value because of template, open the card by selecting Select from Full list and Edit
- Set field Publication Type to Shopify
- if you see an error about Application Area you need to first enable Application Area for Shopify
- Close Publication Channel Card and go back to Publication Card
- Use lookup in the field External Code to select Shopify shop. The field is in the group General when you select Show more fields.
- Now you can define rules and add data to the publication
Data is sent to Shopify using Publication Queue, verify that you have defined Job Queue for sending.
Change templates and setup in Shopify
Features, Texts and Content are sent to Shopify as metafields. You can use this data with several extensions to make filters, etc. But also these metafields can be put directly into Templates.
Extend Shopify theme to show a text
- Go to Shopify administration
- Read a Shopify documenation about Themes and open the current Theme
- In the theme open product page
- Select a part where you want to place the text
- Select an icon Insert Dynamics Contect
- From the list of metafields select a one starting with Text:
- Save the template
- Because the text is typically formated in HTML you need to change the default placeholder
- Switch to Edit Code
- Select product.json
- Find line like this one:
"content": "<p><\/p>"
- Replace
| metafield_tag
to.value
for example:"content": "<p><\/p>"
- Save the template