JSON data type not available in Send HTTP Request (Workflows, advanced pack)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rinorway
    Senior Member
    • Feb 2016
    • 179

    JSON data type not available in Send HTTP Request (Workflows, advanced pack)

    My workflow tries to fetch the updates of fields and push them to an external auditing system.

    The field updates of audited fields are stored in the data field as JSON in the NOTE entity.

    Updates look like

    {"fields":["salutationName"],"attributes":{"was":{"salutationName":""},"bec ame ":{"salutationName":"Mr."}}}

    The data attribute in NOTE is of type JSON_OBJECT.

    When I try to get this attribute, it will not pass it correctly to the Send HTTP Request action.

    Instead, it will actually post literally : {$data}

    What am I missing here? Can somebody confirm this behaviour?
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    This won't work I believe as the data attribute contains stdClass rather than a string.

    With the new json\encode and object functions in v7.1 it will be possible to compose json payloads. You will need to call the json\encode function and store the results into a variable. Then use the variable {$$variable} in the Send HTTP Request action.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...