Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
integration:ivedix [2024/10/17 14:52] – [Sending transactions] Gary Willettsintegration:ivedix [2025/05/07 04:28] (current) – [Errors] Gary Willetts
Line 15: Line 15:
   * **Send now button:** If this is clicked, all information waiting in the failed queue to be sent to the iVEDiX API is sent immediately.   * **Send now button:** If this is clicked, all information waiting in the failed queue to be sent to the iVEDiX API is sent immediately.
   * **Number of times to retry sending:** The maximum number of times to retry sending information to iVEDiX. Once a piece of information has failed to be sent this number of times, the failure becomes permanent: it is removed from the send queue and the final failure is logged.   * **Number of times to retry sending:** The maximum number of times to retry sending information to iVEDiX. Once a piece of information has failed to be sent this number of times, the failure becomes permanent: it is removed from the send queue and the final failure is logged.
-  * **Send errors to this email address:** All errors sending information to the iVEDiX platform are sent to this email address.+  * **Send errors to this email address:** All errors sending information to the iVEDiX platform are sent to this email address. You can enter multiple email addresses in here by entering them one after another separated with a semicolon ('';'').
  
  
 ===== What it does ===== ===== What it does =====
 ==== Sending batches ==== ==== Sending batches ====
-Batches are sent to iVEDiX whenever a stockline is created (e.g. when a supplier invoice or inventory adjustment-add is confirmed) or updated (which means that either the batch or expiry date is changed) in any store with a "WHXXXXcode (where XXXX is a 4 digit number) or its corresponding malaria store (which will have a matching GF-MAL-XXXX code).+Batches are sent to iVEDiX whenever a stockline is created (e.g. when a supplier invoice or inventory adjustment-add is confirmed) or updated (which means that either the batch or expiry date is changed) in any store with a ''WHXXXX'' code (where XXXX is a 4 digit number) or its corresponding malaria store (which will have a matching ''GF-MAL-XXXX'' code).
  
 The batches are sent using the ''/batch/createUpdate'' endpoint of the API using these fields: The batches are sent using the ''/batch/createUpdate'' endpoint of the API using these fields:
Line 29: Line 29:
  
 ==== Sending transactions ==== ==== Sending transactions ====
-Transactions are all sent to iVEDiX when they are confirmed. Transactions are only sent from stores having a "WHXXX" code or a corresponding "GF-MAL-XXXXcode.+Transactions are all sent to iVEDiX when they are confirmed. Transactions are only sent from stores having a ''WHXxXX'' code or a corresponding ''GF-MAL-XXXX'' code and transactions in any ''GF-MAL-XxXX'' store are sent as if they were in the ''WHXXXX'' store. Stock transfers (or credits) between a ''WHXXXX'' or ''GF-MAL-XXXX'' store are ignored and not sent to iVEDiX.
  
 +If a transaction is edited or a line added or removed from it, the whole transaction is sent again, in its new form, to iVEDiX.
  
 +The transactions are sent using the ''/inventoryStockStatus/updateInventory'' endpoint of the API using these fields:
 +  * transactionId: the transaction's UUID.
 +  * transactionDate: the transaction's confirmed date in ISO date format.
 +  * warehouse: the store code; WH0004, 6 or 7 and the corresponding Malaria stores take the corresponding main store code.
 +  * donor: the transaction category of the transaction.
 +  * productCode: the item code.
 +  * batchNumber: the batch of the stock.
 +  * creditDebit: "Credit" for credit (stock increase), "Debit" for debit (stock decrease).
 +  * transactionType: "GoodsIssued" for customer invoices, "GoodsReceived" for supplier invoices and customer credits, "TradeReturns" for supplier credits, "PositiveAdjustment" for inventory adjustment-adds and "NegativeAdjustment" for inventory adjustment-reduces. For a cancelled transaction the appropriate opposite type is used.
 +  * quantity: pack size x number of packs for this transaction line.
  
 +There are actually two schedulers running to control sending transactions to iVEDiX: one picks up all new transactions and sends them for the first time. The other picks up all the failed transactions and sends them again until they have reached the maximum number of retries before permanent failure.
 ===== Errors ===== ===== Errors =====
 If errors are encountered during either of the sending processes then the information to be sent is entered into a queue. All pices of information (batches or transactions) in that queu are attempted to be resent after the number of minutes stored in the **Interval between retries** field. When a piece of informaiton is successfully sent it is removed from the queue. If a piece of information is not sent successfully after the number of retries in the **Number of times to retry sending** field then it is removed from the queue, the final failure is logged (see the [[admin:the_log]] page for details on how to view the log) and an email giving details of the error is sent to the email address stored in the **Send errors ro this email address** field.  If errors are encountered during either of the sending processes then the information to be sent is entered into a queue. All pices of information (batches or transactions) in that queu are attempted to be resent after the number of minutes stored in the **Interval between retries** field. When a piece of informaiton is successfully sent it is removed from the queue. If a piece of information is not sent successfully after the number of retries in the **Number of times to retry sending** field then it is removed from the queue, the final failure is logged (see the [[admin:the_log]] page for details on how to view the log) and an email giving details of the error is sent to the email address stored in the **Send errors ro this email address** field. 
Line 38: Line 50:
 \\ \\
 \\ \\
-|  //  Previous:  **[[integration:hl7_integration]]** | | Next: **[[tables_fields:]]** //  |+|  //  Previous:  **[[integration:hl7_integration]]** | | Next: **[[integration:siglofa]]** //  |
  
 ---- struct data ---- ---- struct data ----
  • Last modified: 2024/10/17 14:52
  • by Gary Willetts