Mapping Examples
vthese mapping examples are worked examples for each resource type each one is a complete template you can copy and adapt change the field names to match what your consumer expects, keep the merge tags that supply the values, and you have a starting point rather than a blank page how mappings work a mapping is a template describing the payload you want out each value is a merge tag that the endpoint replaces at send time "first name" "<\<first name>>" produces "first name" "ada" list valued tags such as <\<custom fields list|format\ json>> and <\<categories list| >> emit a json array or object inline boolean tags such as <\<cancelled|true\ true,false\ false>> map a true / false value to the text emitted for each case (see value mapping below) you choose the key names the merge tag on the right supplies the value; the key on the left is whatever your consumer expects to receive quoting follow one rule when writing a template tags that emit plain text ( <\<first name>> , <\<email>> , and so on) go inside quotes "email" "<\<email>>" tags that emit a json value ( <\<custom fields list|format\ json>> , <\<categories list| >> ) go without quotes so the value sits inline "custom fields" <\<custom fields list|format\ json>> each article notes which of its tags are plain text and which are json value mapping a | after the tag name introduces options for boolean fields, the true and false options set the text emitted for each case <\<cancelled|true\ true,false\ false>> read this as "if the value is true, emit true; if it is false, emit false " because the tag is wrapped in quotes, the result is the string "true" or "false", not a native boolean the output text is up to you for example, <\<cancelled|true\ yes,false\ no>> emits "yes" or "no" instead this true / false mapping applies only to fields whose value is true or false it is not a general find and replace for arbitrary text fields, and other tags use their own options (for example format\ json) the same true / false options also appear inside the <\<categories list>> tag, where true\ applied , false\ not applied sets the label for whether each category is applied to the person still a per category true/false underneath