# Exporting data from Epicor Public Cloud

**URL:** <https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577>\
**Category:** Epicor ERP 10\
**Tags:** baq, data, cloud\
**Created:** [March 14, 2019, 4:45pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577 "2019-03-14T16:45:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LarsonSolutions](https://www.epiusers.help/user_avatar/www.epiusers.help/larsonsolutions/32/266_2.png) [@LarsonSolutions](https://www.epiusers.help/u/LarsonSolutions)\
**Post date:** [March 14, 2019, 4:45pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/1 "2019-03-14T16:45:44Z")

</div>

I would like to setup a daily export of data from Epicor Cloud to a local drive. Any suggestions?  
When running the BAQ Export process a file is sent to a location where you have to manually download the file.

Thinking about using a report and setup advance print routing to email the file out, but that still doesn’t automate the process.

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [March 14, 2019, 4:48pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/2 "2019-03-14T16:48:13Z")

</div>

REST + PowerShell 🙂

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [March 14, 2019, 5:03pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/3 "2019-03-14T17:03:26Z")

</div>

```auto
#Epicor user name
$user = "epicor"
#Epicor Password
$pass= "epicor"

#BAQ End point URL
$uri = "https://<YourServer>/<YourInstance>/api/v1/BaqSvc/<YourBAQ>/"

#Create encoded password
$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force

#Create Credential
$cred = New-Object System.Management.Automation.PSCredential ($pass, $secpasswd)

#Rest Call
$data = Invoke-RestMethod $uri -Method Get -Credential $cred -ContentType "Applicatin/Json"

#Dump results as CSV
$data.value | Export-Csv -Path './test.csv' -NoTypeInformation

```

---

<div class="post-metadata">

**Author:** ![John\_Mitchell](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mitchell/32/718_2.png) [@John\_Mitchell](https://www.epiusers.help/u/John_Mitchell)\
**Post date:** [March 14, 2019, 8:33pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/4 "2019-03-14T20:33:20Z")

</div>

If you have Office 365 look at [PowerBI Dataflows](https://powerbi.microsoft.com/en-us/blog/introducing-power-bi-data-prep-wtih-dataflows/). It’s a completely hosted ETL option.

---

<div class="post-metadata">

**Author:** ![LarsonSolutions](https://www.epiusers.help/user_avatar/www.epiusers.help/larsonsolutions/32/266_2.png) [@LarsonSolutions](https://www.epiusers.help/u/LarsonSolutions)\
**Post date:** [March 18, 2019, 1:12pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/5 "2019-03-18T13:12:10Z")

</div>

Will REST work with Government Cloud?  
Will want to run an export on a daily basis.

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [March 18, 2019, 1:16pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/6 "2019-03-18T13:16:00Z")

</div>

As long as the Epicor REST API is available… it should. I believe Public Cloud does expose rest of you request it.

---

<div class="post-metadata">

**Author:** ![Bart\_Elia](https://www.epiusers.help/user_avatar/www.epiusers.help/bart_elia/32/38379_2.png) [@Bart\_Elia](https://www.epiusers.help/u/Bart_Elia)\
**Post date:** [March 18, 2019, 1:37pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/7 "2019-03-18T13:37:15Z")

</div>

Yes REST is available in any of the cloud or most new features built by Epicor would not work 😉

---

<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:** [March 18, 2019, 11:59pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/8 "2019-03-18T23:59:51Z")

</div>

Microsoft Flow works great for doing this and you can create a flow that can allows a user to select a BAQ (source for export) and the target destination for the file. They can also be ran on schedules. Once a flow is created you can delegate the permissions to execute to as many as you would like (no local install required) Below is a sample flow that shows a bit of this. A simple replacement for BAQ Export Process  
Steps:

1. Manual trigger - but could be scheduled or email triggered or a number of other triggers that start this. What is kind of cool is that this can be triggered by Flow mobile app which then could run this flow and email you the file
2. This is the REST connection (simple setup). Can add selection for what BAQ a user would like
3. Parse JSON (formats for easily consuming in CSV table)
4. Formats CSV table for file creation
5. Creates file on local file server, OneDrive, Google Drive, SharePoint or many others. Could prompt user for destination.  
 ![image](https://epiusers.help/uploads/default/original/2X/d/dac8d8bab72c960e1790b232e0096eefef508d69.png)

---

<div class="post-metadata">

**Author:** ![cmoore](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@cmoore](https://www.epiusers.help/u/cmoore)\
**Post date:** [March 10, 2020, 1:31pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/9 "2020-03-10T13:31:27Z")

</div>

Thanks for the code! I had my IT look into trying this. He said the following:

In the Credential Create section, it fails to reference the username:

#Create Credential $cred = **New** -Object System.Management.Automation.PSCredential ($ **pass** , $secpasswd)

should be

#Create Credential $cred = **New** -Object System.Management.Automation.PSCredential ($ **user** , $secpasswd)

When the script ran, it outputted as a tab delimited csv, not ~ delimited csv. How can we define the delimiter for the BAQ in the REST call?

---

<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 10, 2020, 1:40pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/10 "2020-03-10T13:40:47Z")

</div>

I believe you can change the delimiter in this step below. The Export-Csv cmdlet is putting your delimiter in the stream, not the BAQ.

```auto
 Export-Csv $CsvFile -delimiter '~'

```

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [March 10, 2020, 1:41pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/11 "2020-03-10T13:41:27Z")

</div>

What @Mark_Wonsil said, look at the documentation for that cmdlet

> **[Export-Csv (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-7.3&viewFallbackFrom=powershell-7)**
>
> The Export-CSV cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a character-separated list of the object's property values. You can use the Export-CSV cmdlet to create spreadsheets and share data with...

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://www.epiusers.help/user_avatar/www.epiusers.help/jasonmcd/32/22326_2.png) [@JasonMcD](https://www.epiusers.help/u/JasonMcD)\
**Post date:** [December 15, 2020, 6:49pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/12 "2020-12-15T18:49:14Z")

</div>

@danbedwards I have spent a few hours trying to wrap my head around this, but I’m still hitting a wall.

I keep hitting this error: `The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.`

So, on your Parse JSON step, what is inside of it?

When I try to get Flow (Power Automate) to generate the schema, it starts with that “object” type. I think it’s trying to do something with the URL ahead of the array. Do you strip that out somehow?

 ![image](https://www.epiusers.help/uploads/default/original/3X/d/9/d9165426a13b6215d8c0708068b2abf883e6225e.png)

---

<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:** [December 16, 2020, 4:22am UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/13 "2020-12-16T04:22:47Z")

</div>

Hopefully this will help.

Here is a simple flow (a trigger, custom action, and parse)

 ![image](https://www.epiusers.help/uploads/default/original/3X/8/3/83a2f6f2e215c147d0659893a4abd03c19fa8ad9.png)

The Action is a simple GET using Rest to pull some data using a Baq

 ![image](https://www.epiusers.help/uploads/default/original/3X/f/e/fec433906b5fd9c7b9283a39dc1859b22db1e775.png)

The Parse has a couple steps.

1. In the Content when you click you will see the body appear on the right hand side under your “GET”. Add that to the Content area
2. Click Generate from Sample and paste in a json body from Postman or Swagger. This will create your schema

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://www.epiusers.help/user_avatar/www.epiusers.help/jasonmcd/32/22326_2.png) [@JasonMcD](https://www.epiusers.help/u/JasonMcD)\
**Post date:** [December 16, 2020, 12:49pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/14 "2020-12-16T12:49:58Z")

</div>

@danbedwards Hot dog. I got it.

I realized what it was - in the table step I used “body.” WRONG. I should be using “value” - that’s the array!

You answered what I asked, and your generated schema was slightly different than mine, but similar enough to let me know I was on the right track. Reevaluating the parse step (and a night’s rest) made me see I was grabbing the wrong object (or whatever).

Thank you, thank you, thank you!

![image](https://www.epiusers.help/uploads/default/original/3X/9/5/95253a7ab61d49cde36c929b648d27352a925350.png)

![image](https://www.epiusers.help/uploads/default/original/3X/8/4/84dfeebcdda40d28dabd43af3718980296eeaad4.png)

---

<div class="post-metadata">

**Author:** ![Evan\_Purdy](https://www.epiusers.help/user_avatar/www.epiusers.help/evan_purdy/32/69101_2.png) [@Evan\_Purdy](https://www.epiusers.help/u/Evan_Purdy)\
**Post date:** [December 16, 2020, 1:47pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/15 "2020-12-16T13:47:04Z")

</div>

> [@JasonMcD](#):
>
> Reevaluating the parse step (and a night’s **REST** ) made me see I was grabbing the wrong object (or whatever).

You trying to summon @Mark_Wonsil with puns like that? 😅

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://www.epiusers.help/user_avatar/www.epiusers.help/jasonmcd/32/22326_2.png) [@JasonMcD](https://www.epiusers.help/u/JasonMcD)\
**Post date:** [December 16, 2020, 1:50pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/16 "2020-12-16T13:50:12Z")

</div>

@Evan_Purdy Oh believe me, it crossed my mind.

---

<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:** [December 16, 2020, 1:51pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/17 "2020-12-16T13:51:00Z")

</div>

> [@Evan\_Purdy](#):
>
> You trying to summon @Mark_Wonsil with puns like that? 😅

It’s how eye-roll…

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://www.epiusers.help/user_avatar/www.epiusers.help/jasonmcd/32/22326_2.png) [@JasonMcD](https://www.epiusers.help/u/JasonMcD)\
**Post date:** [December 16, 2020, 6:54pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/18 "2020-12-16T18:54:31Z")

</div>

I just want you all to know, I made a PowerPoint doc to explain all the steps for this. **55 slides**.

And you all are like, screenshot, 10011010101010. And everyone is like, “Oh I see what you did there!”.

I am out of my league some days here…

---

<div class="post-metadata">

**Author:** ![Victoria](https://www.epiusers.help/letter_avatar_proxy/v4/letter/v/ea5d25/32.png) [@Victoria](https://www.epiusers.help/u/Victoria)\
**Post date:** [November 25, 2021, 8:58pm UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/19 "2021-11-25T20:58:23Z")

</div>

Hi Jose, What about if I want to export the tables from Epicor Cloud into power Bi and do all transformations and clean up data into Power BI instead using BAQ?What’s the best practice? Sorry, I am very new to this.Thank you in advance.

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [November 26, 2021, 3:10am UTC](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577/20 "2021-11-26T03:10:54Z")

</div>

The epicor cloud now provides a read only version of your db just ask your cAm

[Next page](https://www.epiusers.help/t/exporting-data-from-epicor-public-cloud/53577.md?page=2)
