# Apex Class

Apex class integration actions utilize custom Apex code in Salesforce integrations using 200 OK. This code handles data transformation, validation, or interactions with external systems, offering flexibility to customize integration workflows as needed.

End users can manage responses independently in Apex using the "IICResponseHandler" interface from the 200 OK service. By implementing this interface and overriding the "handle" method, users receive the response as an "ICResponseWrapper" object within their Apex class.

To create a Apex action, select Apex Class as the action type. We can see a template where we can place the logic and utilize .

<figure><img src="https://lh7-us.googleusercontent.com/VWwXgk_wwzla26M_B2pSQFUlZwU6vrns2DGX9def2XnjwaaBM_G4kJnTmMbu-ikKs7mSc2y_45HV8mMRb63hXk6Y0VZb8vSTjZ1NO6Z7s8jDIMBpEpsG0fajQd0Z-L714leiX_WqoPRKDu3_ac19WVA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/Ha-8bZIu8YF6Sx6pHUP1X-a68mNJvYP3OfML6PmTCk8y0TWUUBbaWnuyTfBxc9Jh_OAkOSFuxkeY7tXhQxsCejqkMzKljaWNnQRzGSDgsEPdU_ciwiv35D4ri2B0NTt-BFEboMPebysxXcCRORFz6cc" alt=""><figcaption></figcaption></figure>

**Let us go with an example :-**&#x20;

**Example:-**

In this example, the ‘ResponseHandler’ class implements ‘IICResponseHandler’ to process responses by extracting weather data using methods from ‘ICResponseWrapper’' and further processing it (e.g., storing in Salesforce).

**Custom Class Example:**

<figure><img src="https://lh7-us.googleusercontent.com/Ow40B49A_hQqg6W2-jaJY0GE8U6j-9iYxCzgNBmFn30ofcS9tZpOFPoV_bk-_hx4ZOZku7daOsPQ8VUYGdu2XXFU0fQBwl-C6QeKtwJPtJAy9IwArZb41T0Y-VuIYxCXFG5xV03DgHX5AQt4s3pid3s" alt=""><figcaption></figcaption></figure>

Now select the custom class which you have created and execute the Integration channel. Here the custom class will also be executed.

After completion of selecting the class click on the save .

After saving execute the channel, once the channel is executed a log will be generated with detailed as shown in the below.

**Logs :**&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/_CHkZe9VyZTGXINBBq0UTlRGlZsQ14K5nbaqLjXwP7hZyinYpfMMMBUh9i1lRtqutf7eDZ2Nbg1J_WGmOzjtOYzESpW9Wg2BpJ2jrwTS9UvXUTChFWkWOyWb_KzSZyojr-C1YMDGexLZNhw9I2BBqzo" alt=""><figcaption></figcaption></figure>

<br>


---

# 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://200ok.gitbook.io/200ok-documents/user-manual/integration-actions/apex-class.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.
