Overview
This guide walks you through the initial setup needed to use the GraphQL methodology for syncing data using the Tinx connector. After this initial setup, which is required for all integrations, some examples of configuration are shown, such as order import and product synchronization.
Shopify's GraphQL API allows the Tinx Connector to retrieve complex data structures more efficiently than traditional REST calls. This means faster synchronization between your Shopify store and Business Central, with less network overhead.
The instructions below will guide you through setting up GraphQL integration in your Tinx Connector for optimal performance.
Prerequisites:
- Latest version of the Tinx app from AppSource
- Admin access (SUPER rights) to create integrations and sales channels
- 'TINX E-Com Admin' role selected for your BC user account
General GraphQL Setup
Here are the steps you need to take to initialize GraphQL for your Shopify connector:
- Navigate to Setup > Feature Management. Enable GraphQL.
- Navigate to Integration -> Sales Channel > New > Webshop Connectors. Then select the SHOPIFY line and click on New > Create Sales Channel.
- Next, go back to the main screen and go to Integration > Integrations and click on New.
- Ensure the GraphQL Endpoint ends with
/admin/api/2025-XX/graphql.json. In this case, the XX depends on the version of the API you install in the next step. Please make sure that the version matches. In this case it will be2025-01.In the same screen, create a new Authentication code. Add Username and Password with Basic authentication. - In the same screen in the ribbon, go to Integration > Integration > API > Install API Version. Select the most recent version, which is 2025-01 in this example and then select Yes. Once you are done, take a look at the queries to make sure everything is set up correctly. You can do this by going to Integration > GraphQL > GraphQL Queries in the ribbon.
- Now you can fill in the Sales Channel details. You will enter the same authentication details that you created in the Authentication code. In the Sales Channel page, enter the same details as before (user and password and endpoint
/admin/api/2025-01/graphql.json. - Add the GraphQL Endpoint. You can copy this from step 2.
- Ensure the codeunits for the in and outbound on the card page are filled in. Last section on the page > Processing request and response. Select the code unit in the dropdown. There should only be one.
Now we are done with the Basic setup!
Examples: Order Download and Product Export
Step 1: Create Dashboard
- Create a new Dashboard to contain messages
- Example names:
GRAPH_PROD_OUTorORDER_IN
- Example names:
- Dashboard Configuration:
- Integration Code: Shopify
- API Type: GraphQL
- Direction: Inbound
- Populate all required details (reference other environments for examples)
Step 2: Create Your First Message
- In the Dashboard, create a new message starting with
GQL-### - Message Configuration:
- GraphQL Query Type:
- Mutation: For Post, Put, Patch operations
- Query: For GET operations
- For Items: GraphQL Query name must be "Productset"
- GraphQL Query Type:
Step 3: Configure Table Mappings
Table Setup
- Go to the Dashboard for your message
- Add tables for data processing:
- Step 1: Enter table number
- Click Element Name field to access GraphQL selection menu
- For Orders: Select "Orders.Nodes"
- For Products: Select "Input".
Field Mapping
- Step 2: Map fields in Definition section
- Select appropriate field (Entity ID for orders, Tinx ID for products)
- Click Webshop field v2 column to see available options
- Example: Select "Name" for Order ID
- For Products: This will show Input options (verify selection)
- Field Configuration:
- Go to Message line field → Field → Setup
- ✅ Check GID checkbox (for identifiers like ID only)
Step 4: Add Additional Mappings (optional)
Repeat Step 7 process to add more table and field mappings as needed.
Step 5: Configure Request Parameters for Orders (Inbound Messages only)
Basic Parameter Setup
- Navigate to message line and select Request Parameters
- Click the dash in GraphQL Argument column
- Select required arguments from the window
Configure Specific Parameters
- "after" parameter:
- Argument Type: Text
- Click "after" to add to GraphQL Argument list
- "first" parameter:
- Argument Type: Integer
- Error Correction: Use Setup in ribbon to change argument types if needed
Advanced Configuration: Line Items
To download Line Items within Orders (going deeper into Orders parent):
- Click the dots (⋯) on the right side in GraphQL Argument Selector
- On "first" line:
- Select type: Integer
- Click "first" to add to list
Complete Orders Configuration
Set up the following parameters for order processing:
- after: Text
- first: Integer
- orders:
- reverse: Boolean
💡 Pro Tip for Existing Environments:
- Set reverse = True to download from latest orders
- Example: If ID 6750 is latest, system downloads IDs 6701-6750
- After initial download, edit the second line with ID 6750
- System will auto-update ID after each order download
Need help? Contact our support team with your specific integration requirements.
Related to