Best Practice for Accessing Metadata from ERP?

Background: Right now we’re mainly using ECM to replace a file server for handling ERP attachments and conditionally auto-attaching docs via Advanced Printing. I haven’t even given users direct access to ECM, never mind gone into workflows. Users are interacting with ECM entirely through ERP. The general plan right now is to integrate document data into BPM’s to enforce policy. I’m just getting into implementing some of this and wanted to get advice on it.

The first relevant project is this: we have various certifications (AS9100, NADCAP, etc.) we need to track on the vendor side. We have to keep copies of said certs on file, and when said certs expire, we need to prompt said vendor for new copies. In some cases, we are not allowed by our customer to release a PO if it’s due after a cert expires. This rule must be enforced via a hard stop in the system. The exact details are for us to decide, but the end result is that the system cannot spit out a PO form that can then end up in a vendor’s inbox.

My thought is to create a cert doctype (perhaps multiple types, specifics on that front are TBD, but I’m not worried about that) and have users enter a cert date and expire date upon upload. Thus I reduce the multiple steps of certs to a single user action. Then, when releasing/receiving a PO, reference the expire date in a BPM and go/no go based on that.

My question is how to retrieve said data from ECM after upload? I’d assume best practice is via the REST API, but I’m struggling to find documentation on that. I’d rather not access the ECM database directly.

Also, does Kinetic have better built-in integration than 10.2 that would allow a less-custom solution? I’m planning on updating to Kinetic later this year anyway, but if 2021/2022 handles this out-of-the-box, it becomes a more pressing issue.

Try this via REST (inside Epicor via BO)

BO is Ice.BO.Attachment
31 is the FileXRef num from the attachment.

[POST] https://SERVER/Instance/api/v2/odata/C001/Ice.BO.AttachmentSvc/DocStarGetMetadata
  "xFileRefNum": 31, 
  "metadata": {

You’ll get back the docStar meta data for that file


Thanks. Digging through Ice.BO.Attachment right now. I’ll update once I’ve got everything working.

1 Like

Just as a quick update, I haven’t got to apply BPM’s yet as this is still at proof-of-concept stage that I’m proposing to SME’s to help wrap their mind around everything since it’s such a shift from they way they do things.

We already track what kind of certs our suppliers should have via attributes. So I already have a list of who should, for example, have NADCAP certs on file. We don’t track too many key certs (like 4 right now), and I don’t want users typing in cert type when uploading, so I’ve just created separate DocTypes for each then tied them to the Vendor table.

Next step was setting up the metadata. The system requires me to tie ERP-side metadata to a field. It also didn’t let me select a custom field. So I grabbed a tax date field that we’re never going to use and checked required and override.

Now, when they attach a cert, they’re prompted for issue and expire dates. Cool. Exactly what I’m looking to do.

If they forget, the system gets angry. Great.

Final step in the demo required me to parse the XFileRef.XFileName field, grab the corresponding ECM record (via Document, DocumentVersion,CustomFieldValue and CustomFieldMeta), and present the SME’s with a concept for a potential widget/dashboard that will let them keep on top of potential upcoming cert expirations.


LEFT(XFileRef.XFileName,CHARINDEX(';',XFileRef.XFileName,0) -1) = Document.Id

It’s not much, and not what I originally asked (I’ll get there), but haven’t seen much in the way of implementation/integration stories on here so I thought I’d share my first tentative steps.

1 Like