Create Specific Payload for Workflow Extension

SOLVE
mgoswick
Contributor

Our team is trying to build out a workflow extension to post to an API endpoint. One issue we've run into is that the Workflow Extensions posts the data in a way that includes extra information and is not structured in a way the API endpoint is expecting it. Is there a way to adjust the actual body of the Workflow Extension post to have the data properly structered for the send (included having nested items)?

 

Expected Format:

{
  "identifier": "test@example.com",
  "test": true,
  "requestInformation": "Very Long String",
  "purposes": [
  {
    "Id": "96bd1d28-8205-40b9-ab54-9ccbb7a05d9a"
  }
  ]
}


Actual Format: 

"origin": {
      "portalId": XXXXXX,
      "actionDefinitionId": XXXX,
      "actionDefinitionVersion": 1,
      "extensionDefinitionId": XXXX,
      "extensionDefinitionVersionId": 1
    },
    "context": {
      "source": "WORKFLOWS",
      "workflowId": 39528560
    },
    "object": {
      "objectId": 145269551,
      "objectType": "CONTACT"
    },
    "fields": {
      "identifier": "test@example.com",
      "test": "true",
      "requestInformation": "Very Long String",
      "purposes": "[{ Id: 96bd1d28-8205-40b9-ab54-9ccbb7a05d9a}]"
    },
    "callbackId": "ap-XXXXXX-XXXXXXXXX-7-0",
    "inputFields": {
      "identifier": "test@example.com",
      "test": "true",
      "requestInformation": "Very Long String",
      "purposes": "[{ Id: 96bd1d28-8205-40b9-ab54-9ccbb7a05d9a}]"
    }
  }

 

1 Accepted solution

Accepted Solutions
dennisedson
Solution
Community Manager

hi @mgoswick ,

Sorry for the slow response.  The payload cannot be manipulated.  If you have suggestions on updating this, you should add it to the Ideas board

 

Hopefully, you have worked something out!

 

Thanks,  

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content

View solution in original post

0 Upvotes
1 Reply 1
dennisedson
Solution
Community Manager

hi @mgoswick ,

Sorry for the slow response.  The payload cannot be manipulated.  If you have suggestions on updating this, you should add it to the Ideas board

 

Hopefully, you have worked something out!

 

Thanks,  

 

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content

View solution in original post

0 Upvotes