API: Duplicate rowids?

We are utilizing a webhook that assumes each row in the smartsheet has a unique and unchanging rowid associated with it. We have been noticing some behavior that suggests this may not be true, so I just wanted to see if anybody has seen behavior like this, and maybe point me to how we may be using the api incorrectly. 

Consider the following scenario pertaining to any particular smartsheet: 

A row is created, which the webhook sends to us with this structure (the following is taken from documentation as an example):


{

"id": 3285357287499652,

"columnId": 0,

"rowid": 1234567890,

"userid": 48569348493401210,

"objectType": "cell",

"changeAgent": "string",

"eventType": "created",

"timestamp": "2019-08-24T14:15:22Z"

}


We listen for this `created` event and store the associated `rowid`.

Later, we receive another `created` event from the webhook with an identical `rowid`.


We would expect to only receive a `created` event when a new row is created, and that each of those rowids would be unique - am I misinterpreting how the events fire? I did check to make sure no new columns were added, which I thought may be the culprit.

Any input would be very helpful, thanks so much!!

Best Answer

  • Adam HILLIKER
    Answer ✓

    Thanks Genevieve - I have reached out to support, and have learned that there are situations in which duplicate events could occur. Per Smartsheet Support:

    By design, duplicate events may actually happen. They would happen if:

     

    1. We notice that some module in our system was down and that may have suppressed events. In that situation, we replay events that happen in a period of time, so because we replay based on a period of time then missing events are generated but duplicates of previously created events may be generated too. You would able to see that they are duplicates based on the eventID. Anyway, in case of duplicates, the you should always assume that the most accurate event is the most recently generated.
    2. We notice some malfunction (or bug) in a component that may have produced inaccurate events. In that case, we regenerate the events that we believe were inaccurate. In case you see duplicates, the most accurate event is the most recently generated.
    3. For performance reasons (i.e. systems running in parallel) it is theoretical possible (but very rare) that duplicate events are generated. If it happens, again you should always assume the most accurate event is the most recently generated.
    4. Events are only duplicate if they have identical eventID. However, as the system runs, many "nearly" identical events (with different eventID) may be generated (e.g. sheet-update). In this case, the events look like duplicate but they are not because the eventID is different. This is a legitimate case where lots of activities happened with the sheet and lots of similar events (which are not duplicates) are generated with close time proximity.


Answers

  • Hi @Adam HILLIKER

    You are correct in that the Row IDs are unique and un-changing per-row. This does mean that you should only see a row being created once, so I have to admit I'm not sure why you would receive a duplicate with the same ID.

    I would perhaps suggest reaching out to Smartsheet support so you can work through this in a private channel where you can share more detailed screen captures and responses.

    Thanks,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • Adam HILLIKER
    Answer ✓

    Thanks Genevieve - I have reached out to support, and have learned that there are situations in which duplicate events could occur. Per Smartsheet Support:

    By design, duplicate events may actually happen. They would happen if:

     

    1. We notice that some module in our system was down and that may have suppressed events. In that situation, we replay events that happen in a period of time, so because we replay based on a period of time then missing events are generated but duplicates of previously created events may be generated too. You would able to see that they are duplicates based on the eventID. Anyway, in case of duplicates, the you should always assume that the most accurate event is the most recently generated.
    2. We notice some malfunction (or bug) in a component that may have produced inaccurate events. In that case, we regenerate the events that we believe were inaccurate. In case you see duplicates, the most accurate event is the most recently generated.
    3. For performance reasons (i.e. systems running in parallel) it is theoretical possible (but very rare) that duplicate events are generated. If it happens, again you should always assume the most accurate event is the most recently generated.
    4. Events are only duplicate if they have identical eventID. However, as the system runs, many "nearly" identical events (with different eventID) may be generated (e.g. sheet-update). In this case, the events look like duplicate but they are not because the eventID is different. This is a legitimate case where lots of activities happened with the sheet and lots of similar events (which are not duplicates) are generated with close time proximity.


  • Ah, thank you Adam! This is really great information to have in the Community, I appreciate you sharing your response.

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now