Skip to main content
Hello everyone,

I would like to ask how to handle this payload going to SF.

{

  "WebhookId": "1152",

  "MessageId": "79bfa6ba-b350-415f-ae29-8b98bc534b98",

  "To": "+11111111111",

  "From": "+12222222222",

  "Body": "Test Message",

  "Attachments": [],

  "MessageEventType": 1,

  "MessageStatus": 2,

  "Time": "2023-09-01T17:08:43.3133"

}

Since this is a webhook I do not have control over the fields. Now I'm getting errors for "From" and "Time" fields because it's reserved.

This does not work as well because of how the payload is structured

@HttpPost

    global static String doPost( String requestBodyJson ) {

Map<String, Object> requestBodyMap = (Map<String, Object>)JSON.deserializeUntyped(requestBodyJson);

....

Anyone who has an idea would be greatly appreciated.

Thanks in advance,

Ry

 
1 risposta
0/9000