No Results
Using Custom JavaScript in the Request of Web Data Feed

JavaScript and moment.js library are available to the request body field if custom expressions are used. As a result, administrators are able to use custom JavaScript code which will be evaluated in feed runtime, perform calculations, get date and transform it, or do anything JavaScript can do.


We have created a Web data connection and a Custom feed off of it. We need to use the current timestamp in the POST request body and query the date for endDate = and startDate = – 24h.

To do this, we are going to click the expression icon (>_) and enter the following in the request body:

{"startDate":"{, "days").format()}","endDate":"{}"} 

We already had some parameters in the request, and after adding startDate and endDate, this is what the request looks like:

{"comments": "", "customermail": "", "customername": "johndoe", "customerphone": "6926272626", "startDate":"{, "days").format()}","endDate":"{}"}

Terms | Privacy