How to create an order confirmation process

Avatar

By Alina Panaite

updated about 1 month ago

If you already created your first process following the steps in Demo - creating your first process flow💪🏼 article, you are ready to explore more.

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. Everytime 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 require creation of 2 connection configurations in the Credentials Manager.

Let's build this process! The process flow created will look like this:

1. Create 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 last step of the configuration, i.e. "Details". 

For this demo we have created a connection to a Gmail server; check GMail documentation

You can create also create and use a connection to any email outgoing server (check Yahoo or SendGrid connection documentation).

See below how the email server configuration for sending out emails from Gmail account is configured (add your Gmail username & password):


 You can "Test connection" to see if you completed the setting correctly. If the test is successful, click Save to save this configuration. We will use this configuration in setting up the SendEmail action.

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.

3. Create a new process: Go to Process Designer section and click on "Create New" button. This will take you to the canvas where you will build the flow.

4. Add Send Email and Call API actions on canvas and connect them by dragging relations between all the actions. 

5. Creating 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 Topbar to start creating the variables needed for this process. Click "Add Variable". You need to define variables as follows:


6. Configure SendEmail action. Click on it and the properties panel will open. You can rename it from Send Email to Email - order confirmed. 

Select email server configuration created in step 1.

Click on Send Email card to proceed 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 here the display name to be anything we want. I’ll use “Shop Name”.
  • The To: customer email variable.
  • The Subject: <%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 to be the invoice variable created earlier.

7. Configure 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 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 as there are mentioned the method name, parametres needed, etc. 

We’ll select the verb POST. As you can see here the URL is pre-filled. 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 needed query parameters:

  • to: customerPhone variable
  • body: customerName, your order orderId (variable)has been confirmed. Thank you for your purchase!
  • sender: 4 (as pers SMSO REST API documentation, you'll need to set it).
  • Status output to the smsOutput variable.
  • Save changes

Use "Activate multi line Editing" option to expand the editor:


8. Save the process. Validate the process. Run the process.

Fill in the values for the input variables declared and hit run:

Once process completes running, a notification will appear. Click on "Check instances" button to view the details at 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.


Related links

Working with Process Variables

Working with Data Types

Send Email action

Call API action

Running a process

Working with Credentials Manager

Did this answer your question?