You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/docs/pages/references/functions.mdx
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,58 @@ functions:
27
27
- `name`: It is the function name that should match the corresponding function name in the folder.
28
28
- `description`: It describes the function.
29
29
30
+
### Synchronous Execution with Synchronization Key
31
+
32
+
To ensure that function executions are processed in order (FIFO) for a given context (such as a user or conversation), you can enable synchronization support in your function’s manifest and use a synchronization key (sync-id).
33
+
34
+
#### How it Works
35
+
36
+
1. **Enable Synchronization in Manifest**
37
+
- In your function’s manifest, add the field:
38
+
```yaml
39
+
functions:
40
+
- name: foobar
41
+
description: Let me execute
42
+
supports_synchronization: true
43
+
```
44
+
- This tells the platform to use a FIFO queue for this function.
45
+
46
+
1. **Set the Synchronization Key**
47
+
- When triggering an automation, include the sync-id in your rego policy along with the event_key. For example:
0 commit comments