REST request body with number arguments in JSON

REST request body with number arguments in JSON

Comments

  • Hi, In this documentation page, I see an example to set the Request Body with {} variables which can be set at the flow step. However, all variables in the request body are considered to be STRINGs only. How do I specify the number variable in the request body?

    [url=https://documentation.decisions.com/docs/using-post-method-rest-service-integration]https://documentation.decisions.com/docs/using-post-method-rest-service-integration[/url]

    In my case, the request body looks like this and all 5 variables became STRING in the flow. How do I set a variable to be a NUMBER? Let me know. Thanks.

    [
    {
    "product": {TAS}, [b]ç I want this variable to be a NUMBER[/b]
    "xFormSeqNum": {FormSeqNum}, [b]ç I want this variable to be a NUMBER[/b]
    "userId": {UserId},
    "tenantId": {TenantId},
    "transactionXML": {TransactionXML}
    }
    ]

  • [font=Roboto, Arial, Helvetica, sans-serif]JSON is a string by nature and can be used to create whole objects with JSON Deserialize steps. Its possible to take only certain values from JSON strings however with Get Value From JSON By Name and convert those values to integers with Get Number From String. Ive created a small demo flow showing this concept.[/font]

Sign In or Register to comment.