I have figured these out,
for reference
pid = parent id, it appears to be used when merging topics i think, but in most cases is safely set as 0
flags, this defines different aspects, but largely i used
M - Message - User = 64
R - Reply - agent = 576
first post in a topic +1 to these values
this seems to have worked