Apex Class
Last updated
Last updated
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 .
Let us go with an example :-
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:
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 :