Datasmith Export SDK Material Instantiation

I’m currently building a Datasmith Export plugin for UE5.4 to convert models to the .udatasmith format. I have successfully exported textures and geometry to the Datasmith scene, however what is causing confusion is Material Instances.

I have set the material instance as Custom, and am trying to set the base material using the “SetCustomMaterialPathName”. What is confusing me is where to put the material file, and what exactly does the function need passing? I have tried copying the material to the scene assets folder and this did not work. I have tried all sorts of options including relative paths and full paths.

I have an old version of the plugin for UE4 am writing which seems to set the path a folder within the Unreal installation, with a file name of ..

Can anyone advise please?