# How to Create a BAQ in Epicor Kinetic

> Source: https://netray.co/erp-help/how-to-create-a-baq-in-epicor-kinetic
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

A BAQ (Business Activity Query) is a saved query in Epicor Kinetic that you build in the Query Builder without writing SQL. Choose the tables, define joins, select display fields, add criteria and calculated fields, test the result, then use the BAQ in dashboards, reports, BPMs or the REST API.

## Kind

how-to

## System

epicor

## Erp

Epicor Kinetic

## Module

Business Activity Queries (BAQ)

## Query

how to create a baq in epicor kinetic

## Alternate Queries

- epicor kinetic query builder
- epicor baq tutorial
- build a business activity query epicor

## Applies To

Epicor Kinetic (and recent Epicor ERP 10 releases). Menu paths and tab names vary slightly by version, search the menu for Query Builder or BAQ.

## Steps

### Build your first BAQ

**Items:**

- Open the Query Builder (use the menu search for Query Builder or Business Activity Query) and click New.
- Give the query an ID and description, choose its scope (company or system) and whether it is shared.
- On the Phrase Build or table area, add the tables you need, starting with the main table such as JobHead or OrderHed.
- Add related tables and set the joins, being careful to use inner joins only when a match is required and left outer joins otherwise.
- On the Display Fields area, select the fields to show, set column labels and ordering.
- Add criteria on table fields (for example open jobs only) and consider parameters if the user should be asked.
- Add calculated fields where needed, for example a margin or an age expression.
- Analyze and test the query, fix errors, then save and generate it.
- Use it in a dashboard, a BAQ Report, a BPM, a function or the REST API.

## Sections

### Design choices that matter

**Body:**

Start from the table at the grain you want in each row. If you want one row per job operation, start from JobOper, not JobHead. Joining upward to headers is cheap, joining downward multiplies rows and can inflate totals.

Filter as early as possible with table criteria rather than relying on a dashboard grid filter. A BAQ that pulls every historical row and filters on screen will be slow and put load on the database. Our page on slow BAQs goes through this.

### Calculated fields and parameters

**Body:**

Calculated fields use an expression language that is close to SQL, built from fields in the query. Keep them simple and avoid heavy logic that belongs in a function. For user prompts, define a criteria value as a parameter in the query so dashboards and reports can ask for it.

Test with realistic parameters. A BAQ that works with one job can behave differently over a year of data.

### Publishing and security

**Body:**

A BAQ is available to users who have access through its security settings, and a menu or dashboard may be needed to expose it. Treat BAQs that expose cost or pricing data like any other sensitive screen, and check company scope in multi-company installations.

Where you need the same data programmatically, the BAQ can be called through the REST API or from a function, which is covered in our Epicor function pages.

## Pitfalls

- Starting from the wrong table and getting duplicated rows or inflated totals.
- Using inner joins where optional data exists, silently dropping rows.
- Skipping criteria and pulling years of history into a dashboard.
- Forgetting to regenerate the BAQ after changes, so users see the old definition.

## Ai Angle

A grounded assistant can draft the table and join choices for a BAQ from a plain-language request, and explain an existing BAQ to a new analyst. Netray's ERPray can also answer many ad hoc questions without anyone building a BAQ, read-only against your Epicor data, including on-prem.

## Faq

### What is a BAQ in Epicor?

**Answer:** A Business Activity Query is a saved query built in the Query Builder. It selects data from Epicor tables and can be used in dashboards, reports, BPMs, functions and the REST API.

### Do I need SQL to create a BAQ?

**Answer:** No. The Query Builder is visual. Knowing the table structure and basic join logic helps, and SQL-like expressions are used in calculated fields.

### Can a BAQ update data?

**Answer:** Updatable BAQs exist and can write to certain tables, but they bypass some business logic, so use them sparingly and with care.

### Why is my BAQ slow?

**Answer:** Usually missing criteria, joins that multiply rows, or heavy calculated fields. Narrow the data early and test with production-sized data.

## Search terms

how to create a baq in epicor kinetic, epicor baq tutorial, epicor query builder, business activity query epicor, epicor baq joins, epicor kinetic baq calculated field, epicor baq criteria parameter, epicor dashboard baq

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
