{
    "componentChunkName": "component---src-templates-article-page-template-js",
    "path": "/how-to/edit-transaction-process-with-flex-cli/",
    "result": {"data":{"markdownRemark":{"frontmatter":{"title":"Edit transaction process with Flex CLI","slug":"edit-transaction-process-with-flex-cli","updated":"2021-12-23T00:00:00.000Z","category":"how-to-transaction-process","ingress":"This tutorial shows you how to edit transaction process with Flex CLI. You will learn how to pull process definition, make a small change to it and push the change.","skills":"basic command line, text editing"},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Flex CLI (Command-line interface) is a tool for changing your\nmarketplace's configurations such as transaction processes and email\ntemplates."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This tutorial expects that you have already installed Flex CLI and are\nlogged in with your API key. It's recommended to first read the tutorial\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/introduction/getting-started-with-flex-cli/"},"children":[{"type":"text","value":"Getting started with Flex CLI"}]},{"type":"text","value":".\nIf you haven't read\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/transaction-process/"},"children":[{"type":"text","value":"how transaction processes work in Flex"}]},{"type":"text","value":",\nit's a good idea to do that before starting this tutorial."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In this tutorial we extend the marketplace review period. After we've\nmade the change, we'll push the updated transaction process version and\nupdate the existing alias. If you want to create a new transaction\nprocess based on an existing one instead, you can follow these\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/tutorial/create-transaction-process/#create-a-new-process"},"children":[{"type":"text","value":"instructions to create a new transaction process and alias"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Let's get started!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"pull-existing-process","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#pull-existing-process","ariaLabel":"pull existing process permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Pull existing process"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"asciinema","properties":{"recording-id":"271991"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The first thing to do is to list all the existing processes with CLI\ncommand "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process list"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Remember to include your marketplace ident to the command with the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--marketplace <marketplace ident here>"}]},{"type":"text","value":" options or the short version\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"-m <your marketplace ident here>"}]},{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process list -m my-marketplace-dev"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"From the list of processes, pick the one that you want to edit. In this\ntutorial we'll use process "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"preauth-with-nightly-booking"}]},{"type":"text","value":", version 1.\nYou probably have different processes in your marketplace, you could use\nthose. However, you can check the content of this \"nightly booking\"\nexample process online from\n"},{"type":"element","tagName":"a","properties":{"href":"https://github.com/sharetribe/example-processes","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"Flex example processes"}]},{"type":"text","value":"\nGithub repository."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We can pull the process with the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process pull"}]},{"type":"text","value":" command. Let's see the\noptions that the command needs:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli "},{"type":"element","tagName":"span","properties":{"className":["token","builtin","class-name"]},"children":[{"type":"text","value":"help"}]},{"type":"text","value":" process pull"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We can see that required options are:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--path"}]},{"type":"text","value":" the path where the process is saved"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--process"}]},{"type":"text","value":" name of the process"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--version"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--alias"}]},{"type":"text","value":". Process version or alias pointing to the\nversion that we want to pull"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--marketplace"}]},{"type":"text","value":" the marketplace"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Pull the process and save it to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process"}]},{"type":"text","value":" directory:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process pull --process preauth-with-nightly-booking --version "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":" --path process -m my-marketplace-dev"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"See what's inside the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process"}]},{"type":"text","value":" directory:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"ls"}]},{"type":"text","value":" process"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"(Windows users: use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"dir"}]},{"type":"text","value":" instead of "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ls"}]},{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can see that there are two items in the directory:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file, which defines the transaction process"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"templates"}]},{"type":"text","value":" directory, which contains all the transaction email\ntemplates for this process"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Next, we're going to edit the process description, but before that..."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"a-word-about-edn-format","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#a-word-about-edn-format","ariaLabel":"a word about edn format permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"A word about edn format"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The process description uses a format called "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"edn"}]},{"type":"text","value":". At first glance it\nmay seem a bit odd if you haven't seen edn before, but fear not! On\ncloser look you'll recognize many similarities with JSON format."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here's a small example of edn:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"clojure"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-clojure"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-clojure"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; This is a comment. Comments in edn start with \";;\""}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";;"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":number"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; a number, for example `1`, `2.2`, `-500`, `1.23456M`"}]},{"type":"text","value":"\n           "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; (where `M` denotes that exact precision is desired)"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":string"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"This is a string\""}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":boolean"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"true"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; or false"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":keyword"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":this-is-a-keyword"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":namespaced-keyword"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":namespaced/keyword"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":vector"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"1"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"abc\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","boolean"]},"children":[{"type":"text","value":"false"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; same as \"array\" in JSON"}]},{"type":"text","value":"\n "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":map"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":first-name"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"John\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"\n       "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":last-name"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"Doe\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"\n       "},{"type":"element","tagName":"span","properties":{"className":["token","symbol"]},"children":[{"type":"text","value":":age"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"55"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":";; same as \"object\" in JSON"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Keywords are used heavily in the process description syntax as keys in\nmaps as well as enum values. Keywords start with a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":"}]},{"type":"text","value":" but are otherwise\nsimilar to strings. Keywords can have a namespace, in which case they\nare called qualified keywords, or be plain (unqualified). The part\nbefore "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/"}]},{"type":"text","value":" is the namespace. So for example, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":actor.role/customer"}]},{"type":"text","value":" is a\nkeyword in the namespace "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"actor.role"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Commas ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":","}]},{"type":"text","value":") in edn are optional and often omitted, but can be used for\nclarity."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now that you know the basics of the edn format, let's edit the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"extend-the-review-period","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#extend-the-review-period","ariaLabel":"extend the review period permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Extend the review period"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Open the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" in your favorite editor."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"(To get proper syntax highlighing, you may need to install a plugin to\nyour editor. edn is subset of Clojure, so a Clojure plugin will give you\nproper edn highlighting.)"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"From the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file, you'll find a map with a key\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":transitions"}]},{"type":"text","value":". The value of the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":transitions"}]},{"type":"text","value":" key is a vector of\ntransition in your marketplace. Each transition contains values for keys\nlike "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":name"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":actor"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":actions"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":to"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":from"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To extend the review period in the transaction process, we need to find\nthe transition where the review periods are defined. In the Flex default\nprocesses, the review period length is defined in the transition\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":transition/expire-review-period"}]},{"type":"text","value":", and if one participant has already\nreviewed the other, in either\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":transition/expire-provider-review-period"}]},{"type":"text","value":" or\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":transition/expire-customer-review-period"}]},{"type":"text","value":". By default, the review\nperiods are defined as 7 days."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When you have found the transitions, change the value of the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":fn/period"}]},{"type":"text","value":" in the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":at"}]},{"type":"text","value":" time expression to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"[\"P10D\"]"}]},{"type":"text","value":" to extend the\nreview period to 10 days."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"diff"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-diff"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-diff"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","unchanged"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"{:format :v3\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":" :transitions\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":" [{:name :transition/enquire,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"   ...\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":" {:name :transition/expire-review-period,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :at\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  {:fn/plus\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","deleted-sign","deleted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","deleted"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P7D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","inserted-sign","inserted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","inserted"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P10D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","unchanged"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :actions [],\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :from :state/delivered,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :to :state/reviewed}\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":" {:name :transition/expire-provider-review-period,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :at\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  {:fn/plus\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","deleted-sign","deleted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","deleted"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P7D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","inserted-sign","inserted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","inserted"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P10D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","unchanged"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :actions [{:name :action/publish-reviews}],\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :from :state/reviewed-by-customer,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :to :state/reviewed}\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":" {:name :transition/expire-customer-review-period,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :at\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  {:fn/plus\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","deleted-sign","deleted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","deleted"]},"children":[{"type":"text","value":"-"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P7D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","inserted-sign","inserted"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","inserted"]},"children":[{"type":"text","value":"+"}]},{"type":"text","value":"    [{:fn/timepoint [:time/booking-end]} {:fn/period [\"P10D\"]}]},\n"}]},{"type":"element","tagName":"span","properties":{"className":["token","unchanged"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :actions [{:name :action/publish-reviews}],\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :from :state/reviewed-by-provider,\n"},{"type":"element","tagName":"span","properties":{"className":["token","prefix","unchanged"]},"children":[{"type":"text","value":" "}]},{"type":"text","value":"  :to :state/reviewed}"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Save the changes you've made to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"validate-and-push-the-process","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#validate-and-push-the-process","ariaLabel":"validate and push the process permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Validate and push the process"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"asciinema","properties":{"recording-id":"272227"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After each modification to the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file, it's good idea to\nvalidate that the changes are correct. The CLI command "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process"}]},{"type":"text","value":" can do\nthis:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process --path process"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In case the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file is valid, you'll see a description of\nyour process with all the states, transitions and notifications listed.\nIn case the file is invalid, you'll see a validation error."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Now that we have validated the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process.edn"}]},{"type":"text","value":" file we are ready to push\nthe changes to Flex:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process push --path process --process preauth-with-nightly-booking -m my-marketplace-dev"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After the process is successfully pushed, you'll see a new process\nversion in\n"},{"type":"element","tagName":"a","properties":{"href":"https://flex-console.sharetribe.com/transaction-processes","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"Console"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Please note that pushing the changes to Flex doesn't immediately change\nthe way how your marketplace works. The existing transactions are still\nusing the old process version and the new transaction will be using the\nold process as long as the existing alias is pointing to it."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, to take the changes into use, let's update the alias!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"update-alias","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#update-alias","ariaLabel":"update alias permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Update alias"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"asciinema","properties":{"recording-id":"272229"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"First, let's see what aliases are pointing to which versions. We can do\nthis by using the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process list"}]},{"type":"text","value":" command with the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--process"}]},{"type":"text","value":" option:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process list --process preauth-with-nightly-booking -m my-marketplace-dev"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You'll see a list of process versions and aliases pointing to them. The\nalias always consists of two parts where the first part is the process\nname and the second part is the alias name."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You'll also see that the newly created version doesn't have an alias\npointing to it. Let's change that."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the default process, the name of the existing alias is "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"release-1"}]},{"type":"text","value":".\nThe command to update the alias is "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process update-alias"}]},{"type":"text","value":":"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"flex-cli process update-alias --process preauth-with-nightly-booking --alias release-1 --version "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"2"}]},{"type":"text","value":" -m my-marketplace-dev"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This command updates the alias "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"release-1"}]},{"type":"text","value":" to point to\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"preauth-with-nightly-booking"}]},{"type":"text","value":" process version "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To verify that the change was successful, you can rerun the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"process list"}]},{"type":"text","value":" command and see that the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"release-1"}]},{"type":"text","value":" alias is now\npointing to the version 2."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Be careful when updating aliases!"}]},{"type":"text","value":" Updating the alias will take the\nprocess changes in use immediately. In case you make changes where you\nadd/remove/rename states or transitions, updating alias may potentially\nbreak your marketplace front-end if you haven't updated it to work with\nthe new process."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The review period has now been changed! Next time you initiate a new\ntransaction with the alias "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"preauth-with-booking/release-1"}]},{"type":"text","value":" the review\nperiod is 10 days."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"summary","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#summary","ariaLabel":"summary permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Summary"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In this tutorial we pulled an existing process definition with the Flex\nCLI. We extended the review period to 10 days, validated the process\nfile and pushed it back to Flex. Finally, we updated the alias to point\nto the new version."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You know now how to make simple modifications to the process. Have a\nlook at the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/references/transaction-process-format/"},"children":[{"type":"text","value":"transaction process format"}]},{"type":"text","value":"\nreference and the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/references/transaction-process-actions/"},"children":[{"type":"text","value":"transaction process actions"}]},{"type":"text","value":"\nreference to read about all the possibilities that transaction process\nengine gives to you."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"As a next step, you may also to edit the transaction email templates.\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/how-to/edit-email-templates-with-flex-cli/"},"children":[{"type":"text","value":"Editing email templates with Flex CLI"}]},{"type":"text","value":"\ntutorial guides you through this process."}]}],"data":{"quirksMode":false}},"headings":[{"value":"Pull existing process","depth":2},{"value":"A word about edn format","depth":2},{"value":"Extend the review period","depth":2},{"value":"Validate and push the process","depth":2},{"value":"Update alias","depth":2},{"value":"Summary","depth":2}]}},"pageContext":{"slug":"edit-transaction-process-with-flex-cli","category":"how-to-transaction-process"}},
    "staticQueryHashes": ["3794076007","439097193","717698143"]}