# Codeblock

ReplyCX provides **‘Codeblock’** action block, a powerful tool allowing custom functions to be quickly integrated into projects for optimized performance.

Some ways on how it can be used are:

* Fetching data from databases and rendering them dynamically as buttons, or carousels.
* Integrations with third-party systems.

### Setting up the codeblock:

1. Add the action block on the canvas by clicking on **'+'.**

   <figure><img src="https://1047404187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeyvV4WfyYBGZdBoAuetg%2Fuploads%2Fw8GfOlyVK4XYPn9M0cJD%2Fimage.png?alt=media&#x26;token=06389160-7e99-4165-b48a-dec6816fe558" alt=""><figcaption></figcaption></figure>
2. Search for **'Codeblock'** and select it.

   <figure><img src="https://1047404187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeyvV4WfyYBGZdBoAuetg%2Fuploads%2FfESPe7NuwERxmlTJVXNC%2Fimage.png?alt=media&#x26;token=78b727cb-8188-4515-9861-36f2652d0cab" alt=""><figcaption></figcaption></figure>
3. Configuration on the right panel.<br>

   Click on **‘Codeblock 1’** to open the configuration panel opens on right side of the screen.

   \
   **Define the function:**

   \
   You can either use the existing functions or create a new function using code (JSON format)\
   in the provided space. You can magnify the code space as well by clicking on **'enlarge'** icon\
   at the top right corner.

   <figure><img src="https://1047404187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeyvV4WfyYBGZdBoAuetg%2Fuploads%2FpjBdIhZnDIzTR0nfTpaT%2Fimage.png?alt=media&#x26;token=d466d728-7fdc-4d8b-b298-dae8fea2745c" alt=""><figcaption></figcaption></figure>
