Search code examples
quickbooksintuit-partner-platform

Sending an order into Quickbooks via IPP doesn't work when transaction date is in the past


I've edited the question to make it more clean and focused now that I've investigated more.

Syncing orders are working for today's date and future dates, but not for dates in the past. I'm testing now directly in the API explorer.

Here is the add order request and response:

<!--Add order request-->
<Add xmlns="http://www.intuit.com/sb/cdm/v2" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    RequestId="ecc53f53d70f0a52de4c88021721ba32" 
    xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 ./RestDataFilter.xsd ">
    <OfferingId>ipp</OfferingId>
    <ExternalRealmId>688875295</ExternalRealmId>
    <Object xsi:type="SalesOrder">
        <Header>
            <DocNumber>6</DocNumber>
            <TxnDate>2010-12-25</TxnDate>
            <CustomerId idDomain="QB">4</CustomerId>
            <SalesRepId idDomain="QB">1</SalesRepId>
        </Header>
        <Line>
            <ItemId idDomain="QB">1</ItemId>
            <Qty>6</Qty>
        </Line>
    </Object>
</Add>

<!--Add order response-->
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
    <Success RequestId="ecc53f53d70f0a52de4c88021721ba32">
        <ObjectRef>
            <Id idDomain="NG">802721</Id>
            <SyncToken>1</SyncToken>
            <LastUpdatedTime>2013-04-29T15:26:53Z</LastUpdatedTime>
        </ObjectRef>
        <RequestName>SalesOrderAdd</RequestName>
        <ProcessedTime>2013-04-29T15:26:53Z</ProcessedTime>
    </Success>
</RestResponse>

Here is the sync status and sync activity. There was only one entity with SalesOrder, but the times don't match up, so I don't believe its referencing the same order that I added via API explorer. Also, the order that I added did not appear in Quickbooks also.

<SyncStatusResponse>
<NgIdSet>
<NgId>802721</NgId>
<NgObjectType>SalesOrder</NgObjectType>
</NgIdSet>
<RequestId>DB7F4BF877006079E040900A0F1B14C1</RequestId>
<StateCode>8</StateCode>
<StateDesc>Record netted with QB</StateDesc>
<MessageCode>70</MessageCode>
<MessageDesc>MBL Netter success using QB SDK ext_ack_id</MessageDesc>
<ResponseLogTMS>2013-04-29T15:38:02.0Z</ResponseLogTMS>
</SyncStatusResponse>


<SyncActivityResponse>
<SyncType>Writeback</SyncType>
<StartSyncTMS>2013-04-10T12:42:21.0</StartSyncTMS>
<EndSyncTMS>2013-04-29T08:38:02.0</EndSyncTMS>
<EntityName>SalesOrder</EntityName>
<EntityRowCount>20</EntityRowCount>
</SyncActivityResponse>

From the sync status response, state code 8 means

Record netted. Synchronized. Object created in Data Services. Sync Manager has acknowledged synchronizing the object and mapped its NG ID to a QB ID in QuickBooks. Equivalent to StateCode 1 (for object created in QuickBooks).

Message code 70 seems to be ok base on its description, but it wasn't listed in the documentation.


Solution

  • In Quickbooks Destop, by default only the current Fiscal year transactions are displayed. Could you try changing the Date filter to "All", to see if the Sales Order made it ?