Skip to content

Commit 7223383

Browse files
author
Sebastian Sauerer
committed
docs(apps): extend docs with new features
1 parent b9afb94 commit 7223383

File tree

4 files changed

+126
-4
lines changed

4 files changed

+126
-4
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Custom Action
3+
hide_title: true
4+
sidebar_position: 5
5+
---
6+
7+
# Custom Automated Action
8+
9+
Extend epilot's automation capabilities with custom actions that integrate seamlessly into the platform's workflow engine.
10+
11+
## What Are Custom Actions?
12+
13+
Epilot provides a powerful automation engine that allows you to create complex workflows and processes. Custom Actions are specialized components that can be added to these workflows, enabling you to perform specific tasks or integrations that are not available out-of-the-box. Customers can install these actions to enhance their automation capabilities, allowing for tailored solutions that fit their unique business needs.
14+
15+
With a custom action you can extend the epilot platform by adding new functionality that can be used in automation workflows. This allows you to create custom processing steps, integrations with external systems, or any other specialized functionality that enhances the epilot experience.
16+
17+
## Why Use Custom Actions?
18+
Custom Actions provide several key benefits:
19+
- **Tailored Functionality**: Create specific actions that address unique business requirements
20+
- **Seamless Integration**: Actions fit naturally into epilot's automation workflows, enhancing existing processes
21+
- **Reusability**: Once created, actions can be reused across multiple workflows, reducing the time to set up new automations
22+
- **Community Sharing**: Share your custom actions with the epilot community, allowing others to benefit from your innovations
23+
24+
25+
## How to Create a Custom Action
26+
27+
## External Integration
28+
29+
### How To Integrate External Systems
30+
A custom action with an external integration is basically a webhook (POST) request to your defined system.
31+
You can either:
32+
1. Trigger some asynchronous processing in your system, or
33+
2. Update epilot data with an access token built from the permission/role you can define (see [Permissions](/apps/building-apps/configure-permissions)).
34+
35+
The payload of the is the follinwg
36+
```json
37+
{
38+
"type": "external_integration",
39+
"timestamp": "2022-11-03T20:26:10.344522Z",
40+
"data": {
41+
"org_id": "", // The ID of the organization that the action is executed in
42+
"entity": "", // The entity type that the action is executed on, e.g. "opportunity", "contact","contract", etc.
43+
"action_config": {},
44+
"app_config": {},
45+
"app_options": {}, // The options configured by the user when installing the app
46+
"execution_id": "",
47+
"execution_status": "",
48+
"exection_action_id": "",
49+
"trigger_event": "", // information about the calling event, e.g. "opportunity.created", "opportunity.updated", etc.
50+
}
51+
}
52+
```
53+
54+
additional you will get 4 headers specified by epilot:
55+
```http
56+
webhook-signature v1a,puLZGVBm1MhSFz/kpgDsbt56DqanAAEg5Y5pgkVaz2d9WTbp6sGpo64qJFm8DWE8fo85b3cOs0CvV9v4WseUBw==
57+
webhook-timestamp 1749649159
58+
webhook-id msg_245c477923600038edb96d07f9d95f77
59+
60+
optional: x-epilot-token: ey...
61+
```
62+
63+
The `webhook-*` headers are used to verify and check the authenticity of the request. See more about [how to secure external integrations](#how-external-integrations-are-secured-asymmetric-signature) below.
64+
65+
The `x-epilot-token` is an access token that is generated based on the permissions and roles defined in your app configuration. This token allows you to securely access epilot data and perform actions on behalf of the user. (expires after 10 min)
66+
67+
### Example: Sync Data With Your Platform And Write Back To epilot entites
68+
To create a custom action that syncs data with your platform and writes back to epilot entities, you can follow these steps:
69+
1. **Define the Action**: Create a new custom action in your app configuration with the type `external_integration`.
70+
2. **Define the Permissions**: Specify the permissions required for the action to access the necessary data in epilot.
71+
72+
Now whenever a customer installs your App and invokes the custom action, the request will be sent to your external system with the payload described above. Your system can then process the request, perform the necessary operations (e.g., syncing data), and respond accordingly. By specifying the previous permission an access token is attached to the request. You can use that token and our [official SDK](https://github.com/epilot-dev/sdk-js) to write back to epilot entities.
73+
74+
### How External Integrations Are Secured (Asymmetric Signature)
75+
To ensure that external integrations are secure, epilot uses an asymmetric signature mechanism. This involves generating a unique signature for each request that is sent to the external system. The signature is created using a private key that is known only to the epilot platform, and it is verified by the external system using a corresponding [public key](https://app.sls.epilot.io/v1/public/.well-known/public-key). This ensures that only authorized requests are processed, and it prevents unauthorized access to the external system.
76+
77+
To secure the endpoint our custom action is calling, you need to verify the signature of the request. We recommend to use the `verifyEpilotSignature` function by our App SDK as it handles the verification process for you. This function checks the signature against the public key and ensures that the request is valid. We use a standard way to sign & verify the requests according to the [webhook spec](https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md).

apps/building-apps/components/custom-journey-block.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Journey Blocks
33
hide_title: true
4-
sidebar_position: 3
4+
sidebar_position: 4
55
---
66

77
# Custom Journey Blocks

apps/building-apps/components/portal-extension.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Portal Extensions
33
hide_title: true
4-
sidebar_position: 4
4+
sidebar_position: 6
55
---
66

7-
<p>&nbsp;</p>
8-
97
<h1 align="center">Portal Extensions</h1>
108

119
<p align="center">Enhance epilot portals with custom functionality and integrations</p>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Permissions
3+
hide_title: true
4+
sidebar_position: 3
5+
---
6+
7+
# Permissions
8+
9+
Learn how to configure permissions your App requires to function properly. When building an app for the epilot platform, you may need to request specific permissions to access certain features or data. This guide will help you understand how to configure these permissions effectively.
10+
11+
## What Are Permissions?
12+
Permissios in epilot are used to control access to various features and data within the platform. When you create an app, you can specify which permissions your app requires to function correctly. This ensures that users have the necessary access rights to use your app without encountering permission-related issues.
13+
14+
## How to Configure Permissions For Your App
15+
To configure permissions for your app, you need to create a role in your own organization and specify which grants (permissions) this role should have. This role can then be assigned to users who will be using your app.
16+
17+
### Step 1: Create a Role
18+
1. Go to the **Access Management** section of your epilot organization (under settings).
19+
2. Navigate to the **Roles** tab.
20+
3. Click on **New Role**.
21+
4. Enter a name for the role (e.g., "App User Role").
22+
5. Click **Save** to create the role.
23+
24+
:::info
25+
We eventually introduce a new dedicated **App Role**, but for now please select the **User Role** for the role type.
26+
:::
27+
28+
### Step 2: Configure Permissions
29+
1. After creating the role, you will see a list of available permissions (grants).
30+
2. Go to your App configuration in the epilot platform.
31+
3. In the **Permissions** section, select the role you created in Step 1. and save the changes.
32+
33+
## How To Use Permissions in Your App
34+
35+
Once your App is installed, a role you specified is automatically created in the customer's organization. This role will have the permissions you configured in Step 2.
36+
37+
Now every component has different options to access those permissions. For example the Custom Action component can access the permissions through the `x-epilot-token` header in the http request. This token contains the necessary information to authenticate and authorize the action being performed.
38+
39+
Check the specific component documentation for details on how to access permissions in your app.
40+
41+
## Supported Permissions by Component Type
42+
43+
| Component Type | Permissions Supported |
44+
|---------------------------|-----------------------|
45+
| Custom Journey Block | No |
46+
| Portal Extension | No |
47+
| Custom Action | Yes |

0 commit comments

Comments
 (0)