Legacy Dev Forum Posts

 View Only

Sign Up

Custom action on custom integration: Create sub-objects

  • 1.  Custom action on custom integration: Create sub-objects

    Posted 06-05-2025 18:43

    ogata | 2022-11-07 01:46:54 UTC | #1

    I have created an integration custom action. When adding an input contract, I have created an object with sub-objects.

    { "type": "object", "properties": { "sendTextSms": { "type": "object", "properties": { "address": { "type": "string" }, "senderName": { "type": "string" }, "codingScheme": { "type": "number" }, "message": { "type": "string" } }, "additionalProperties": true } }, "additionalProperties": true }

    But when I saved I got the following error message.

    "Failed Validation of contract.input.inputSchema as a simple properties schema. Must be an Object with properties and no sub-objects. JSON failed schema validation for the following reasons: Schema: # @/properties/properties/patternProperties/^[a-zA-Z][a-zA-Z0-9_-]*$/properties/type. Error location: /properties/sendTextSms/type. instance value ("object") not found in enum (possible values: ["boolean","integer","null","number","string"])"

    Is there a way to create an object with sub-objects?


    Jason_Mathison | 2022-11-15 16:13:20 UTC | #2

    Hi ogeta,

    What you are asking for is not possible: https://help.mypurecloud.com/articles/add-contracts-custom-actions-integrations/

    • The input contract accepts an object with key-value pairs. The key-value pairs are limited to the following data types: string, integer, number, Boolean, null. The input contract does not support nested objects.

    --Jason


    ogata | 2022-11-09 01:35:56 UTC | #3

    Thank you for your response. Problem solved.


    John_Carnell | 2022-11-15 16:13:24 UTC | #4


    This post was migrated from the old Developer Forum.

    ref: 17090