Search HoldMyTwist

Browse all posts

Make Skip vs Resume: what happens to a failed record?

Compare Skip and Resume using the same three records in Make Free. See which records continue, what a replacement changes, and why a successful run can still miss work.

Two sorting conveyors discard a cracked gold tile or replace it with a pale tile

Skip will cut the bad record out of the rest of the Make scenario. Resume will provide replacement output to continue the record. See Skip (opens in a new tab) and Resume (opens in a new tab) in Make for the explanation. (Skip used to be called Ignore.)

Here's an example of the Free plan using three imaginary product records. The middle one has bad JSON. Try it without an error handler, with Skip and with Resume. Compare what gets to the next Tools module. Now fix the bad input and try again.

Before you start

You need an account on Make first. You can create a Make Free account (opens in a new tab) or log in. Please make sure the scenario is inactive and use Run once. Do not connect to email, a spreadsheet or another app. Every time you run it, you'll use some credits from your plan.

1. Create three practice records

Use the same scenario for records A, B and C. For B, the payload is purposely not-json.

  1. Go to Scenarios and click Create scenario. Call it Skip and Resume practice.
  2. Add the module JSON > Parse JSON. Leave Data structure unset. Copy the whole object below and paste it into JSON string.
  3. Save the module. Save the scenario. Select Run once. If Make gives you a warning that output is not used, select Save anyway (or Run anyway for this isolated exercise).
  4. Open the JSON result bubble. Expand records. Make sure it has A, B and C in there.
  5. After your parser, add Flow Control > Iterator. Take records[] from the first module. Map it into Array. Save the Iterator.
Text to copy

{"records":[{"id":"A","payload":"{\"name\":\"Notebook\"}"},{"id":"B","payload":"not-json"},{"id":"C","payload":"{\"name\":\"Pencil\"}"}]}

Make Parse JSON source with fictional records A, B and C and invalid text in B

Make Parse JSON source with fictional records A, B and C and invalid text in B
Open full-size image

The outer JSON is fine; just B's payload is not valid. So all three records can be loaded by the first parser. Then, you'll get 1 bundle for each record from the Iterator to be parsed by the second parser.

2. Check where the failed record stops

You need 1 more JSON > Parse JSON module after the Iterator. You map the payload of the Iterator to the JSON string field. In Data structure, Add lets you create the structure Practice product name. In Generate, choose JSON as the content type. Use {"name":"Notebook"} as Sample data. Save both structure and module after generation. In the English UI used for the example, the generated text field is named Name.

Make Parse JSON maps the Iterator payload using the Practice product name data structure

Make Parse JSON maps the Iterator payload using the Practice product name data structure
Open full-size image
  1. Set up Tools > Set variable after the second parser. Set Variable name as result.
  2. In Variable value, map id from the Iterator and type ': ' and map Name from the second parser. See the example below, which uses modules 2 and 3. Use the appropriate fields if you have different numbers. They should show up as coloured tokens.
  3. Save it and choose Run once. Make sure the second parser says Source is not valid JSON. Now open the Tools result bubble. There should be only A: Notebook.
Text to copy

{{2.id}}: {{3.name}}

Make Set variable maps the record ID and parsed product name into result

Make Set variable maps the record ID and parsed product name into result
Open full-size image
Only A reaches Tools before an error handler is added.

Make Tools output contains only A: Notebook before the invalid record stops the run

Make Tools output contains only A: Notebook before the invalid record stops the run

Only A reaches Tools before an error handler is added.

Open full-size image

3. Use Skip to drop the bad record

  1. Collapse the result pane.
  2. Right-click on the second JSON module. Choose Add error handler.
  3. Choose Skip.
  4. Save the error handler, then save the scenario.
  5. Choose Run once.
  6. Open the Tools result bubble and expand each Operation.
  7. Check that A: Notebook and C: Pencil are present, with no B.
Skip removes B from this route. A and C reach Tools.

Make Skip workflow shows three parser operations and two Tools operations

Make Skip workflow shows three parser operations and two Tools operations

Skip removes B from this route. A and C reach Tools.

Open full-size image

Watch out

A successful run can still omit a failed record. We need to verify downstream record IDs and effects, besides the run status. The use of Skip makes sense only if we are OK to throw away the failed record.

4. Use Resume to supply a marked replacement

  1. Right-click on the Skip handler and select Delete. Do not remove the JSON modules and Iterator.
  2. Right-click on the second JSON module. Select Add error handler. Choose Resume.
  3. Write REVIEW INPUT into the Name field for Resume. Save the handler. Save the scenario.
Resume supplies REVIEW INPUT in the Name field.

Make Resume configuration supplies REVIEW INPUT in the Name field

Make Resume configuration supplies REVIEW INPUT in the Name field

Resume supplies REVIEW INPUT in the Name field.

Open full-size image
  1. Now choose Run once again, and check all three Tools operations.
  2. Check if you can find A: Notebook, B: REVIEW INPUT and C: Pencil. B has the replacement value from Resume. The original payload is still invalid JSON.
B reaches Tools with REVIEW INPUT. Its original payload still needs review.

Make Tools result for record B is REVIEW INPUT after Resume

Make Tools result for record B is REVIEW INPUT after Resume

B reaches Tools with REVIEW INPUT. Its original payload still needs review.

Open full-size image

Resume supplies REVIEW INPUT as the failed parser's Name output. This means that you can generate B: REVIEW INPUT even if the original B's payload still has not-json. Resume does not do any retries of the failed action or try to fix the original payload.

REVIEW INPUT is a flag that a record should be looked at for review. It needs to be handled safely by any later module that sends messages, takes payments or writes records. This exercise just sets a variable in Tools.

5. Fix the input and run again

  1. Keep B's payload as not-json and run again. Tools should still say B: REVIEW INPUT. Repeating the run doesn't fix the source.
  2. Open the first JSON module and set its input to the following entire corrected object. Now B's payload has a product name, Eraser. Notice that quotation marks are escaped within the outer JSON string.
  3. Save the module and scenario, then choose Run once. Now you should see B: Eraser from B.
  4. Don't activate the scenario. When you run again, it will process the source records again. The error handler doesn't remember which records you've reviewed.
Text to copy

{"records":[{"id":"A","payload":"{\"name\":\"Notebook\"}"},{"id":"B","payload":"{\"name\":\"Eraser\"}"},{"id":"C","payload":"{\"name\":\"Pencil\"}"}]}

After B’s source payload is corrected, Tools shows B: Eraser instead of the replacement marker.

Make Tools result for corrected record B is Eraser

Make Tools result for corrected record B is Eraser

After B’s source payload is corrected, Tools shows B: Eraser instead of the replacement marker.

Open full-size image

If every record must be processed

If you want to process all records, you need to have a way to access failed work. Skip just discards the failed record. Resume needs a safe replacement and a way to inspect the unhandled record. For example, if you have an issue with a known empty field, filtering or using ifempty before the action might help. See Make's missing-data help (opens in a new tab).

For this practice scenario it's just setting a variable. You also need to consider duplicated records on repeated runs before you create or update records. See the Data store duplicate-record guide and Make Free limits.

You can use the fictional records to compare the handlers on Make Free (opens in a new tab). Don't connect any external destinations until you've tested the failed-record, replacement and rerun behaviour.

Sources: Make's Skip, Resume and missing-data guidance linked above. Screenshots show fictional practice data in Make Free.

Share this post