Need To create entry of AP Invoices using DMT

Hello,

Our management was decided NOT to use DOCSTAR, due mostly to costs. Instead, we are scanning our Invoices, and send them to an external firm, which OCR them and return the invoice data as XML files, which I was able to read and generate a sample Excel file .

As a phase 1, I was asked to generate DMT files which the user would import in order to create the AP invoice entry.

I understand first the APInvGrp table need to be created a record to get the group.
Then the APInvHed table needs to create a record for the Invoice, in that group.
Then create the APInvDtl records for the detail lines of the Invoice.

Do I need to create records in other tables ? I feel I need to such as APInvTax for tax info or APInvMsc if there is transport charges…

But I think i might be more effecient (they said as phase2, but I think should be phase1) if I can use the business objects, and if anyone is willing to share how I can achieve this with some code exemples that would be awsome.

and / or via REST code exemple (phase 3) …

Thank you all.

Ideally, you would have a custom function in Epicor that can take that XML as parameter and use it to add the AP invoice in Epicor. Then, if their system handles it, have them call your Epicor function with REST. Ideal solution but will take time. That function won’t be an easy task. Start your trace logs in Epicor and go in and add an AP invoice with a few lines. Have a look at what methods are called when you do that. Basically, your function would need to call the same methods there (with a few exceptions).
If they can’t make REST calls and you already have a process to extract the data in Excel or other formats you want, then I don’t think you need REST. You can go with DMT - those 5 tables mentioned are a good start. Also, have a look at PlayLists in DMT, they may help you make the import easier.

Dragos