0

I have previously created many declarative External Services which work with Flow. Getting

400 UnknownOperationException error

with this. Callout is working fine in Postman which is listed here:

{"HITTypeId": "123456",
     "Active": true,
"Notification":{
    "Destination": "desinationURL"
    "Transport": "SNS",
    "Version": "2014-08-15",
    **"EventTypes":["AssignmentAccepted","HITReviewable"]**
}}

My guess is this error has to do with the EventTypes and declaring an array of text inputs which I've not done in Salesforce before. Salesforce schema is here:

"definitions": {
    "updatenotification": {
        "required": [
            "HITTypeId"
        ],
        "type": "object",
        "description": "Body parameters",
        "properties": {
            "HITTypeId": {
                "description": "HITTypeId",
                "type": "string"
            },
            "Active": {
                "description": "Indicates if notifications for HITType are active",
                "type": "boolean"
            },
            "Notification": {
                "type": "object",
                "properties": {
                    "Destination": {
                        "description": "The destination for notification messages",
                        "type": "string"
                    },
                    "Transport": {
                        "description": "The method Amazon Mechanical Turk uses to send the notification",
                        "type": "string"
                    },
                    "Version": {
                        "description": "The version of the Notification data structure schema to use",
                        "type": "string"
                    },
                    "EventTypes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}

In Flow I'm using a text collection variable for these inputs vs an Sobject Collection variable. When I used Sobject Collection for this it assigns a key input pair to the input which isnt' what I want in this case.

1 Answer 1

0

Problem was more basic and nothing to do with what I thought. I had an incorrect value for part of the header name. Once that was fixed this works as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .