I have an autolaunched flow that I'm invoking with a rest api call. Here's the sample code that shows how I call my flow from an express.js server. var _request = { url: '/services/data/v54.0/actions/custom/flow/FlowName', method: 'post', body: JSON.stringify( { inputs: [ param1: value1, param2: value2, ] } ), headers : { "Content-Type" : "application/json" } }; const salesforce = config.getProperty('SalesforceRest'); const conn = new sf.Connection({ loginUrl: salesforce.host }); try { await conn.login(salesforce.userName, salesforce.Password + salesforce.Token); } catch (error) { return res.status(500).send(errorResponse.ServerError(`Salesforce login failure: ${error}`)); } conn.request(_request, function(err, resp) { console.log(resp); }); I'd like to know how to set the statusCode and the response message values in my flow. For example to return a statusCode = 400 and message = 'Missing required value' when my flow runs and finds out there's a missing required value. My flow looks like this: [![enter image description here][1]][1] After checking for required values, if there's one or more missing, I set to variables for the response status code and response message with values that I'd like to be returned as the actual response status code and response message. I've made both of these variables available for output. [![enter image description here][2]][2] [1]: https://i.sstatic.net/d68SD.png [2]: https://i.sstatic.net/AHcTe.png