Demos

How to create an order confirmation process

11min
scenario we will create a process flow that can be very useful for every ecommerce platform as it represents one of the steps they need to perform in the end to end selling process every time an order is placed by a customer, they receive confirmation details via email/sms this will be a basic scenario where procesio can help you with sending the confirmation email and sms to the customer, together with the invoice and order details before you get started by the end of the process creation, we will configure a configuration to an email server that will be used to send the email a configuration to a rest api of an web to sms service the above requires the creation of 2 connection configurations in the credentials manager let's build this process! the process flow created will look like this create the credentials step 1 create the email server configuration go to credentials manager section and click on add new button this will take you to the basic info step of the configuration fill in the inputs like below click next step to take you to the next step of the configuration, i e details for this demo we have created a connection to a gmail server, check the gmail documentation you can also create and use a connection to any email server (check yahoo or sendgrid connection documentation) see below how the email server configuration for sending out emails from your gmail account is configured (add your gmail username & app password) click test connection to see if you completed the settings correctly if the test is successful, click save to save this configuration we will use this configuration in setting up the sendemail action step 2 create connection to the web to sms service provider you want to use similar to the email server config, go to credentials manager section to set it up for this demo we used smso's api (check documentation for smso connection ) we will use this api configuration in callapi action create and configure the process step 1 create a new process go to the process designer section and click on the create new button this will take you to the canvas where you will build the flow step 2 add send email and call api actions on canvas and connect them by dragging relations between all the actions step 3 create the process variables as mentioned at the beginning, we want to automate this process and make it pass dynamic data such as customer name, email, order id etc thus, we need to create some process variables within our process flow, which will act as data placeholders while designing the flow at runtime, they will take new values go to process variables (x) in top bar to start creating the variables needed for this process click add variable you need to define variables as follows step 4 configure the sendemail action click on it and the properties panel will open you can rename it from send email to email order confirmed select the email server configuration created in step 1 click on the send email card to proceed to the next steps configure the parameters of the action the from field will set the display name of the sender the actual email address of the sender is the one set in the credential manager, but we can set the display name to be anything we want i’ll use “shop name” the to <%customeremail%> <%customeremail%> variable the subject <%customername%> <%customername%> , your order is now confirmed! the body dear <%customername%>, your order is now confirmed! you have successfully purchased a <%productordered%> kind regards, shop name to open the variables selector in body and add process variables to your message press insert key (for windows) or shift + tab (for macos) the attachment will be the <%invoice%> <%invoice%> variable created earlier step 5 configure the call api action which is the send sms step click on call api action and the properties panel will open you can rename it from call api to send sms select the api configuration created in step 2 click on configure request to proceed next steps for the call api configurations you are going to check the sms provider's api documentation regarding the method name, parameters needed, etc we’ll select the verb post as you can see here the url is prefilled this comes from the rest api credential configuration i just need to specify which method name to use to have a valid endpoint /api/v1/send add the needed query parameters to <% <% customerphone%> variable body <% <% customername%> , your order orderid (variable)has been confirmed thank you for your purchase! sender 4 (as per smso rest api documentation, you'll need to set it) status output will contain the <%smsoutput%> <%smsoutput%> variable save the changes use the activate multi line editing functionality in order to expand the editor step 6 save the process validate the process run the process fill in the values for the input variables declared and press run once the process completes, a notification will appear click on the check instances button to view the details at the process and action level congrats! you have just created a new process flow in procesio! if you encountered any issues while creating this first process flow, please let us know as we are all growing together