# 'Bring Your Own Code' for dynamic content in Detailed Pages

This page explains about how to display dynamic content inside Detailed Pages by brining in your code (BYOC).

{% hint style="warning" %}
This feature is available only in Enterprise plans
{% endhint %}

There are many occasions you may want to display dynamic content on a detailed pages (internal pages).

### **Possible use cases**

1. Fetching the data from weather API and displaying the data on the page
2. Fetching data from an e-commerce API and displaying on the page
3. Fetching finance data from Finance APIs and displaying on the page
4. Fetching data from pretty much any API and display on the page
5. Fetching data from multiple APIs and process the data to create content/html/text to display on the page

### How does this work?

This needs adhoc setup and we will work closely with you to build the required function. In most cases, this setup should be doable in 48 hours.&#x20;

**The concept works more like "Serverless functions" where you don't worry about managing the infrastructure for running these explicit functions and we will take care of this for you.**&#x20;

### How does that look like?

Here are a few samples&#x20;

```
[sly-function @function-name="GetProductData" @productId="X76479" 
@showFullData="1"]
```

```
[sly-function @function-name="GetWeatherData" @cityId="SFO" 
@showPrediction="Yes"]
```

* This code can be added to the 'DetailedPages' (in Google sheet).&#x20;
* This code will call the required functions internally to create the required content on the page.

### Can I bring my own function?

If you have an existing function written in Node/Javascript, we can see to port this code and set this up for you.&#x20;

If you don't have a function/code, we can build required function for you. Note that you will still need to provide us required information, input, output, API information to build this function.&#x20;

### Does this cost?

Yes. This is an advanced feature and is a separate add-on. Please check with support to set this up for you.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.siteoly.com/advanced/bring-your-own-code-for-dynamic-content-in-detailed-pages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
