Skip to main content
July 13, 2022
Question

Sync Records Smart Service - full sync

  • July 13, 2022
  • 15 replies
  • 1 view

Hi

How do you use Sync Records Smart Service to fully sync a record type that was just modified by a back end stored procedure

My case is new data comes in daily in CSV files - which gets uploaded into a set of temporary tables

After this a stored procedure inserts them into the main tables that are connected with the record types.

As of now we are syncing these record type manually from the web page

I though this smart service would have an option to do a full sync, but it needs the IDs of the record types to sync - well these are unknown since they were just inserted by the stored procedure in DB so not available yet.

Do I need to come up with another data base query to retrieve the new ID - form the database?

    15 replies

    stefanhelzle0001
    July 14, 2022

    Do you need this to be a synced record? I mean, there are many use cases for which synced records are perfect, but for some it's not.

    harshitb6843
    July 14, 2022

    You must be having a timestamp when these CSV files are introduced in the system, considering this is a repetitive activity. 
    If yes, you can schedule the sync of the records 2-3 minutes after the SP has been completed. 
    Or, if you are using a process model to write this data, then as you said, you can use the sync record smart service. Here is the link on how to configure it - https://docs.appian.com/suite/help/22.2/Sync_Records_Smart_Service.html

    It requires you to provide primary keys of the record. You can run this smart service for the data you just inserted and if it is more than 1000 rows, then run this service in batching. 

    July 14, 2022

    yes the records need to be synced all the time...

    so your suggestion is to add a select node from db with a query like "select top 1000 Id from table_x where XYZ" then feed that into sync node - then do a loop 

    I am wondering what the design constraint was against a true full sync by record type.

    July 17, 2022

    The sync records smart service was designed to keep your data up to date between full syncs, as data is updated on your external data source. You can use it in conjunction with the execute stored procedure smart service in your process model with a query after the stored procedure to retrieve the relevant primary keys to sync. You can incorporate a loop as suggested if your list is greater than 1000 records. 

    andresalbertoy0001
    October 7, 2025

    I'm revisiting this topic once more, and I see we still face the same challenges.

    The problem is getting the updated/inserted ids back, if for example we had more ids than the capacity of the result set of the stored procedure smart service. 

    I think setting a timestamp, and later using some classical Datastore/CDT query to retrieve just those ids of interest, and then, loop to re-sync should be the approach, but that is much work for such a trivial or straightforward necessity. 

    Or shaping your stored procedure to work with 1k record batches, and so on, but that just adds more complexity to achieve an "on demand" synchronization. 

    peter.lewis
    Employee
    October 8, 2025

    Can you just use incremental sync for this use case? You can set the frequency to as low as every 15 minutes, so if you configure this correctly it should soon pick up the changes after your stored procedure runs.