```markdown
![](RackMultipart20211110-4-12tvpab_html_7cfcc0e883f91cf.png) ![Shape1](RackMultipart20211110-4-12tvpab_html_f8aaa488af7ece8.gif)

# **Epicor Eagle Integration Documentation**

# Table of Contents

[Epicor Eagle documentation 3](#_Toc87365862)

[Additional Documentation 3](#_Toc87365863)

[Authentication 3](#_Toc87365864)

[Epicor Eagle 3](#_Toc87365865)

[Connect 3](#_Toc87365866)

[Jobs 3](#_Toc87365867)

[Products 3](#_Toc87365868)

[Getting All Items in Connect 3](#_Toc87365869)

[Querying for a specific Item in Connect 3](#_Toc87365870)

[Categories 4](#_Toc87365871)

[Examples of different Category Tables 4](#_Toc87365872)

[SQL Statement for Finding Categories 4](#_Toc87365873)

[Price Rules and Inventory 6](#_Toc87365874)

[Customer 6](#_Toc87365875)

[Tax Codes 8](#_Toc87365876)

[Sales Orders 8](#_Toc87365877)

[Getting Sales Orders into Epicor eagle 9](#_Toc87365878)

# Epicor Eagle documentation

## Additional Documentation

-

## Authentication

1. Authentication with a data base: Client will provide Database details
  1. One Possible Technical issue
    1. If using MYSQL (Might be olde Version) Double check versioning as you will need to get appropriate workbench versioning to connect
2. You call the database directly

## Epicor Eagle

1. Epicor Eagle is Inventory and POS management
  1. You will most likely being pulling data from Epicor Eagle
2. The only thing we are sending back is sales orders

## Connect

1. There is no service or integration service layer for Epicor Eagle
2. You can do your database calls directly from the Job

# Jobs

## Products

### Getting All Items in Connect

| var allItemNumbers = await Eagle.Items
.Where(i =\&gt; i.UpdatedDate \&gt; lastRunDate &amp;&amp; (i.Store == &quot;1&quot; || i.Store == &quot;2&quot;))
.Select(i =\&gt; i.ItemNumber)
.ToListAsyncWithRetries(); |
| --- |

### Querying for a specific Item in Connect

| var items = await Eagle.Items
.Where(i =\&gt; itemNumbers.Contains(i.ItemNumber))
.Select(i =\&gt; new EagleItem()
{
ItemNumber = i.ItemNumber,
ItemDescription = i.ItemDescription,
ItemShortDesc = i.ItemShortDesc,
MfgPartNumber = i.MfgPartNumber,
Manufacturer = i.Manufacturer,
CodeTaxStatus = i.CodeTaxStatus,
Discontinued = i.Discontinued,
Department = i.Department,
Fineline = i.Fineline,
Class = i.Class,
RetailPrice = i.RetailPrice,
Price1 = i.Price1,
Price2 = i.Price2,
Price3 = i.Price3,
Price4 = i.Price4,
Price5 = i.Price5,
Store = i.Store,
QuantityOnHand = i.QuantityOnHand,
})
.ToListAsyncWithRetries(); |
| --- |

## Categories

1. When importing the products, you must assign them a category
2. The category names are one of the only things not in the inventory table

1. When you&#39;re building the custom key for each category you will have to do the entire tree for each name
  1. Example

| Standard:
Product: Broom
D: 05 Paint/Sundries
C: 500 Brooms/Brushes
F: 005001 BroomsNon-Standard 1:
Product: Snow Shovel
D: 08 Lawn &amp; Garden
C: 814 Seasonal
F: 005001 BroomsNon-Standard 2:
Product: Fire Extinguisher
D: 08 Lawn &amp; Garden
C: 210 Personal Safety
F: 008601 Household Safety |
| --- |

### Examples of different Category Tables

| Category tables:DE - DepartmentCL - ClassFI - Fineline |
| --- |

### SQL Statement for Finding Categories

| select distinct
in\_item\_number,
in\_item\_description,fi\_fineline\_code, fi\_fineline\_name,
cl\_class, cl\_class\_name,
de\_department, de\_dept\_namefrom EAGLEDW.IN, FI, CL, DE
where in\_fineline = fi\_fineline\_code
and in\_class = cl\_class
and in\_department = de\_department |
| --- |

![](RackMultipart20211110-4-12tvpab_html_4a74aeaaf0e6eb2.jpg)

1. Occasionally you will have a class that goes in a department you don&#39;t expect

| var unwantedDepartments = new string[] { &quot;a1&quot;, &quot;OR&quot;, &quot;GC&quot;, &quot;Q&quot; };
var eagleDepartments = await Eagle.Departments
.Where(d =\&gt; !unwantedDepartments.Contains(d.DepartmentNumber))
.Distinct()
.ToListAsyncWithRetries();
var eagleClasses = await Eagle.Classes
.Where(c =\&gt; c.ClassName != &quot;Z MISCELLLANEOUS - NO SKU&quot;)
.Distinct()
.ToListAsyncWithRetries();
var eagleFinelines = await Eagle.Finelines
.Distinct()
.ToListAsyncWithRetries(); |
| --- |

## Price Rules and Inventory

1. Price 1-5
  1. These are special prices for different types of customers (price Rules
  2. Indicate which user role

| select
 in\_item\_number,
 in\_item\_description,
 in\_retail\_price,
 in\_price\_1,
 in\_price\_2,
 in\_price\_3,
 in\_price\_4,
 in\_price\_5
from EAGLEDW.IN |
| --- |

### SQL Query for Inventory Locations

| select
in\_item\_number,
in\_item\_description,
in\_store,
in\_quantity\_on\_hand
from EAGLEDW.IN
order by in\_item\_number |
| --- |

## Customer

1. Customers may have different accounts at different stores
  1. They will have different customer numbers for each different store
  2. Only way to link them is by the sort name
    1. (If everyone else is using Epicor the same way) Client Specific

![](RackMultipart20211110-4-12tvpab_html_5d788ec87e6256e8.jpg)

1. There may be 2 types of Customer accounts
  1. Customers that are going to be in Epicor database will be professionals they may have several different jobs
2. Helps Customers with their internal accounting
  1. Example: Construction Company has job accounts for each home they are building

| cr\_standard\_selling\_price = price rule |
| --- |
| 1-5, R, A, C |
| A = Average cost, not used |
| R = in\_retail\_price |
| C = in\_cost\_in\_price\_units |
| cr\_standard\_selling\_price
cr\_customer,
cr\_job\_number,
cr\_sort\_name\_type,
cr\_sort\_name,
cr\_name,
cr\_street\_1,
cr\_street\_2
cr\_city,
cr\_state,
cr\_country,
cr\_contact,
cr\_area\_code,
cr\_phone,
cr\_tax\_code,
cr\_store
from CR
where cr\_sort\_name\_type = &#39;C&#39;
order by cr\_sort\_name |

3. Emails are not in the same table

| cx\_email\_address,
cx\_customer,
cr\_customer,
cr\_sort\_name
from CX
left join CR on cr\_customer = cx\_customer
where
cx\_email\_address != &#39;&#39; and
cx\_job\_number = 0
order by
cx\_customer |
| --- |

1. Querying for all Customers in Connect

| var eagleCustomers = (await Eagle.Accounts
 .Where(a =\&gt; a.LastActivityDate \&gt;= lastRunDate)
 .Where(a =\&gt; EF.Functions.Like(a.SortName, &quot;1%&quot;) || EF.Functions.Like(a.SortNameType, &quot;2%&quot;))
 .Where(a =\&gt; a.SortNameType == &quot;C&quot;)
 .Take(100)
 .Select(a =\&gt; new EagleCustomer()
 {
 CustomerNumber = a.CustomerNumber,
 JobNumber = a.JobNumber,
 Store = a.Store,
 SortName = a.SortName,
 Name = a.Name,
 Street1 = a.Street1,
 Street2 = a.Street2,
 City = a.City,
 State = a.State,
 Phone = a.Phone,
 Zip = a.Zip,
 })
 .ToListAsyncWithRetries())
 .GroupBy(a =\&gt; a.SortName[1..]); |
| --- |

## Tax Codes

1. Some clients may require you to sync in the tax codes
2. You can access them in the tc Table

![](RackMultipart20211110-4-12tvpab_html_3d69f45677a44d63.png)

| select tc\_tax\_code, tc\_tax\_location, tc\_percent from TC |
| --- |

## Sales Orders

1. No separations between sales order headers and Sales Order lines
2. If a customer wants historical order information you would need to import the data from another table

| select \*
from
dw\_sls\_item\_dtl
order by
dwsi\_transaction\_date desc,
dwsi\_transaction |
| --- |

3. Orders with Items

| select
dwsi\_transaction,
dwsi\_reference\_no,
dwsi\_customer,
dwsi\_item,
dwsi\_d\_p\_percent\_amt,
dwsi\_qty\_selling\_units,
dwsi\_qty\_pricing\_units,
dwsi\_qty\_stocking\_units,
dwsi\_decimal\_placement
from
dw\_sls\_item\_dtl
order by
dwsi\_transaction\_date desc,
dwsi\_transaction |
| --- |
| retail price = in\_retail\_price \* (10 ^ -(in\_pricing\_dec\_place)) \* in\_price\_stk\_factor |

4. In the inventory table, if you see a value for anything pricing in inventory decimal place or price stock factor, make the client do the math
  1. for prices: if in\_pricing\_dec\_place = 0 and in\_price\_stk\_factor = 1 then the price listed is the actual price per product
  2. if in\_price\_stk\_factor isn&#39;t 1, or price\_dec\_place isn&#39;t 0, math is involved
  3. refer to the formula or ask the client for help.

### Getting Sales Orders into Epicor eagle

1. Connect generates the text file for each sales order. It is ftp&#39;d to a location that Epicor Eagle can read. Epicor Eagle reads in the file.
2. We don&#39;t send the text file directly into Epicor. Once the sales order is exported into the correct folder, it&#39;s up to the client to import it into Epicor Eagle

###

![](RackMultipart20211110-4-12tvpab_html_e88609ec417d0bb8.jpg)©Clarity Ventures, Inc. Confidential- Page | 3
```