Hi all,
I was working on an integration project with Data management package API and Logic Apps.
If you have been involved in this kind of work, you might have stumbled upon the following issue.
Let’s say the source of the data to be integrated in FinOps is an FTP folder and files are dropped there by an external system. The logical way to proceed would be to create an import project in FinOps, Logic App which connects to the FTP folder, reads data and sends it to the FinOps import project.
Just to be clear, this is using the Data management package API, and not the Recurring integrations API, which is outdated as far as I know.
The problem that you might encounter is having a simple CSV file in the source FTP folder, and you need to zip it along with the Manifest and PackageHeader files in order to have a full package, before sending it to the import project in FinOps. Why this is a problem, because Logic Apps, very strangely, do not propose a zip action in the FTP connector. You can unzip files, but you cannot zip them in an FTP folder.
This is the way I got around this problem, and I wanted to share this solution to help, get you thoughts on this approach, and eventually a better solution J
I extended the DMFPackageImporter class importFromPackageV2 method in order to:
- Download the data file (the one which was read in the FTP folder).
- Generate the Manifest and PackageHeader files.
- Upload them to the BLOB.
- Give the new package URL to the method.
And it seems to work quite well. Tests were done, no trailing files left locally after execution and overhead of this supplementary process does not have a great impact on performance.
The execution of this extension is controlled by a keyword that I pass through the “ExecutionId” parameter of the Microsoft.Dynamics.DataEntities.ImportFromPackage service. This parameter is not mandatory and you can use it to pass miscellaneous information, like this one. The keyword, followed by the entity name is sent to the above service, and the rest is done in the X++ code.
Ex: Keyword “-MyKeyword-“, ExecutionId “-MyKeyword-MyEntityName”.
One other thing, it is working only for single entity import projects. For the moment, that is the requirement, but I should be able to customize it more and have multi entity import projects working as well.
You can find the extension here after.
Hope that helps someone.
Saso
Logic Apps HTTP request

DMFPackageImporter extension
(For the code please see the posts below).