Skip to content

Commit f4a974c

Browse files
authored
Added PM changes + settings + testing section
1 parent 6d86db6 commit f4a974c

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/connections/functions/source-insert-functions.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To create a source insert function from Segment’s catalog:
2525

2626
5. Click **Create Function** to save your insert function. The new source insert function displays in the Functions tab.
2727

28-
You can also go to **Conections** > **Sources** to create a source insert function.
28+
You can also go to **Conections** > **Sources** to create a source insert function in the Sources tab.
2929

3030
### Coding the source insert function
3131

@@ -40,13 +40,33 @@ Insert functions can define handlers for the following message types:
4040

4141
The default source code template includes handlers for all event types. Implement the types you need. For event types you want to send through, return the event in the respective event handler.
4242

43+
### Settings
44+
45+
You can add and edit settings for source insert functions in the code editor. Settings allow you to configure the behavior of your source insert function, which changes how it is displayed to anyone using your function. To set up:
46+
47+
1. Go to the **Settings** tab in the code editor and click **Add Setting**.
48+
2. Add the details about this setting.
49+
3. Click **Add Setting** to save the configuration.
50+
51+
As you change values, such as **Label**, **Name**, **Type**, and **Description**, a preview updates showing how your setting will look and work. Once saved, the new setting appears in the **Settings** tab of the function. Here, you can edit or delete the setting.
52+
53+
### Testing
54+
55+
You can test your source insert function with sample events or a manual configuration in the code editor. This allows you to test the functions behavior with real incoming data. To do this:
56+
57+
1. Go to the **Test** tab in the code editor and click **Use Sample Event** or **customize the event yourself** to set up your test data.
58+
2. Click **Run** to execute the test.
59+
60+
Test results appear under **Output**, showing whether the function ran successfully or failed.
61+
62+
4363
### Connecting a source insert function to a source
4464

4565
For data to flow downstream after transformation, connect your source insert function to a source. To do this:
4666

4767
1. Select the insert function you want to connect to the source. You can edit, delete, and connect the insert function on the side pane.
48-
2. Click *Connect a source**.
49-
3. Select the source you want to connect to and click **Connect to Source**.
68+
2. Click **Connect a source**.
69+
3. Select the source you want to connect to and click **Connect to Source**.
5070

5171
### Errors and error handling
5272

@@ -68,7 +88,7 @@ The errors listed are all permanent errors, except `RetryError`. When a `RetryEr
6888

6989
##### Why does the Delivery Overview tab not display any errors that occur within the source insert function?
7090

71-
If errors arise or events are dropped, they appear as if the events never flowed from the source.
91+
Errors in the Delivery Overview tab are not yet visible and is a work in progress.
7292

7393
##### Can I test the function with different event types?
7494

0 commit comments

Comments
 (0)