Step 2 - Select a Source Function

What is a Source Function?

The Source Function decides what data should be pulled from the Source system and when.

Configure your Source

Through the Control Panel you can easily access the page "Sources" in the left side column. This is the page where you will find, edit and create your Sources.

If you want to configure a Source from an already existing System, you can do so by navigating to the "Create Source" button. This is how you should read and populate the Create Source page:

  • Title - Give the Source function a title that is relative to the source, for example: "Shopify GET Orders" or "GBP Store Orders"

For this example, name it "Shopify GET Orders Test"

  • System - This is a dropdown list of the Systems available in the HighCohesion system. You can see the full list of available systems here. When you select a System from the list, the page will automatically load the available functions in the Source Function box below.

For this example, select Shopify

  • Function - This is a dropdown list of the already available functions in the System you selected in step 2, in this case Shopify.. Please select from this list the functions that you would like to use to consume the data in for the Source configuration.

For this example, select GetOrders

  • Key - This is a dropdown list of the keys you have added to HighCohesion. Please select the key for the Source system as enabled in Step 1

  • Trigger - The Trigger defines the logic for when the Source function should be triggered. You can choose from three pre-defined options:

    • Manual (e.g. the Source is triggered manually from the Control Panel). This option is well suited if the Stream is rarely used, for example Quarterly product imports or similar.

    • Scheduled (e.g. the Source is triggered by a scheduled Cron Job). This option is well suited for Inventory and Shipment updates.

    • Webhook (e.g. the Source is triggered in real time by a Source System defined event). This option is well suited for Systems that handles web event well, for example Shopify or other commerce solutions.

For this example, choose scheduled and configure the cron job to run every second hour , 0 */2 * * *

  • Settings - The settings give you as a user flexibility to add additional configuration to the Source function if you have selected the triggers "Manual" or "Scheduled". All of the settings added to Source configurations should be entered in TOML format, this makes the settings easy to read, edit and update. For a guide on TOML format please see the link: https://github.com/toml-lang/toml.

When pulling data from our Source system using the triggers "Manual" or "Scheduled" we want to ensure we are only pulling the data we are interested in. For this use case we are pulling Orders from Shopify to a 3rd party logistics company's FTP location. The function used to pull the data is "Shopify:GetOrders". If we would use the function without settings we would pull all Orders stored in Shopify to the FTP, which is not what we are looking to do. Instead we should consider what filters we should apply to ensure that the 3rd party logistics company only get the information they need, in this case newly placed orders created less than 2 hours ago that are paid or partially paid and unfulfilled. For this example, use the the settings below:

filter_created_at_min = "CURRENT-2 hour"
filter_created_at_max = "CURRENT"
filter_financial_status = "paid, partially_refunded"
filter_fulfillment_status = "unfulfilled"
filter_status = "open"

Last updated