---
schema_version: "1"
id: b544769d8dc9021b9bde479f678bb003948d14ab6b79b9f485e57c6a8462ea0c
title: Create the TestReserializeApex Class
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_the_testreserializeapex_class_54416.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_the_testreserializeapex_class_54416.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fdcffc7011e518ebae14cef743cd1bbb91e6503f2dcd3973dd59e98f2fa16de2
description: Before you can create the Integration Procedure example, you must create the TestReserializeApex Apex class that it calls.
products:
  - Omnistudio
release: "264"
---
# Create the TestReserializeApex Class

Before you can create the Integration Procedure example, you must create the TestReserializeApex Apex class that it calls.

1. From Setup, in the **Quick Find** box, type apex.
2. Click **Apex Classes**.
3. Click **New**.
    
    ![On the Apex Class Edit page, the Apex Class tab is selected and the cursor is at line 1. This is where you paste the code.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/omnistudio/images/apexclassnew.png)
4. Enter the following Apex code in the **Apex Class** tab:
    
    ```
    @JsonAccess(serializable='always')
    global with sharing class TestReserializeApex implements Callable { 
        public Object call(String action, Map<String, Object> args) {
            Map<String, Object> input = (Map<String, Object>)args.get('input');
            Map<String, Object> output = (Map<String, Object>)args.get('output');
            Map<String, Object> options = (Map<String, Object>)args.get('options');
            return invokeMethod(action, input, output, options);
        }
        private Object invokeMethod(String methodName, Map<String,Object> input, 
          Map<String,Object> output, Map<String,Object> options) {        
            return output.put('result', new TestReserialize());    
        }    
        @JsonAccess(serializable='always')
        global class TestReserialize { 
            global String name = 'Dave Smith';    
        }
    }
    ```
    
    Also note the use of the [JsonAccess annotation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_JsonAccess.htm) on the class and method.
5. Click **Save**.

What’s next: [Create the Integration Procedure with the Remote Action](https://help.salesforce.com/s/articleView?id=xcloud.os_create_the_integration_procedure_with_the_remote_action_54464.htm&release=264.0.0&type=5 "An Integration Procedure retrieves and reserializes the value of a name variable from the TestReserializeApex Apex class.").