Integration – Sync Shopify Products with X3 via Boomi & SOAP Web Services

Prerequisites

  • A Shopify Developer account* (Obtainable from here)
  • A Boomi Integration account*(Obtain a Training account here)
  • A Sage X3 Classic SOAP Pool exposed to the Internet via HTTPS (Recommended) or HTTP

Set up Sage X3

  • We will use X3's SOAP webservices to Execute integration queries from Dell Boomi. Therefore, we need to note down the following request URL:

PROTOCOL://[SYRACUSESERVER]:[PORT]/soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC?wsdl

Where PROTOCOL is HTTPS or HTTP based on your Syracuse Host setup, SYRACUSESERVER is your Sage X3's Syracuse IP Address or Domain Name and PORT is your connection port, i.e. either 443 for HTTPS or 8124 for HTTP connections, depending on your chosen ports.

  • You will also need a Classic SOAP Pool defined for this purpose. Refer to this link to learn more about how to setup a pool Classic SOAP web services | (sageerpx3.com)
  • We will use AOWSIMPORT webservice to import the products from Shopify, so we will need to publish this webservice. 

Go to Development->Scrips->Webservices and look for "AOWSIMPORT". Click "Publication" to publish this webservice.

  • The main benefit of the AOWSIMPORT is that you can use it to import pretty much any object in X3 using the familiar import templates, so we can define which fields are populated from the external system, i.e., Shopify in this instance. As we will be importing Products, we will therefore need to either use X3's built in ITM import template or use a custom variant of it based on which fields we'd like to populate, including any custom fields. In this tutorial, we will use a simple variant of this template which only populates the product category, product ID and description

Set up Shopify

  • Log into Shopify Developer (Also known as Shopify Partners)
    If you do not have a Development Store, Open one here

  • Choose any available store name and URL, a strong admin password you can remember and any other required contact information.
  • Choose “Test an app or theme” as the Store Purpose

  • Once your store is created and ready, click on Settings:

  • Go to “Apps and Sales Channels” and click “Develop apps for your store”. You may then be asked to “Allow Custom App development”.

  • Click “Create an App” and give the App a name, e.g., IntacctApp

  • We should now choose which objects to be synced between Intacct and Shopify. Click “Configure Admin API Scopes”

  • In this tutorial, we are going to sync Shopify products into Sage X3, so we choose “read_products” as our only scope. A full-scale integration will have many more objects selected. Click “Save” when you are done.

  • Click on “API Credentials” tab and click “Install App”

  • Reveal the API access token, the API key and API secret key and store them in a safe location

Set up Boomi

  • Log into Boomi Platform via platform.boomi.com
    Define a Production Environment as well as a Test Environment
    Go to Services -> Integration

  • Define a Production Environment as well as a Test Environment
    Go to Manage -> Atom Management

  • Define a Production Environment as well as a Test Environment
    • Click New -> Environment
    • Type “Production” for the name and Classification

  • Click New -> Environment
  • Type “Test” for the name and Classification

  • Define a Production Atom
    • Click New -> Atom
    • Choose “in the cloud” as Setup Preference
    • Choose “ANZ Atom Cloud” – This may be different based on your location
    • Type “Production” as atom Name

  • Define a Test Atom
    • Click New -> Atom
    • Choose “in the cloud” as Setup Preference
    • Choose “ANZ integration test Cloud” – This may be different based on your location
    • Type “Test” as atom Name
  • Attach each Atom to their respective Environment

Build the Integration Process

  • Create a new Integration Process and choose Shopify Connector as your Start Shape.
  • Click the green + button near the Connection field to create a connection to Shopify

  • Configure the Connector to reflect the following:
    • Store base URL: Your store’s full address on shopify, including the https:// prefix
    • Authentication type: Oauth 2.0 or Access Token. We will use the Access Token today. Click the Access Token and paste the access token obtained earlier

  • Configure the Operations to reflect the following:
    • Press the Import button to import the product’s XML profile from Shopify
    • Choose Test Atom cloud

    • Filter the objects by “Product”
    • Select the found object, Product and press Next followed by Finish
    • Save and Close the Operation function

    • Press OK on the Connector screen

  • On the left panel, also known as Shape Explorer, search for “SOAP” to find Boomi’s Web Services SOAP Client. We will use this client to connect to Sage X3 and execute our import call. Drag and rop this connector to the Canvas.

  • Give this connector a favorable display name and choose "Execute" as your Action. We will establish a Connection to the X3 SOAP endpoint and create a RUN operation to call the AOWSIMPORT subprogram.

  • Add a new Connection and Configure the Connection to reflect the following
    • WSDL URL: The Webservice Request URL of Sage X3 which we noted earlier
    • Security type: Basic
    • Username: our Sage X3 username wtih sufficient permissions to create the needed object, i.e. Products in this instance
    • Password: The password of the Sage X3 user

  • Save and Close the Connection window and click the green Plus button next to the Operation field to create a new Operation.
    • Press the Import button to initiate the connection to Sage X3 and import the WSDL Request and Response profiles
    • Choose the Test Atom as the execution platform and type "run" in the Filter field and press Next
    • Clcik Next in the follwoing window which has "run" as the only selectable value, thanks to the filter we chose earlier
    • Click Finish

All good! We have come a long way! We did configure both ends of the integartin. All we need now is mapping Shopify fields to X3 fields via a Map shape and our code-less integration process will be rady to roll! 

  • Add a Map shape to the canvas by dragging and dropping it in an empty area
  • Sage X3 requires the following fields to create a product, so we will stick to the absolute minimum in this turorial. You can integrate more fields in a production enviornment:
    • TCLCOD (Product Category), ITMREF (Product ID, in order to make sure shopify and x3 products share the same ID, make sure the Product Category does not have a sequence number structure linked to it), and ITMDES (Item Descripion). We will count on the product to inherit the rest of the fields such as the stock unit and accounting code from the Product Category.
    • One the map is added to the canvas, clock the green Plus button to define a new Map. You will then need to select Shopify's JSON response profile as source and X3's XML request profile as destination
    • LEt's make an assumption that all Shopify products are going to have "ECOMM" as their product category, so our import file to import a product in Sage X3 would look like this:
    • Now, we need to construct the SOAP query to be sent to X3. Eventually, this would look like this:
    • If you look closer, you can see all these XML elements in X3's side of the integration Map:
    • So all we need to do is construct the values in these parameters either by using fixed, constant strings or by using what Shopify can provide. For instance, the "codeLang" element will be always "ENG", so we will feed it with a constant using the Functions panel in the middle panel:
    •  
    • We will now drag the result of this function to the "codeLang" element on the X3 side.
    • We will do the same operation for the rest of the constat elements. They are the poolAliasrequestConfigpublicName elements
    • Great! Now we need to construct the inputXml element which has its first few segments as constant values and its "I_FILE" segment made of values fetched from Shopify. How about we see it this way?
    • Thsi can be achieved using a User Defined Function. This function accepts the product ID and title from Shopify as input values, construcsts the first, second and third part of the inputXML element via constant strings and concatenated strings and finally concatenates all these into a single string which will be mapped to the inputXml element on X3 side.
    • Add two variables, with any name, as Input
    • No need to choose default values. Press OK on the Defaults screen. Now drag and drop the relevant input fields to the input variables
    • Now we need concatenate these strings to construct the entire inputXml value:
    • Now, drag and drop the results of the three string functions we defined earlier to the relevant input variables of this function and drag and drop its result field to the output element on the right side
    • Save annd close the function.
    • Now map the shopify product ID and title fields to the inputs of your new function and the result field to the inputXml field on X3's side
    • Great! Save and Close all the windows and map the Shopfy connector to the Map shap and the Map shape to the X3's SOAP connector via Drag&Drop:
    • End the process by adding a Stop shape after X3's conector
    • Now let's add a product to Shopify and run our integration process:
    • Great! Our process succeeded. 
    • Let's check X3 now:
    • it's here. Note that the Product ID was automatically generated and fed into X3 by Shopify. This is a recomennded practice. AOWSIMPORT webservices is capable of creating and updating records witht the same query, so if the item exists in X3, it will get updated and no new product will be created.
  • Next step would be to package and deploy the process to Boomi Production Atom in the cloud and schedule it to run as per your needs. There are many improvements you can make to this process such as checking update dates and times between both systems and only proceed to integrate if they are different so you can reduce a lot of your integration workload.
  • As you saw, we did an integration between Shopify and Sage X3 completely Code-free thanks to Boomi.