Skip to content

Commit 43d89d3

Browse files
authored
Merge pull request #93 from epilot-dev/feat/add-external-catalog-app-docs-beta
feat: Add External Catalog Product documentation and integration details
2 parents 39c784d + 931a33f commit 43d89d3

6 files changed

Lines changed: 141 additions & 0 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: External Catalog Product
3+
hide_title: true
4+
sidebar_position: 7
5+
---
6+
7+
<h1 align="center">External Catalog Product</h1>
8+
9+
<p align="center">Integrate external product catalogs with epilot</p>
10+
11+
> If you do not have access to this integration in your organization, please contact our support team for assistance.
12+
13+
## Configuration
14+
15+
To add a **External Catalog Product** component, you need to create a new App or update an existing App.
16+
17+
<img src="/img/apps/external-product-catalog/external-catalog-option-menu.png" width="400" />
18+
19+
All development is performed using the built-in configuration editor accessible from the component editor.
20+
21+
The editor provides you with autocomplete and validation of the configuration. That way you can start with the example provided in this documentation and fine-tune your external catalog product without ever leaving the editor.
22+
23+
<img src="/img/apps/external-product-catalog/component-editor.png" width="700" />
24+
25+
## Hooks
26+
27+
Hooks allow changing or adding functionality to external catalog products.
28+
They typically rely on your API for the execution of any necessary logic and expect a certain response.
29+
30+
### Supported Hooks / Catalog Types
31+
32+
The interface supports two types of data exchange, depending on the block being used in the journey:
33+
- **Products**: Returns an array of products.
34+
- **Product Recommendations**: Returns a source product and a list of offer products.
35+
36+
### Template Variables
37+
38+
You can use template variables throughout your configuration to dynamically inject values from various sources. Template variables use the `{{Variable.path}}` syntax.
39+
40+
#### Available Variables
41+
42+
- **`Options.*`**: Access values from the app options configured during installation
43+
- Example: `{{Options.api_url}}`, `{{Options.api_key}}`
44+
45+
- **`AuthResponse.*`**: Access data from the authentication response data
46+
- Example: `{{AuthResponse.access_token}}`
47+
- Use this to extract tokens or other authentication data returned by your auth endpoint
48+
49+
- **`Context.*`**: Access properties from the current context (e.g. Journey Context)
50+
- Example: `{{Context.journey_id}}`, `{{Context.journey_url.params.xxx}}`
51+
52+
### Example
53+
54+
Below is an example of a configuration for the `products` hook, assuming a typical OAuth2 authentication flow, where the client credentials are stored in the app options.
55+
56+
```json
57+
{
58+
"hooks": [
59+
{
60+
"id": "prod-catalog",
61+
"type": "products",
62+
"name": {
63+
"en": "Prod Products",
64+
"de": "Prod Produkte"
65+
},
66+
"auth": {
67+
"url": "{{Options.oauth_api_url}}/auth/token",
68+
"method": "POST",
69+
"headers": {
70+
"Authorization": "Basic {{Options.oauth_client_id | append: \":\" | append: Options.oauth_client_secret | base64_encode}}",
71+
"Content-Type": "application/x-www-form-urlencoded"
72+
},
73+
"body": {
74+
"grant_type": "client_credentials",
75+
"scope": "{{Options.oauth_scope}}"
76+
}
77+
},
78+
"call": {
79+
"url": "{{Options.base_api_url}}/products",
80+
"method": "POST",
81+
"headers": {
82+
"Authorization": "Bearer {{AuthResponse.access_token}}"
83+
}
84+
}
85+
}
86+
]
87+
}
88+
```
89+
90+
### Security Considerations
91+
92+
- **Credentials Storage**: Store sensitive credentials (like API keys) as app options rather than hardcoding them
93+
- **Token Expiration**: Ensure your authentication tokens have appropriate expiration times
94+
- **HTTPS**: Always use HTTPS URLs for authentication endpoints and redirects
95+
- **Access Control**: Implement proper authorization checks on your authentication endpoint to ensure only authorized clients can obtain tokens
96+
97+
## Usage in Journeys
98+
99+
After your External Catalog Product component is configured and the app is installed, it can be used within epilot's Journeys. Currently we support seamless integration of the external catalog product into the journey via Product Blocks and Product Recommendations Blocks (beta).
100+
101+
When a journey creator adds a **Product Block** or **Product Recommendations Block** in a journey, they can select the integration as the source for products. Only hooks that are supported for the selected block type will be available (e.g. only `products` hook for Product Block, only `productRecommendations` hook for Product Recommendations Block).
102+
103+
<img src="/img/apps/external-product-catalog/journey-product-block-config.png" width="500" />
104+
105+
This allows the journey to dynamically fetch products and pricing from your external catalog in journeys.
106+
107+
## Integration Interface
108+
109+
To ensure seamless communication between epilot and your external catalog, your integration must respect the **External Catalog Integration Interface**.
110+
111+
### Specification
112+
113+
The integration works as a request to your service endpoint with the following request and response:
114+
115+
1. **Request**: A payload containing the `context` of the journey or a custom one defined by you/epilot.
116+
2. **Response**: A list of products or product recommendations in a specific format.
117+
118+
For detailed information on the request and response schemas, please refer to the [External Catalog Integration Interface documentation](https://docs.api.epilot.io/pricing-api-external-catalog).
119+
120+

apps/about-apps/components/overview.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ Portal Extensions enhance epilot's customer and installer portals with new secti
4343
Use cases: Custom dashboard widgets, specialized tools, data visualizations
4444
```
4545

46+
### [External Catalog Product](/apps/about-apps/components/external-product-catalog)
47+
48+
External Catalog Product components integrate third-party product catalogs into epilot. They enable Product Blocks to fetch and display products and pricing from external systems, allowing customers to browse and select items from external catalogs directly within their journey experience.
49+
50+
```
51+
Use cases: Custom product catalogs, journey products, journey product recommendations
52+
```
53+
4654
## On the Horizon
4755

4856
The epilot platform continues to evolve, with new component types planned for future releases:
@@ -92,6 +100,17 @@ Ready to create your own component? Each component type has specific requirement
92100
</div>
93101
</div>
94102
</div>
103+
<div className="row" style={{marginTop: '1.5rem'}}>
104+
<div className="col col--6">
105+
<div className="card" style={{height: '100%'}}>
106+
<div className="card__body">
107+
<h3>External Product Catalog</h3>
108+
<p>Integrate third-party product catalogs into epilot</p>
109+
<a href="/apps/about-apps/components/external-product-catalog" className="button button--primary button--block">Start Building</a>
110+
</div>
111+
</div>
112+
</div>
113+
</div>
95114
</div>
96115

97116
By understanding how components work and which types are available, you can create powerful extensions that enhance the epilot platform while maintaining a seamless user experience.

apps/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ See the [App Components](/apps/about-apps/components/overview) section for detai
3636

3737
**Portal Extensions**: Components that enhance epilot's customer and installer portals with additional functionality and visualizations.
3838

39+
**External Catalog Product**: Components that integrate third-party product catalogs into epilot.
40+
3941
### Upcoming Component Types (Roadmap)
4042

4143
1. **Custom Automation Tasks**: Define custom automation tasks that can be triggered within epilot's automation workflows.
61.8 KB
Loading
53.1 KB
Loading
114 KB
Loading

0 commit comments

Comments
 (0)