PAYMENT_ALLOCATION

Overview
When a payment is created the user has two options for allocation. Auto-allocation and manual allocation. This section will cover the manual allocation creation for payments.

Manual allocation means you can divide the payment among multiple invoices. This is a handy feature over the auto allocation if you want to apply payments to invoices that aren't the oldest (as auto-allocation would).

Allocations will contain a payment ID (which must be created beforehand), which is where the allocation funds are sourced from.
All allocations using the same payment ID must not exceed the payment total.
Allocation amounts must not exceed invoice totals.
Payments can only be allocated to CLOSED invoices.

System Entity Name
PAYMENT_ALLOCATION

Allowed Functions

Create Update Retrieve Delete Upsert
YES YES YES NO YES


Fields

Field Data Type Properties Description
Amount decimal required Enter the amount for this specfic allocation.  This amount must be lower than the parent payment object amout.  This amount must also be lower than the target invoice ID.
InvoiceObj INVOICE  

Object in which to contain the invoice these funds are being allocated to.

InvoiceId decimal   Enter the invoice ID for the invoice you wish to allocate funds to.
PaymentItemObj PAYMENT   Object in which to contain the parent payment object.
PaymentItemId decimal   Enter the ID from which funds you are using to allocate.



Sample Requests
Create

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:stronglytyped.soap.brmsystems.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <!--Optional:-->
         <urn:brmObjects xsi:type="PAYMENT_ALLOCATION">
            <!--Zero or more repetitions:-->
            <Amount>100</Amount>
            <InvoiceId>412782</InvoiceId>
            <PaymentItemId>413961</PaymentItemId>
         </urn:brmObjects>
         <urn:brmObjects xsi:type="PAYMENT_ALLOCATION">
            <!--Zero or more repetitions:-->
            <Amount>150</Amount>
            <InvoiceId>413132</InvoiceId>
            <PaymentItemId>413961</PaymentItemId>
         </urn:brmObjects>
         <urn:brmObjects xsi:type="PAYMENT_ALLOCATION">
            <!--Zero or more repetitions:-->
            <Amount>250</Amount>
            <InvoiceId>413579</InvoiceId>
            <PaymentItemId>413961</PaymentItemId>
         </urn:brmObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>



Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <urn:createResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413963</urn:Id>
         </urn:result>
      </urn:createResponse>
      <urn:createResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413964</urn:Id>
         </urn:result>
      </urn:createResponse>
      <urn:createResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413965</urn:Id>
         </urn:result>
      </urn:createResponse>
   </soapenv:Body>
</soapenv:Envelope>




Update

Request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <urn:update xmlns="urn:stronglytyped.soap.brmsystems.com">
         <!--Optional:-->
         <urn:brmObjects xsi:type="PAYMENT_ALLOCATION">
            <Id>413963</Id>
            <Amount>75</Amount>
         </urn:brmObjects>
      </urn:update>
   </soapenv:Body>
</soapenv:Envelope>


Response

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <urn:updateResponse>
         <urn:result>
            <urn:ErrorCode>0</urn:ErrorCode>
            <urn:ErrorText></urn:ErrorText>
            <urn:ErrorElementField></urn:ErrorElementField>
            <urn:Id>413963</urn:Id>
         </urn:result>
      </urn:updateResponse>
   </soapenv:Body>
</soapenv:Envelope>

Retrieve

Request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</urn:SessionID>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <urn:retrieve xmlns="urn:stronglytyped.soap.brmsystems.com">
         <urn:brmObjectType>PAYMENT_ALLOCATION</urn:brmObjectType>
         <!--Zero or more repetitions:-->
         <urn:id>413963</urn:id>
      </urn:retrieve>
   </soapenv:Body>
</soapenv:Envelope>


Response

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:urn="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <urn:retrieveResponse>
         <urn:result xsi:type="urn:PAYMENT_ALLOCATION">
            <urn:Id>413963</urn:Id>
            <urn:Amount>75</urn:Amount>
            <urn:Created>2014-04-25T19:01:06.000Z</urn:Created>
            <urn:CreatedUserId>6</urn:CreatedUserId>
            <urn:InvoiceId>412782</urn:InvoiceId>
            <urn:PaymentItemId>413961</urn:PaymentItemId>
            <urn:Updated>2014-04-25T19:03:13.000Z</urn:Updated>
            <urn:UpdatedUserId>6</urn:UpdatedUserId>
         </urn:result>
      </urn:retrieveResponse>
   </soapenv:Body>
</soapenv:Envelope>


Upsert

Request

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:SessionHeader xmlns:h="urn:stronglytyped.soap.brmsystems.com" xmlns="urn:stronglytyped.soap.brmsystems.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <SessionID>cZZRIteVgWBZmWPzEXpYYZZujRhbTBuSZOGIJzKj</SessionID>
        </h:SessionHeader>
    </s:Header>
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <upsert xmlns="urn:stronglytyped.soap.brmsystems.com">
            <externalIDFieldName>Id</externalIDFieldName>
            <brmObjects xsi:type="PAYMENT_ALLOCATION">                
                <Id>413963</Id>
                <Amount>100</Amount>    
            </brmObjects>
        </upsert>
    </s:Body>
</s:Envelope>


Response

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:h="urn:stronglytyped.soap.brmsystems.com">
   <soapenv:Body>
      <h:upsertResponse xmlns="urn:stronglytyped.soap.brmsystems.com">
         <h:result>
            <h:created>false</h:created>
            <h:ErrorCode>0</h:ErrorCode>
            <h:ErrorText></h:ErrorText>
            <h:ErrorElementField/>
            <h:Id>413963</h:Id>
         </h:result>
      </h:upsertResponse>
   </soapenv:Body>
</soapenv:Envelope>
Have more questions? Submit a request

Comments

Powered by Zendesk