In this project we will first send an Invoice via E-mail or SMS with an unique Payment URL. If the Payment is Succesfull within 8 days, a Trigger will be sent to the Inventory to ship the product. We used the Payment URL from DigiAccept, the Print, E-mail and SMS-platform are from AddComm.
The data is sent from a online ordersystem which sends the data in realtime once an order is placed. The following data is sent
Create a DigiAccept Link
DigiAccept is an Online Payment Platform in the Netherlands. It generates a unique transaction page where users can pay via various online payment methods. DigiAccept is available in the platform’s MarketPlace and is included with a Webhook. This Webhook can send realtime statusses from DigiAccept platform to your flow. This way you can control when a user clicks on the payment link or when a payment is succesful.
To create an unique Payment URL in DigiAccept you have to send some variables, because the App is already configured in Setup > Apps > DigiAccept you only have to fill in some fields in the Flow. In this case we are using the fields
The incoming data is saved in the Data Schema. The
url is saved on
@data.client.transaction_url@ and the
transactionid is saved on
@data.client.transaction_uid@. The URL will be used in the E-mail or Text Message (SMS), the TransactionId will be used for the Webhook.
Decision: Has E-mail? Do you have an email?
This Decision checks if the field
empty or not. Depending on the result, the flow will continue with either a YES to the MegaMail App or a NO directly to the Send SMS.
This App is available in the platform’s MarketPlace and is included with a Webhook. The settings of the App are already configured in Setup > App > MegaMail.
Within the settings of the App you can Select the HTML content you want to use. This is content witch is created in the platform (Build > Content).
The rest of the information can be filled in as a variable or a fixed value. In this case only the
data.client.email are used.
MegaMail Status (Webhook)
The MegaMail Webhooks receives realtime the status of an e-mail. In this Webhook you can restart the Flow on the following status: Was the e-mail sent? Was the e-mail opened? Was the e-mail signed? or D
id the e-mail bounce?
In this case we selected if the e-mail did bounce?
A Webhook needs to be set before or directly after a Scheduler
The Webhook will be set active to listen to the realtime status updates from the MegaMail platform untill the Scheduler expires. If you set the Webhook without the Scheduler, the record will run to the End of the Flow and will not be active anymore.
Once the Webhook receives the Status bounce, the Flow will restart directly (realtime) from the point of the Webhook in the direction of the YES.
Once there is once e-mailaddress in the data or the e-mail bounces the Send SMS App will be triggered.
The Send SMS App is already configured with the required username and password. In the Flow you only have to fill in the To, Message and Sender. We know there is a mobile number because the Decision: Has Mobile? had already determined that, so we are using that same variable
@data.client.mobile@ as the To. The body of the SMS is the Message within the body you can also use a variable, in this case
@data.client.name@. This App allows you to fill in a phonenumber or a name into the Sender field. Also the Payment URL (
@data.client.transaction_url@) can be used in the Text Message.
Transaction Status (Webhook)
This Webhook is linked to the Create DigiAccept App. This Webhook receives the status of the Payment, this can be Payment Clicked (The URL was visited) or Payment Success (The Payment was successfull).
The Webhook is set acvtive untill the Scheduler expires, in this cases there are two Webhooks set active (MegaMail Status and Transaction Status). The one where the set status is set first will be triggered first. But in case the e-mail bounces a text messages will be send, after that only the Transaction Status Webhook will be active.
When the status of the Transaction is “Payment Success” before the Scheduler expires the Flow will restart and the App Inventory Service will start.
This is a Custom App created to Trigger a self-build Invertory System of the user. Once the data
@data.client.productid.productid@ in combination with
@data.client.email@ is sent, the Invetory System will be responsible for the Shipment of the ordered and paid product.
Move to Flow
Once the Inventory System is Triggered and the Product will be shipped, we move the data-record to another Flow where it will get a new offer and promotion on a certain time in the future. This depends on the Scheduler in the other Flow.
It is important to set a Scheduler in combination with a Webhook. Now the Flow knows how long it has to keep the Webhook listener active.This gives the receiver of the E-mail of Text Messages to Pay the invoice via the Payment URL. This Scheduler is set on 8 day since the start of the Flow. Once the time is passed the Flow continues and the Webhooks will be set to inactive.
Depending on the data the Flow is communicating through either E-mail or Text Messaging and will be waiting for 8 days untill there is a succesfull payment. If there isn’t one, the Flow will restart and sent an printed letter.