Wednesday, February 9, 2022

#901- OIC & Simphony - Ordering the Pizza

The previous post ended with us displaying the menu to the user. Now for the next step - placing the order with Simphony.

Starting point is the Simphony Postman collection - 

Let's check out the request payload - 

Most of the fields are self-explanatory - 

We have the usual Simphony hierarchy then the orderTypeRef - this can be set to one of the following - 

then we have the checkEmployeeRef - just think of a server taking orders on their hand held devices in a restaurant. Each order will be associated with that server.

I assume we will use a generic "employee" for this use case.

Next the menu items section where we can specify our pizza.

note the extensions options - printInKitchen etc. - so our pizza baker, Jimmy, gets the order. 

Now to OIC - 

Creating the PlaceOrder Integration

Here is is - 

The Rest Trigger is configured as follows - 

PlaceOrder (the Simphony Invoke) is configured as follows - 

Mapping leverages an OIC Lookup for many field values - 

Here is the Lookup - 

I also have a Notification Action to email the customer, once the order has been placed. 

Now to testing - 

I check my email - 

Now to invoking this integration from Visual Builder -  

Visual Builder - App Configuration

Step 1 is to import the integration definition - 

I've added a couple of fields and the Place Order button to the VB page - 

I create the button event and configure as follows -

do the mapping - 

Order Completes - 

Final step is to return the check number from the Simphony response -

I order another pizza - who's going to eat all of these?

and the checkNr/orderNr is surfaced. 

No comments: