Test data actions for integrations
You can test data actions for the data actions integrations.
- Test draft custom actions for validation or execution errors. For more information, see Create a custom action.
- Test published custom actions for help debugging issues.
- Test static actions to see if the action works as expected with your CRM.
- Test custom auth actions to see what information the action returns. For more information, see How to use the User Defined (OAuth) credential type and Workflow for the User Defined (OAuth) credential type.
- On the Setup page, click the Test tab. For more information, see Manage actions for integrations.
Test runs various operations to check for errors.
- Under Input, select an input mode and enter your test values:
- Simple: Enter information in the fields that appear. These fields are defined in the input contract. For custom actions, if you completed the input contract but no fields appear here, refresh your browser. For more information, see Add contracts to custom actions.
- JSON: Under JSON Input, enter the test input as a JSON object. Use this mode when you need explicit control over how each field is sent, for example to send a field as an empty string or null, or to leave a field out of the request.
- Keep Flatten output selected.
This selection flattens the data returned from the Output Contract. For more information, see Add contracts to custom actions.
Note: Most Genesys Cloud applications use flattened data. - Click Run Action.
The action executes in test mode, which reports test results at each operation. The test stops after the first failure. For more information about failures, see Data action fails during testing.
Note: For Genesys Cloud Function data action, the test returns the last 4 KB of the log files generated byInformation about the AWS Lambda and web services data actions integrations and Google Cloud Functions (1st gen)consolestatement within the code. These logs are available only during the testing phase of the data action.- Running the action hits your AWS Lambda function, your Google Cloud Functions (1st gen), or your external web service.
- The test execution of a data action that calls Google Cloud Functions (1st gen) converts the stringified JSON response to JSON.
- If testing returns errors for items that are correct, such as “Invalid JSON” for correct JSON, the transfer encoding that your web service and Genesys Cloud uses could be incompatible. For more information, see Custom action fails for unexpected reason.

Control how empty values are sent in JSON Input
The JSON input mode that you use determines how the test sends fields that have no value. Actions in production can receive fields in different ways depending on the consumer. Some omit empty fields, send an empty string, and send null. To reproduce a specific request, use JSON mode.
| Field state | Sent in the test request as |
|---|---|
| Simple mode: you never entered a value | The field is omitted |
| Simple mode: you entered a value and then cleared it | Empty string – "" |
JSON mode: the field is set to "" | Empty string – "" |
JSON mode: the field is set to null | null |
| JSON mode: the field is not in the object | The field is omitted |
An empty string "" applies to string fields. For other field types, such as boolean or number, use null or omit the field. If you omit a required field in JSON mode, the test does not run. In JSON mode, line breaks in string values appear as \n. The test sends the line breaks as entered.
You can enter your values in Simple mode and then click JSON. The JSON view shows the request exactly as the test sends it, including any fields that you cleared, which appear as "".
For more information, see About custom actions for integrations and How many seconds before a data action times out?
For more information about the integrations, see About the data actions integrations.
[NEXT] Was this article helpful?
Get user feedback about articles.