TransactionAllocated

Smile emits this message when a transaction is allocated to another transaction, for example, a receipt is allocated to an invoice. A transaction can have more than one allocated transaction against it.

Message header

The following table lists the parameters in the TransactionAllocated message header.

Table 1. TransactionAllocated header parameters
Parameter Type Values
version string "2.0"
usn string The unique subscription number for the account that the transaction applies to
company integer The company ID this account belongs to
currency string The ISO 4217 currency code of this account and transaction
amount decimal The value of this transaction
accountType integer The ID of the account type, as defined in Smile
debitNumber string The transaction number of the debit transaction in this allocation event
creditNumber string The transaction number of the credit transaction in this allocation event
allocationType string "Allocation" or "Deallocation"
smileMessageType string "TransactionAllocated"
eventType string "TransactionAllocated"

Message body

The message body contains the TransactionAllocatedEvent element and has the following format:
{http://xml.inomial.com/smile/2.xsd}TransactionAllocatedEvent

Example: The <TransactionAllocatedEvent> element

This example shows a TransactionAllocatedEvent XML document that contains the <TransactionAllocatedEvent> element.

<TransactionAllocatedEvent xmlns="http://xml.inomial.com/smile/2.xsd">
  <transactionEventType>TransactionAllocated</transactionEventType>
  <debitTransaction>
    <version>2.0</version>
    <transactionType>Invoice</transactionType>
    <company>1</company>
    <usn>1000000008</usn>
    <transactionNumber>21435540</transactionNumber>
    <currency>AUD</currency>
    <amount>221.55</amount>
    <accountType>1</accountType>
    <gstAmount>20.14</gstAmount>
    <entryTimestamp>2012-07-31T10:00:00.000+10:00</entryTimestamp>
    <salesReportCategory>invoice</salesReportCategory>
    <formattedAmount currency="AUD" formatted="$221.55">221.55</formattedAmount>
    <formattedGstAmount currency="AUD" formatted="$20.14">20.14</formattedGstAmount>            
    <unallocatedAmount>221.55</unallocatedAmount>
    <enteredByUsn>1000000016</enteredByUsn>
    <logTimestamp>2012-08-09T13:52:44.629+10:00</logTimestamp>
    <formattedUnallocatedAmount currency="AUD" formatted="$221.55">221.55</formattedUnallocatedAmount>     
  </debitTransaction>
  <creditTransaction>
    <version>2.0</version>
    <transactionType>Receipt</transactionType>
    <company>1</company>
    <usn>1000000008</usn>
    <transactionNumber>RCPT1000265</transactionNumber>
    <currency>AUD</currency>
    <amount>-221.55</amount>
    <accountType>1</accountType>
    <gstAmount>0.00</gstAmount>
    <entryTimestamp>2012-08-09T14:17:19.683+10:00</entryTimestamp>
    <salesReportCategory>receipt</salesReportCategory>
    <formattedAmount currency="AUD" formatted="$(221.55)">-221.55</formattedAmount>
    <formattedGstAmount currency="AUD" formatted="$0.00">0.00</formattedGstAmount>
    <unallocatedAmount>-221.55</unallocatedAmount>
    <enteredByUsn>1000000016</enteredByUsn>
    <logTimestamp>2012-08-09T14:17:19.685+10:00</logTimestamp>
    <formattedUnallocatedAmount currency="AUD" formatted="$(221.55)">-221.55</formattedUnallocatedAmount>     
  </creditTransaction>
  <amount>221.55</amount>
</TransactionAllocatedEvent>