Forum Discussion

BarbaraAlvarez1's avatar
BarbaraAlvarez1
Qrew Member
3 years ago

REST API upsert to QB is not updating records with upsert: inserts instead of updates.

I'm using the Upsert action  with the REST API to update a QB table with a SQL table as the source and QB as the destination. 

The upsert works BUT is always just adding rows  - it does not only updating.  Do you have to supply the fields to look at for the update to take place, or a key? 

My first run inserted 98 records, good.  I updated a status field in QB newly added record from 'Terminated' to 'Active'.   Re-ran my SSIS package and it didn't update back to Terminated, but inserted a new row... for ALL 98 records.   I now have all duplicate rows.

Appreciate your input.



------------------------------
Barbara A.
------------------------------

------------------------------
Barbara Alvarez
------------------------------

2 Replies

  • Have you set a merge field in the code?

    ------------------------------
    Sean Boat-Moore
    Manager SMB Development
    Project Management Office and Quality Control
    NCR Corporation
    sean.boat-moore@ncr.com | ncr.com
    ------------------------------
  • Hi Barbara,

    To Sean's question above are you either importing the key field (Default is the Record ID# field in QB) for the records you have coming in or have you set a merge key in your API call? Otherwise it is going to create new records since it doesn't have a consistent key it is looking for to merge with.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quickbase
    ------------------------------