Wednesday, March 25, 2020

#760 - OIC - FastConnect & VPN --> compelling post from Jack Desai




















read all about what is possible today here

go raibh mile maith agat, Jack!

Thursday, March 19, 2020

#759 OIC -->Processing an Incident in ServiceNow

One thing that hit me on logging in to ServiceNow was the plethora of functionality on offer.

Introduction to the ServiceNow adapter


ServiceNow provides platform-as-a-service (PaaS) enterprise service management
software for human resources, law, facilities management, finance, marketing, and
field operations. ServiceNow specializes in IT service management (ITSM)
applications and automates common business processes. ServiceNow contains a
number of modular applications that can vary by instance and user.

ServiceNow contains many modules/plugins and our adapter gives you access to the following -


























However, I have no time for delving into its intricacies. I need to provide my mobile developer with an easy way to create/update an Incident in ServiceNow.

And, being the Irishman that I am, that I will do.

As usual, quotes from the OraDocs in italics.

First step - create a ServiceNow connection in OIC.

Create ServiceNow Connection













... is again the best approach here.

There are pre-requisites one needs to complete on the ServiceNow side for this to work.

The ServiceNow adapter doc is here

So which pre-reqs are we talking about?

1. a ServiceNow user, I will leverage the admin user here. However, you can, of course, create a dedicated integration user.

2. this user needs to have the default SOAP role assigned.
This role has access to the following - 

























ServiceNow can can either be a trigger or an invoke from an OIC perspective.

For invoke, one needs to do the following -




















This is easy to do in ServiceNow -















































So I do this for all of the aforementioned tables.


For the Trigger -

















same modus operandi.

Now I need to -

Create or modify the access control list to assign permissions for the preceding tables.

The admin user must have security_admin privileges to modify the
access control lists.















I now search for Access Control and then create the required ACLs -









Again, we differentiate between the Invoke and Trigger tables -

The Invoke Tables are -















For each of the above - create a new ACL for each table, specifying the read operation.
You can also assign a role - in my case, admin.







Note - one sets the field value to *
























Now to the Trigger tables -















Essentially the same modus operandi, bu this time I select the create operation.

























Now to the actual OIC connection -


















OIC Integration - Create Incident


A very simple example here - I create an integration with a REST Trigger.
The Request has 1 field - incidentDescription 



















Now to the ServiceNow Invoke -































The Invoke Request mapping -














The Integration Response mapping -













I activate the integration and then test it, via Postman -

















I check out the Incident in ServiceNow -











The following is an excellent feature in ServiceNow -

















































The Incident Id is sys_id.


OIC Integration - Update Incident


Now let's use this for updating an integration -

































Now I want to update my Incident, adding details such as setting -

Urgency = high
State = In Progress





















Again I use the Show xml functionality to work out what to enter here -

The State value is now = 2
















New = 1 etc.











Urgency = 1, 2 or 3.

Now to the Caller -












thanks to the ServiceNow Community website for the above description.

I created a user for myself and got the caller_id from the Show xml function.

I map as follows - note, I am only showing the mapped fields at the target.











I activate the "update" integration and then test -

Firstly, create the Incident -

















I check it out in ServiceNow -




















I test the "update" integration -










I return to ServiceNow -




















OIC Integration - Delete Incident



























Integration Response mapping -














Test -
























That's one way of solving the Riot in the Hare of the Dog Reading Room!

OIC - THE Cloud Integration Platform



Tuesday, March 17, 2020

#758 - OIC --> Netsuite adapter - processing Customers

simple example - let's start by creating a customer -


I'm not a Netsuite expert - so I begin by creating a Customer in Netsuite -



















Ok, now I've seen the mandatory fields -

So now off to OIC -

I create a simple REST based integration that leverages the Netsuite adapter to create a customer in Netsuite.






















Now to the mapping - The Netsuite target has many fields
However, I only map 2













I activate the integration and test -















I check out Customers in Netsuite -

















But didn't I enter an invalid Subsidiary - MySub?

Note how it defaults to my Subsidiary -i.e. my Netsuite user is a member of this group.




















So what does the response from Netsuite look like?





















I map this to my REST response -














Here is my test Request/Response





















Only salient data is the InternalId - 10174.
The Internal ID is a unique integer number that is typically called the Table’s Primary Key. 
That integer never changes for the life of the record.

The External ID is an id you can set yourself. For example, if customer was synced with SFDC, this could be the SFDC Id.



I can, of course, use the InternalId to retrieve the customer from Netsuite -

































The response from Netsuite is as follows -

























I add some more data to my customer in Netsuite -


Here is the OIC response mapping - here I only show mapped fields -














I now test the GET -


Update customer is very easy -

Key again is the Netsuite Internal Id -

I set the comments field to updated by OIC
































I validate in Netsuite -















Let's look at Delete -





















Same modus operandi -










I test, btw. my integration does a Get, Update, Delete of Customer -
hence the return getCustomer.

Everything seems to have completed successfully -


























However, the customer - Commiskey Brewing -  is still in Netsuite -












I now check in the Web Services log of Netsuite -







Note - the delete failed -

I can view the error -

















Quite correct - I have the dependent Contact.

So how can I catch this error in OIC?

The response from DeleteCustomer is as follows -

























Note we have 2 status sections.
The topmost is for the technical result - e.g. If there was a SOAP error, that would be highlighted here.

The section status section under CustomerRef is what we are interested in.

I map those fields to my response -

















I test and get the following response -










Makes sense, Customer has dependent Contacts.

So I add the following process logic to my integration -













Essentially I do a get on Customers - I pass in the InternalId so I will only get one Customer returned. I then loop over the Contacts for the Customer, deleting them.

Finally, I delete the Customer (again).









I activate and test - then check out Netsuite for Commiskey - Brewing -

I check out the Netsuite SOAP Services log -

As you can see, the first delete failed.
Then I did a getList on Customer
Then a deleteList on Contact(s)
Then a deleteList on Customer.

All of which FINISHED successfully.




OIC is so Easy!