Skip to content

Knowledge Base

Business Process Automation Platform

Shopify Integration Tool v1.0.16

Shopify Integration Tool Introduction

What is the Shopify Integration Tool?

The Shopify Integration tool allows communication between BPA Platform and Shopify. All communication uses XML. You use the Integration tool to map BPA Platform data to Shopify objects and operations. Operations such as, ADD, UPDATE, GET, and DELETE, are supported for a variety of business objects, such as, Product, Customer, and Order.

The XML responses received back from the Shopify API can be saved to file or passed to another BPA Platform tool for further processing. The responses can include details of the object requested, any errors from the provider, or the values of any automatically generated ID fields. For example, you can use Shopify Integration to provide an indirect link between systems that do not typically synchronise data with each other, such as synchronising contacts from a CRM platform as Shopify customers, importing Shopify sales orders into an ERP, or even to provide reports containing data from both systems.

The Shopify Integration Tool Pack

The tool pack consists of:

  • Shopify Integration — The Integration tool must be installed on the BPA Platform server, and on any BPA Platform client machines. It is this that provides the translation between BPA Platform data and the Shopify object and operation.

Video Overview

White Paper - Shopify Integration Tool v1.0.14

White Paper - Shopify Integration Tool v1.0.14

The Shopify Integration tool allows communication between BPA Platform and Shopify. All communication uses XML. You use the tool to map BPA Platform data to Shopify objects and operations. Operations such as, ADD, UPDATE, GET, and DELETE, are supported for a variety of business objects, such as, Product, Customer and Order.

Download Brochure

Shopify Integration System Requirements

The Shopify Integration tool requires BPA Platform 4.6 (build 1944) or above.

Architecture

The diagram below provides a high-level system architecture overview of the Shopify Integration tool pack, with BPA Platform and the Shopify REST API:

Shopify Integration Tool v1.0.16
Figure 1 — High-level system architecture of the Shopify Integration

About the Shopify Integration Tool

Global Configuration

The global configuration for this tool is used to create connections to Shopify.

Shopify Integration Tool v1.0.16
Figure 2 — Shopify Integration – Global Configuration dialog

Click Add to create a connection to Shopify.

Use Extended Logging

Enabling this option exposes the XML parsed between Shopify Integration and the Shopify API. You can view the log from the BPA Platform Event Log (Manage > Event Log).

Without extended logging, the Event Log only contains start and end of transaction messages, plus any error messages encountered at runtime.

Shopify Connection Tab

You configure the connection to Shopify here.

Shopify Integration Tool v1.0.16
Figure 3 — Shopify Integration – Shopify Connection Tab

Configure a meaningful Connection Name for this connection; this is the name displayed when adding tasks for Shopify.

Within Domain Name, specify the domain name of the URL to Shopify. For example, if the Shopify webshop is running on https://www.we-sell-clothes.co.uk, the corresponding domain name is www.we-sell- clothes.co.uk.

Authentication Tab

You can configure the Shopify credentials here that allow access to Shopify.

Shopify Integration Tool v1.0.16
Figure 4 — Shopify Integration – Authentication Tab

Specify the API Key and Password created in Shopify.

Options Tab

Optionally, choose a Module to show only objects from that module on the mapping tab.

Shopify Integration Tool v1.0.16
Figure 5 — Shopify Integration – Options tab

Specifying the API Version to Use

Use the API version pane to specify the API version this instance of the Shopify Integration tool uses. Either specify the API version number or enable Use the latest tested API version to use the latest version the release of Shopify Integration tool was tested with (which may no longer be the latest).

Test Connection

Using the Test Connection button allows you to test the connection to the Shopify API.

Skip SSL Certificate Check

Communication to the Shopify API is over HTTPS, which typically involves an SSL certificate. If required, enable Skip SSL certificate check to ignore the SSL certificate — this is particularly useful if using a test environment (sandbox) on an internal server that doesn’t have a valid SSL certificate.

Update Objects and Operations

Enabling the Update objects and operations option, allows the Shopify Integration schema within BPA Platform to be refreshed.

Step Configuration

When creating new tasks, the Shopify Integration tool is located under Data Connectors of the Task Browser.

General Tab

Shopify Integration Tool v1.0.16
igure 6 — Shopify Integration – General tab

Provide a meaningful Name and Description for this step.

Choose your Data source. This can either be:

  • No data source — If you don’t make use of a dedicated XML input source, select this option to use BPA Platform variables in place of the XML objects’ fields. These can then be mapped to operational fields.
    For example, you can extract various bits of information from an email and store them in BPA Platform variables. Then, having mapped them to Shopify objects and operations, these can be stored in Shopify for later use.
  • Task step — The data source can be set to an available BPA Platform XML data source. Only those steps that are capable of natively exposing an XML document at runtime are listed. These may be another Shopify integration step, or a tool, such as Convert Recordset to XML.
  • Custom schema — An XML schema defines the structure of the parsed XML: what tags are present, and the nesting of the tags. You Define the schema of the XML that will be used as the input data source for this step. The industry standard XSD format is used by the Shopify Integration tool. Any XML processed by this step must conform to this schema else an error will be reported.
    If the XSD schema is available, either import it into the Custom Schema Configuration (use the Import XSD/XML File button) or copy and paste it into the configuration box.
    If the XSD schema is not available, you can import an example of the runtime XML (Import XSD/XML File) or copy and paste it into the configuration box. Use the Parse button to create the schema.
    • Input source variable — As well as defining the schema, you must specify the BPA Platform variable that contains the XML data at runtime.

Connection Tab

You specify the Shopify Connection this step must use.

Shopify Integration Tool v1.0.16
Figure 7 — Shopify Integration – Connection tab

All connections created in GLOBAL CONFIGURATION are presented here.

Alternatively, you can use a BPA Platform variable to create a dynamic connection, where the connection used is determined by runtime circumstances. At runtime, the contents of the variable must match the name of one of the GLOBAL CONFIGURATION connections — this is case-sensitive.

Mapping Tab

Here you define links between the incoming XML and the outgoing data that is sent to the Shopify API. This defines how, at runtime, the incoming XML is to be translated into the XML required for the relevant object and operation.

Shopify Integration Tool v1.0.16
Figure 8 — Shopify Integration – Mapping tab

The Object drop-down shows the available objects. The Operation drop-down shows the operations available for the selected Object.

You create the links by clicking and dragging an object field onto its corresponding operation field. Note that only linked fields are used in the output XML. BPA Platform formulas and variables can be included in the source data — drag them from the BPA Platform Browser to the object’s XML tree control. These can then be linked to operation fields. Note that BPA Platform recordsets must first be converted to XML using either the Convert Recordset to XML or Transform Data tool before they can be used here.

Each operation has an additional field, SupplementaryReference, which allows for traceability when transferring data from one place to another. When mapped, the data resides locally at runtime. It is added to the output and creates a record for reference purposes only — you can choose to map any field to SupplementaryReference to assist with checking where the data originated from or at what time the data transfer occurred, for example.

The Shopify Integration tool uses eXtensible Stylesheet Language Transformations (XSLT) to translate the received XML. The Advanced Translations (XSLT) tab shows the XSLT generated for the links created for the object and operation. Use Enable Free Type Mode to directly edit the XSLT — this is particularly useful when translating a nonstandard requirement.

Options Tab

The Options tab allows you to define how errors in this step are handled at task runtime.

Shopify Integration Tool v1.0.16
Figure 9 — Shopify Integration – Options tab

If an error occurs, you can decide whether the step should Continue processing, or terminate the step immediately (Abort Step).

If the step is aborted, you can choose to Continue processing onto the next step in the task or terminate the whole task immediately (Abort Task).

Allowing the task to continue allows you to use the error XML received back from Shopify Integration in a Save as File step for investigation purposes, for example.

All errors are recorded to the BPA Platform Event Log (Manage > Event Log).

Working with Other Tools

Shopify Integration can directly interact with the following tools:

Consuming XML from Other Tools

The Shopify Integration tool can consume XML outputted by the following tools:

Step IconNameStep Type
Import Flat File ToolImport Flat FileInput
Shopify Integration Tool v1.0.16Import XML DocumentInput
Convert XML to Recordset ToolConvert Recordset to XMLFormat
Shopify Integration Tool v1.0.16Transform DataFormat
Shopify Integration Tool v1.0.16Call TaskExecute
Shopify Integration Tool v1.0.16Web Service Connector ToolData Connectors
Shopify Integration Tool v1.0.16Shopify IntegrationData Connectors

Exposing XML to Other Tools

The XML outputted by the Shopify Integration tool can be used by the following tools:

Step IconNameStep Type
Convert XML to Recordset ToolConvert XML to RecordsetFormat
Run Microsoft Reporting Services ToolRun Microsoft Reporting ServicesFormat
Shopify Integration Tool v1.0.16Transform DataFormat
Shopify Integration Tool v1.0.16Save FileOutput
Shopify Integration Tool v1.0.16Call TaskExecute
Shopify Integration Tool v1.0.16Web Service Connector ToolData Connectors
Shopify Integration Tool v1.0.16Shopify IntegrationData Connectors

XML Output

The Shopify Integration tool outputs two documents:

  • OutputData
  • ErrorData

Shopify Integration Tool v1.0.16
Figure 10 – Shopify Integration tool outputs

Both outputs can be used:

  • Directly by subsequent tool steps which consume XML data inputs
    • If required, use the Convert XML to Recordset tool to convert the XML to a BPA Platform recordset
  • Accessed using the output or error objects for response data (XmlString), or the output or error schema (XmlSchema) present in the Task Browser

OutputData XML Document

The OutputData document contains:

  • Data returned from Shopify Integration, for instance the created, updated or retrieved entity instances
  • SupplementaryReference

ErrorData XML Document

The ErrorData document is structured as follows:

  • <Error> — All errors are created as an <Error> node, with the following sub-nodes:
    • <Object> — The name of the requested object, such as, Product
    • <CODE> — The error code returned by Shopify
    • <MESSAGE> — The corresponding error message
    • <EXTENDEDINFO> — A string containing additional information about the error
    • <INPUTDATA> — The input data mapped for the object, plus all data contained in the SupplementaryReference field

Supported Objects

At the time of writing, the following objects and operations are supported:

ModuleShopify ObjectStandard OperationsComment
  GetAddUpdateDeleteOther 
CustomersCustomer  
 Customer address  
 Customer metafield  
EventsEvent     
 Order event     
 Product event     
InventoryInventory item    
 Inventory level  Additional supported operations: Adjust, Connect, Set
 Location     
OrdersOrder 
 Fulfillment Additional supported operations: Complete, Open, Cancel
 Order metafield  
 Order risk  
 Refund  Additional supported operations: Calculate
 Order transaction     
PaymentsPayment balance     
 Payment dispute     
 Payment payout     
 Payment transaction     
ProductsCollect  
 Custom collection  
 Product  
 Product image  
 Product metafield  
 Product variant  
 Product variant metafield  
Store PropertiesShop     

Runtime

The incoming XML is translated into the XML format for the object and operation selected in the configuration. The data for the linked fields is brought across into the output XML — only those fields that were linked are brought across. The XML is passed to the connector tool, which then:

  • Processes the data
  • Performs the operation requested
  • Sends back an XML document containing the response

The XML can then be used by other BPA Platform steps.

Error Handling

Errors are written to the BPA Platform Event Log (Manage > Event Log). You define how errors are handled in the Options tab of the Shopify Integration tool

Reasons for the errors could include:

  • Web service connection errors
  • User privilege errors
  • Errors from the Shopify API
  • Warnings and messages from the Shopify API

Shopify Account Security

The Shopify API is the only method used to connect to Shopify and perform read / write tasks — all security present in the API is used.

White Paper - Shopify Integration Tool v1.0.14

White Paper - Shopify Integration Tool v1.0.14

The Shopify Integration tool allows communication between BPA Platform and Shopify. All communication uses XML. You use the tool to map BPA Platform data to Shopify objects and operations. Operations such as, ADD, UPDATE, GET, and DELETE, are supported for a variety of business objects, such as, Product, Customer and Order.