Clear or reset mock output

I often need to include a step to look up a record to make sure it doesn’t exist before attempting to create it. In this case, the step returns an empty result which is a good thing and allows the flow to continue and create the record.

Any time I try to clear the mock output or set it to Live Data, it either keeps the existing, stale, mock output or gives an error stating either:

  • `Cast to Embedded failed for value "" (type string) at path "mockOutput" because of "ObjectExpectedError”`

  • `The preview data received from your source does not contain any records. Check your source application or enter your own mock output records.`

    • All mock data records must contain at least one key-value pair.

Is there a way to clear this mock data short of moving or deleting the step? I’m not willing to do either of those.

Hi @drewcossey722 ,

We have a bug logged for this and will be fixing the issue.
In the interim, you can remove the mock output via the API.

You can use GET https://api.integrator.io/v1/exports/:_id to get the JSON document.
Copy the JSON and remove the mockOutput object, then use PUT https://api.integrator.io/v1/exports/:_id to update the document.


Great, thanks. Hopefully that bug is resolved soon.

We use the Pull feature to deploy updates from a development integration to our production integration. Since asking this question, that pull failed due to these mock fields being empty in development but populated in production but it wouldn’t say which export was the issue.

I ended up writing a little NodeJS utility to go through the imports and exports for an integration and clear all of the mockResponse and mockOutput values. Something built in like that on the flow level (or wherever) would also be really useful.

@drewcossey722 - Issue is resolved. You should be able to clear the mock data and save. Thank you.