Jamesbrendamour's picture
|
download
raw
2.97 kB
metadata
title: Synchronous API Smart Events | Sage Intacct Developer
url: https://developer.intacct.com/customization-services/synchronous-smart-apis/

Synchronous API Smart Events | Sage Intacct Developer

Getting Started with Customization Services

Smart Event Walkthrough

Smart Event Examples

Synchronous API Smart Events

Smart Rule Examples

Customization Packages

  • Overview
  • How it works
  • Creating synchronous API Smart Events
  • Best practices

Overview

You can ensure that a group of events, including the triggering action, are executed in order as a set using synchronous API Smart Events.

This lets you think in terms of a larger task where synchronous API Smart Events are sub tasks. On failure of any sub task, nothing is saved (not even the triggering action), and the system issues an error message.

In addition to providing a grouping mechanism, this feature also eliminates the possibility of collision, concurrency, and overwriting between events since they are executed one after another.

How it works

When an action triggers a synchronous API Smart Event, the system attempts to execute all synchronous events that are part of the resulting chain of actions. This is done in alphabetical order according to the Smart Link IDs, and it occurs before the triggering action is committed. If the chain executes successfully, the triggering action is saved and any asynchronous Smart Events are then executed as well. If the chain has a failure, the triggering action is not saved, the synchronous API Smart Events are rolled back, and no asynchronous Smart Events (of any type) are executed.

You can see if your Smart Events were executed in your offline job history.

Creating synchronous API Smart Events

When creating API Smart Events in the Sage Intacct UI:

  • Select the Synchronous Smart Event checkbox.
  • Use the NAMESPACE_PREFIX_DESC convention when naming your Smart Events to control the order of event execution (see Best Practices below).

Best practices

Though powerful, synchronous API Smart Events add a level of complexity, so you should be thoughtful in your approach. For this reason, we recommend the following:

  • Only use synchronous API Smart Events when you want to ensure a group of events are executed in a particular order and as a group.
  • Use synchronous API Smart Events when you want to ensure the triggering action is tied to the event actions in terms of success and failure.
  • Use a prefix in your IDs to group your related synchronous API Smart Events and ensure they are occurring in the correct order. The events will execute in alphabetical order. A good format to use is NAMESPACE_PREFIX_DESC. For example, you could use a convention like:
    • FA_01_DESC
    • FA_02_DESC
    • FA_03_DESC
  • If you want to re-order synchronous API Smart Events that were created from a package, inactivate the synchronous API Smart Events in the package, then create new ones.

Provide feedback

Xet Storage Details

Size:
2.97 kB
·
Xet hash:
5b3e84a3db96ca8112c38409eb4ce2e98c2eb5a6b2b5f37e7e09d0bb24fdc019

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.