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

Parents
  • 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 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?

Reply
  • 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?

Children
No Data