I want to make for myself a new webpage on MWS where I could see some basic transaction statistics, like how many transactions were sent during xx days, how many were failed. Also I want to have here some basic searching like how many transactions were related to some patrner profile etc.
I have found that they are some services in wm.tn package which could be helpfull so I will try to study documentation, but do you have any experience with this?
Could you please send me some tips and hints what is the best to use and how it should be implemented?
Only replying 3 years late but yes I have this experience. This is from a time before MWS (~15 years ago), we built an DSP-based IS portal to report on transactions, setup profiles, etc using wm.tn:* services (which are pretty complete). The portal’s still working and in use.
For inbound transactions, you query transactions (wm.tn.query:createDocumentQuery, wm.tn.query:documentQuery), check the documents status (e.g., results[]/UserStatus), and see if it worked.
The one tricky bit is determining if outbound document deliveries are successful. I did this as a two-stage process. First, review outbound delivery tasks to find documents that are or have been delivered. For this, create and execute a task query (wm.tn.query:createTaskQuery, wm.tn.query:taskQuery), then retrieve the TN document associated with each delivery (wm.tn.doc:viewAs) in a Try/Catch block, and add both the delivery job and the document to your transfer report.
This still leaves outbound documents that haven’t started a delivery job yet (say due to a misconfig or bug). For those, create another, wider query on TN transactions (wm.tn.query:createDocumentQuery, wm.tn.query:documentQuery). Then, query each document for its delivery job (do a wm.tn.query:createTaskQuery, wm.tn.query:taskQuery for that document). Skip documents with a delivery task (these are already covered by task query section above).Transfer the remaining ‘orphan outbounds’ to the outbound transfer report.