The CONTRACT struct and your dataset record have different structures. But you seem to mix both together, which will likely not work.

Data conversion is more difficult than writing a strategy script, because there are more opportunities for errors. it's also hard to see at a glance where the error is. If you can't get it working, we're offering a conversion service at a fixed fee on the support page.