# BAQ Export Process: where do I create/define a process?

**URL:** <https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315>\
**Category:** Epicor ERP 10\
**Created:** [September 12, 2017, 7:38pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315 "2017-09-12T19:38:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 7:38pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/1 "2017-09-12T19:38:11Z")

</div>

I’m curious what I need to do to create a process in Epicor an attach it to the BAQ Export Process. Does anyone have a short version that I can follow?

---

<div class="post-metadata">

**Author:** ![danbedwards](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@danbedwards](https://www.epiusers.help/u/danbedwards)\
**Post date:** [September 12, 2017, 8:05pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/2 "2017-09-12T20:05:20Z")

</div>

I assume you are talking about using Process Sets w/ the BAQ Export Process?

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 8:14pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/3 "2017-09-12T20:14:05Z")

</div>

Yes, I actually figured it out. I’ll document so others can see:  
First, set up a new Process Set:

 ![image](https://epiusers.help/uploads/default/original/2X/3/350593c7263e830939fb2611800a5105544d9b55.png)  
Second, create a new schedule on System Agent:  
 ![image](https://epiusers.help/uploads/default/original/2X/0/0d3edfc6d5c0ef91d95721456268375b98487edd.png)  
There are many schedule configurations but I did this at one minute just to verify it works.

Third, go to BAQ Export process and attach it to that schedule  
 ![image](https://epiusers.help/uploads/default/original/2X/2/2630eea0646081341cbc38248ae1fd9c169a8668.png)  
Output labels creates header labels.  
If you save this to a process set (second tool icon), you can attach to your schedule  
 ![image](https://epiusers.help/uploads/default/original/2X/1/121f3ad7b71ff9272ce27afeb9efe7ec0c05c783.png)

If you go back to your Process Set, you can see there is an attached task on it now.

 ![image](https://epiusers.help/uploads/default/original/2X/2/2a4399202e023cfd9cf3a31d491e855bd1cd6057.png)

Fourth, go to Schedule Process Set and hit submit to schedule this bad boy

 ![image](https://epiusers.help/uploads/default/original/2X/8/85604526d1c926d82bc4e8bb32ea0ee360116331.png)

You can verify it go scheduled by going back to the system agent and seeing the task there now.

 ![image](https://epiusers.help/uploads/default/original/2X/0/045e3f92131838df3d733804fb59a3df821c67b8.jpg)

The query results, at least with our configuration are located on the application sever under \servername\EpicorData\Companies\ {currentCompany}\Processes\ {userWhoSubmitted}

 ![image](https://epiusers.help/uploads/default/original/2X/0/07f4615a1b1f84560c20313c41152c733cb645aa.png)

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 8:14pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/4 "2017-09-12T20:14:51Z")

</div>

Do you know how to define a different output folder location for the results?

---

<div class="post-metadata">

**Author:** ![tkoch](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tkoch](https://www.epiusers.help/u/tkoch)\
**Post date:** [September 12, 2017, 8:48pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/5 "2017-09-12T20:48:07Z")

</div>

You define it in the Output Filename.

![image](https://epiusers.help/uploads/default/original/2X/d/d2d1b8d74d77ce3a18a397e512c8720c478f644a.png)

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 8:50pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/6 "2017-09-12T20:50:24Z")

</div>

Can you elaborate on that? I defined it with a file name “Company.csv” but it places the actual file in a directory that is inconvenient. I’m trying to figure out how to configure which directory it goes to.

---

<div class="post-metadata">

**Author:** ![tkoch](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tkoch](https://www.epiusers.help/u/tkoch)\
**Post date:** [September 12, 2017, 8:52pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/7 "2017-09-12T20:52:59Z")

</div>

Put the path you want the export to go to with the filename.

\\server\share\share\file.txt

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 8:53pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/8 "2017-09-12T20:53:29Z")

</div>

Awesome, thank you!

---

<div class="post-metadata">

**Author:** ![tkoch](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tkoch](https://www.epiusers.help/u/tkoch)\
**Post date:** [September 12, 2017, 8:54pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/9 "2017-09-12T20:54:20Z")

</div>

You cannot use hidden shares however, it gets upset.

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 12, 2017, 8:54pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/10 "2017-09-12T20:54:59Z")

</div>

Good to know!

---

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [September 13, 2017, 5:13pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/11 "2017-09-13T17:13:20Z")

</div>

Why would you need a Process Set to just export one query. Or is this just an example with 1 query. I havent done this in E10 yet, but is there a reason. I do this on E9 quite a bit. Then I use powershell to grab the file and email or ftp or manipulate the data.

You can create the schedule in System Agent and define the interval.  
Go to BAQ Export Process and set the parameters and set Schedule to the schedule you created.  
Submit and it will be in the task agent.

I usually do this in the Manager account, so all my scheduled tasks are tied to Manager.

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [September 13, 2017, 5:17pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/12 "2017-09-13T17:17:13Z")

</div>

This is an example with one query, however I was asked to investigate how this process could be used to export 1 or more queries on a schedule.

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [October 12, 2017, 7:51pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/13 "2017-10-12T19:51:09Z")

</div>

Hey Miguel,  
I have a use case for potential automating the emailing of that file after it’s exported. Would you be able to share with me the steps and code necessary to utilize Powershell to send that data?

---

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [October 12, 2017, 8:04pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/14 "2017-10-12T20:04:24Z")

</div>

I run the BAQ Export Process and export to a directory on the server

In this case, I have two exports and I am merging the files into one. The file is them emailed to the webites and it is also uploaded via FTP.

$Path = “\SERVER\Downloads\01027501.csv” #this is my merge file  
$dir = “\SERVER\Downloads\WebInv\*.csv” # this is where I export my queries  
#Set Username:Password@domain/Path  
$ftp = “ftp://login:password@54.83.30.101/01027501.csv”

#Merge the files into 1  
get-childItem $dir | foreach {[System.IO.File]::AppendAllText($Path, [System.IO.File]::ReadAllText($\_.FullName))}

#check if file is empty  
Get-ChildItem $Path | ForEach {

```
$check = Import-Csv $_

If ($check) { 

```

$EMailBody = $Data | out-string  
$smtp = “XX.XX.XX.XX”  
$to = “USers [user1@ccicms.com](mailto:user1@ccicms.com)”, “[datamaster@netcomponents.com](mailto:datamaster@netcomponents.com)”, “[inv@sourceesb.com](mailto:inv@sourceesb.com)”, “[datamaster@mectronic.com](mailto:datamaster@mectronic.com)”, “[inventory@america2.com](mailto:inventory@america2.com)”, “[inventory@PartStat.com](mailto:inventory@PartStat.com)”, “[inventory@mytrade.com](mailto:inventory@mytrade.com)”  
$from = “Users [user1@ccicms.com](mailto:user1@ccicms.com)”  
$subject = "Compass Web Inventory "  
$subject += Get-Date -f MMddyyyy  
#Will insert a new line at each entry  
$body = " "

#### Now send the email using \> Send-MailMessage

send-MailMessage -SmtpServer $smtp -To $to -From $from -Subject $subject -Body $body -BodyAsHtml -Priority high -Attachment $Path  
########### End of Script################

```
"ftp url: $ftp"
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
"Uploading $File..."
$webclient.UploadFile($uri, $Path)
			}

Else { return 0 }

```

}

If (Test-Path $Path)  
{  
Remove-Item $Path  
}

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [October 12, 2017, 8:05pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/15 "2017-10-12T20:05:17Z")

</div>

Awesome, thank you!!

---

<div class="post-metadata">

**Author:** ![MiguelS](https://www.epiusers.help/user_avatar/www.epiusers.help/miguels/32/99_2.png) [@MiguelS](https://www.epiusers.help/u/MiguelS)\
**Post date:** [October 12, 2017, 8:08pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/16 "2017-10-12T20:08:36Z")

</div>

BTW, all this was found by google…found examples and merged them together. PowerShell Email file; PowerSHell FTP File; PowerShell Merge Files.

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [October 12, 2017, 8:08pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/17 "2017-10-12T20:08:58Z")

</div>

Good to know! I’ve never used Powershell but this looks very interesting…

---

<div class="post-metadata">

**Author:** ![DCurran](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/59ef9b/32.png) [@DCurran](https://www.epiusers.help/u/DCurran)\
**Post date:** [March 28, 2019, 6:06pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/18 "2019-03-28T18:06:51Z")

</div>

Hello,

Does anyone know how to specify file path for hosted environments?

I tried this but I get an error.  
 ![image](https://epiusers.help/uploads/default/original/2X/d/db67aa5dfeb184823d5ff481d7f76f6904cfc460.png)

![image](https://epiusers.help/uploads/default/original/2X/a/a50e8575c4d53ca31ec24911dde4b4ea131fefb2.png)

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [March 28, 2019, 6:20pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/19 "2019-03-28T18:20:52Z")

</div>

Just give it a filename then use the File Server Download program to grab your file.

![image](https://epiusers.help/uploads/default/original/2X/3/30ceaba502dc4ab5236f0f42ff5144a2440d17ef.png)

It _should_ be under your user name if I recall correctly.

The reason they do that is you really don’t to give arbitrary Azure sites write access to your servers now, do you? 😉

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [March 28, 2019, 6:30pm UTC](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315/20 "2019-03-28T18:30:13Z")

</div>

OR…you can skip the interface and just [download your BAQ using PowerShell](https://epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/3) and schedule it as a Windows Task.

[Next page](https://www.epiusers.help/t/baq-export-process-where-do-i-create-define-a-process/40315.md?page=2)
