Friday, June 5, 2020

#773 OIC --> Shopify Adapter now supporting Events

This is a new feature in the Shopify adapter - as the adapter doc now states -

btw. the doc is available here

So how does this work?
You can now select Trigger and Invoke, when creating the Shopify connection -

Now to leveraging this connection as an OIC Trigger -

Order Events -

Customers Events -

Products Events -

So let's try this out - I subscribe to order creation -

The structure of the order can be found documented in the Shopify REST API docs here

All I do, is write this order to an ftp server -

Now I create a new order in Shopify -

Note - this is a draft, so will not be picked up by the OIC subscription.

I now mark this as paid in Shopify -

OIC Integration flow starts -

I check out the file on my ftp server -

Note: I did not map all Shopify order fields.

This makes it very easy to process such orders in downstream apps such as Netsuite.

Now the key fields for syncing orders etc. are the Shopify status fields -

So if I was looking to sync a new Shopify Order with Netsuite, I would be looking for
orders where fulfillment_status = "paid"
Then, if this is a B2B customer, I could create the relevant Sales Order in Netsuite.

Another useful status field - fulfillment_status

Ok, the customer has paid, but has the product been shipped/order fulfilled?
Here you may want to create an ItemFulfillment record in Netsuite.

Naturally, a customer order may contain more than 1 item, e.g. when you order my magnum opus, The Hare of the Dog Vol I, on Amazon, you will also take Vol II and III, correct?

This will need to be reflected in the ItemFulfillment in Netsuite.

Here's another example -

An order for 2 items.

The xml file written to my ftp server -

Notice all 3 fufillmentStatus(one at order level, one for each order line) fields are empty.

I now partially fulfill the order - James gets his Summer Bike.

As luck would have it, I also have an integration that subscribes to order fulfillment.

Note the 2 options in respect of Fulfillment -

I choose Order partial fulfillment -

My output file is as follows -

Note: the fulfillment_status at order level is set to partial.

the fulfillment_status at line item level for the Summer Bike is set to fulfilled.
the fulfillment_status at line item level for the Global Block is empty.

Thursday, June 4, 2020

#772 - OIC --> Date Manipulation

*** This post is more a note for myself, but others may find it useful ***

Simple scenario here -

I have a scheduled job that picks up orders from an eCommerce site.
The getOrders invoke expects 2 parameters - dateFrom and dateTo.

Business rule from customer is -
dateFrom = currentDateTime - 1 day
dateTo = currentDateTime.

So how do we set the dateFrom value?

Simple when you know how - thanks to my colleague Kishore K. here.

currentDateTime is easy.

But what about dateFrom?

I can leverage the following in JDeveloper -

but what about OIC?
The above function is not available but I could try xs:dayTimeDuration
e.g. current-dateTime() - xs:dayTimeDuration('P1D')

So I try this out -

So much for that - now I take a look at the Code view in the Mapper.

So I make this subtle change and it works -

The output is as follows -

However, I need the format - 2020-06-03T12:26:15

So how can I strip off the .109Z ?

Easy -

Result -

Wednesday, June 3, 2020

#771 OIC --> embedding VB CS app in HCM

Very simple example here -

I create a simple Vacation App in my OIC - VB.

Step 1 - create the business object

I set the Security to enable anonymous access -

I create a simple vacation planning UI -

I now need to enable anonymous access in a couple of other places -


Now we go to Oracle HCM Cloud - firstly, I create a Sandbox -

Then I navigate - Configuration - Page Integration

Click on New Page -

Now to position this in the HCM UI -

Move this to another area of the HCM menu -

Next step of course is to ensure SSO with HCM -
For this to work one needs to configure your SaaS system to be federated with your OIC IDCS instance. Once done, all the services you can call will be available in the “service catalog”.
Thanks Angelo S.