Troubleshooting Sync Records Smart Service Output Behavior

Certified Associate Developer

I'm using the Sync Records Smart Service.
I want to prepare for a situation where the sync fails due to a temporary network error, even though the value to be updated (in this case, pv!targetTrxId) is correctly set in Data > Inputs > Identifiers.
To handle this, I'm implementing the following:

1. Save the value of "Data" > "Outputs" > "Results" > "Records Updated" into pv!updatedTrxId.
2. In the subsequent XOR gateway, I check:

If a!isNullOrEmpty(pv!updatedTrxId) returns true, proceed to "error script".
Otherwise, proceed to "End Node".

The current settings are as shown in the attached image.

Inputs


Outputs


pv!updatedTrxId

("数字(整数)"=Integer)
("倍数 変数は複数の値を保存できます"=Multiple)

Even though pv!targetTrxId has a value and the sync appears to be successful, the flow still proceeds to "error script".
(pv!updatedTrxId is null…)

Why is this happening?

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    There might be 2 possibilities,

    The output path is wrong. There's no Results level in Sync Records Smart Service. Just map Records Updated directly, not Results > Records Updated.
    or
    The Records Updated output is empty if no records change during sync, even if inputs are set. So, the flow goes to error wrongly. Fix this by checking for real errors or sync status, not just if Records Updated is empty.

  • 0
    Certified Lead Developer

    A temporary network outage? Isn't this something you cover using some of the record sync settings? And in case you write a record, and the data source cannot be updated, the write record node would fail.

  • 0
    Certified Associate Developer
    in reply to Shubham Aware

    Thank you for your response.
    I have three questions.

    1. Could you please elaborate on what you meant by "Just map Records Updated directly"?
    I' m having trouble identifying where exactly I should configure the mapping to "Records Updated."
    Also, if “Results > Records Updated” cannot be used in this case, in what situations would “Results > Records Updated” be applicable?

    2. I actually updated the data source and then executed a sync for the relevant record, so I don' t believe this is a case of "no records change during sync."
    If my understanding is incorrect, I’d appreciate it if you could point that out.

    3. Is there a way to distinguish between the following two cases and store the result in a process variable?

    [Case A] No records were updated because there were no changes.
    [Case B] No records were updated due to an issue during the record sync.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Thank you again for your response.

    The data source is set to a web service, and we sync records by connecting to an external database via API.
    Therefore, we don' t write directly to the records; instead, we update the external database and then sync the records.

    I have a few follow-up questions:

    1. Which screen and which specific item are you referring to when you mention "some of the record sync settings"?


    2. The following issue occurred in production environment:

    Just before syncing the record, I updated the external database by inserting one row using the "Call Integration Smart Service."
    If an integration error occurs at that point, an error notification email is sent — this has already been implemented.

    However, the value in the external database was updated correctly, and no error notification email was sent.
    Therefore, I believe no integration error occurred during the "Call Integration Smart Service."

    The primary key obtained from the integration result was stored in a process variable and used as the identifier for the "Sync Records Smart Service."
    However, the new row was not reflected in the record.
    Moreover, no process error occurred, so I didn' t notice the issue immediately — it was discovered only after a user inquiry.
    When I manually triggered a record sync in a hurry, the new row was reflected correctly.

    Since the "Record Type" and "Identifier" were properly set in the inputs, I don' t think this was an implementation mistake.
    Based on this, I suspect that a brief integration error occurred at the timing of the "Sync Records Smart Service."
    Since there doesn' t seem to be a way to detect integration errors within the "Sync Records Smart Service" settings, I tried to add a conditional branch using "Data > Outputs > Results > Records Updated" to send an email to the system administrator if no records were updated.
    However, this approach hasn’t worked as expected.

    Why did this happen?