QnectBPM guides Download PDF

Add-on guides · for Sage CRM administrators, and the users who work with X3 accounts

Qnect BPM Sage X3 integration

Sync customers, suppliers, contacts, products and prices with Sage X3, post orders and see balances in Sage CRM.

On this page

The Sage X3 integration is a Qnect BPM add-on. It links Sage CRM and Sage X3 through X3's GraphQL web API, with a Qnect connection and a set of ready-made processes you can see, change and extend in the process designer.

It needs its own add-on key, and the Web service connections add-on.

What it does

DataDirectionHow
Customers and suppliersCRM → X3A Create X3 account button on the company makes an X3 customer (company Type Customer) or supplier (Type Supplier). A company can have several X3 accounts.
Customers and suppliersX3 → CRMEvery 15 minutes, customers and suppliers changed in X3 come to CRM. A linked account updates its link; an unlinked one is matched to the CRM company with exactly the same name, or a new company is created.
Addresses and contactsX3 → CRMA customer's addresses become CRM addresses (default: Business, bill-to: Billing, default ship-to: Shipping), and its contacts become CRM people on the company. All are marked From X3.
People and addressesCRM → X3People and addresses marked Sync to X3 become contacts and addresses of every X3 customer linked to the company. Ones that came from X3 always sync back.
Products and base pricesX3 → CRMEvery hour, changed X3 products become CRM products (product code = X3 product code) with their X3 sales unit and base price, in a pricing list called X3 base price.
Quotes and ordersCRMAn X3 account field on quotes and orders lists the company's linked X3 customer accounts.
OrdersCRM → X3A Post to X3 button on an order makes an X3 sales order. The order's X3 order and X3 status fields show the result.
Order statusX3 → CRMEvery hour, posted orders get their X3 order, delivery and invoice status back.
BalancesX3 → CRMEvery night, each linked customer's open balance, overdue amount and credit limit show on its X3 account.

Sales quotes stay in CRM, and X3 sales price lists don't come across: X3's web API doesn't offer them.

Using it in Sage CRM

Create an X3 account. On a company whose Type is Customer or Supplier, click Run process, then Create X3 account. The new account appears on the company's X3 accounts tab, with its X3 code, status, balance, overdue amount and credit limit.

Sync a person or an address. Tick Sync to X3 and save.

Post an order. Choose the order's X3 account, then Run process → Post to X3. It checks that the account is an active customer of the order's company, and that every product came from X3 with a sales unit. If X3 refuses the order, the run fails with X3's reason and the order stays unposted.

The processes

They show in the Process Library under Show → Sage X3 integration.

ProcessStartsDoes
Create X3 account for a companyButton on CompanyCreates the X3 customer or supplier and the link.
X3 customers and suppliers to CRMEvery 15 minutes; Run for a full syncPages through changed customers and suppliers.
X3 account to CRMStarted by another processLinks, matches or creates the company, then its addresses and contacts.
X3 address to CRM addressStarted by another processOne X3 address as a CRM address.
X3 contact to CRM personStarted by another processOne X3 contact as a CRM person.
X3 products to CRMEvery hour; Run for a full syncPages through changed products.
X3 product to CRM productStarted by another processProduct by code, else by name, else new; then its base price.
CRM person to X3 contactPerson added or changedSends the person to each linked X3 customer.
X3 contact on an accountStarted by another processAdds or updates the contact on one customer.
CRM address to X3 addressAddress added or changedSends the address to each linked X3 customer.
X3 address on an accountStarted by another processAdds or updates the address on one customer.
Post order to X3Button on OrdersCreates the X3 sales order.
X3 order status to CRMEvery hour at :15; Run to check nowUpdates the status of posted orders.
X3 balances to CRMEvery night at 02:30; Run to read nowReads each customer's open items.

Setting it up

1. In Sage X3

  1. Check the X3 version: the web API needs X3 2023 R2 or later.
  2. Create a Syracuse user for the integration, with an email ending @localhost.domain, only the roles it needs, and the folder's endpoint.
  3. On-premise: add "bearer" to session.auth in Syracuse's nodelocal.js and restart Syracuse.
  4. Administration → Administration → Settings → Authentication → Connected applications → New: a name, the Syracuse URL without a trailing slash, Tokens validity 600, Allowed user the user above. Save, and copy the Client ID and Secret.
  5. Note the folder's endpoint name, the sales site and order type orders should use, and the customer and supplier categories new accounts should get.

2. Install the add-on

  1. In Qnect BPM, Marketplace → Sage X3 integration → Install. Enter its key on the Licence tab if it hasn't arrived by itself.

  2. Click Download Sage CRM component on the tile. In Sage CRM, Component Manager, upload it, select QnectBPMX3 and Install Component (after the Qnect BPM component), with:

    OptionWhat to choose
    Add an X3 accounts tab to CompanyTick.
    For a Post to X3 button on orders: the order Summary tab's action number1463 on Sage CRM 2026 R1.
  3. Refresh metadata and restart the Sage CRM REST service (CRMTomcat9). Then choose I've installed it in Sage CRM on the tile.

The component adds the X3 accounts table, the X3 accounts tab, the Post to X3 button and these fields:

EntityFields
PersonSync to X3, From X3, X3 contact code
AddressSync to X3, From X3, X3 address code and business partner
ProductX3 sales unit
QuoteX3 account
OrderX3 account, X3 order, X3 status, last sync

Sage CRM can have both the Sage Intacct and the Sage X3 components; they don't overlap.

3. Finish in Sage CRM

  1. Place the X3 account on Quote Summary and Order Summary, and the X3 order and X3 status on Order Summary (with the Create script ReadOnly = true;), using Qnect BPM's Screens tab. Give the X3 account fields this Create script, so they list only the company's customer accounts (on the quote, use quot_opportunityid):

    var oppo = CRM.FindRecord("Opportunity", "oppo_opportunityid=" + (Values("orde_opportunityid") || CRM.GetContextInfo("opportunity", "oppo_opportunityid")));
    if (!oppo.eof && oppo.oppo_primarycompanyid)
      SearchSql = "sxac_q_companyid=" + oppo.oppo_primarycompanyid + " and sxac_q_type='customer'";
    
  2. Install the Qnect BPM component again with Run process buttons and these table-level scripts:

    Person: pers_firstname, pers_lastname, pers_salutation, pers_title, pers_q_synctox3
    Address|addr_addressid: addr_address1, addr_address2, addr_address3, addr_city, addr_state, addr_postcode, addr_country, addr_q_synctox3
    
  3. Make sure Qnect BPM uses its own CRM integration user that nobody else uses.

4. Connect and switch on

  1. Connections → Sage X3: the base URL (https://<syracuse>/xtrem), the x-xtrem-endpoint header set to the folder's endpoint, the Client ID, User name (the allowed user), Audience (the connected application's URL) and Client secret. Save, then Test sign-in.
  2. Set each process's Settings step (below), then publish the processes (the processes that are started by another process first).
  3. Run X3 customers and suppliers to CRM and X3 products to CRM once for a full sync.
The Sage X3 connection with a signed token sign-in
The Sage X3 connection signs in with a signed token (JWT).

Settings inside the processes

ProcessSettings (defaults)
Create X3 account for a companycustomer_category (COMM), supplier_category (SUP), currency (GBP), language (ENG), country (GB, when the CRM address has none), address_code (Q1)
Post order to X3sales_site (GB011), order_type (SON)
X3 product to CRM productuom_family (6000), unit_name (Default), currency_id (3)

The schedules are on each pull process's start: accounts every 15 minutes, products hourly, order status hourly at :15, balances nightly at 02:30.

Good to know

  • Only customers take contacts and addresses from CRM; suppliers don't yet.
  • Deletions aren't synced either way. An inactive X3 customer shows as Inactive, and Post to X3 refuses it.
  • Open items are read up to 1,000 per customer, and order status for up to 200 posted orders per run.
  • Two runs for the same new person at once can each create an X3 contact.