Updating Infor Public Sector Records

Christian Berger
Christian Berger
  • Updated

FME Version

Introduction

Integrate the Infor Public Sector (IPS) platform directly into your FME workflows to achieve seamless communication between applications. By establishing a connection to Infor’s REST API, you can facilitate the flow of information and design responsive workflows. If you have not already set up your Infor Web Connection, please refer to the Connecting to Infor in FME before proceeding.

In this example, you will learn the basics of how to update records using the InforRecordUpdater
 

Step-by-Step Instructions

1. Add an InfoRecordFetcher to a Blank Workspace

Starting from a blank workspace, add both a Creator and InforRecordCreator transformer to the canvas. 
 

1_Workbench.png

2. Select Infor Web Connection
Select your Infor Web Connection (or create a new Infor Web Connection with the Infor Web Service). 

3. Add Infor IONAPI Endpoint
Add your Infor IONAPI Endpoint,  available in the Infor ION API documentation at the top of the page of the Infor
app. See below image. 

2_API_Endpoint.png

Bonus tip:
Save your IONAPI Endpoint and/or Web Connection settings as a default. You can also set this as the default parameters or easily reset using the presets drop-down menu. 
 

3_Transformer_Endpoint.png


4. Specific Which Resource to Update
Now that the authentication is set, specify which resource you want to update records for. In this example, we will update Work Order 1014. Note: the ID and Activity attributes are required to update records. Activity is also CaSe SeNsItIVe. 

  • Commonly updated attributes, such as Activity, Assigned to, Comments, Start/End Time, and Address ID are available in the main parameters window and can be quickly set using attribute values.
  • The JSON Body attribute allows you to add additional attributes that are not provided above to the JSON string sent via the REST API. 


The JSON Body must be formatted as key-value pairs, or arrays with key-value pairs as outlined in the ION API, Public Sector API documentation. The value of the JSON body parameter will be inserted between objects if any other [optional] parameters are specified above. See below for more examples:

Sample JSON Bodies:

Example 1

"usage": 0, "scheduledDateTime": "string", "scheduledFinish": "string", "comments": "string"'

Example 2

"priority": { "code": "Low" }

Example 3

"Parcel": [ { "id": 0, "parcelId": "string", "parcelName": "string", "isEffective": true, "isExpired": true, "effectiveDateCommonId": "string", "expiredDateCommonId": "string", "lastModifiedDateTime": "string", "includeAttachments": true, "gisKey": "string" } ]

Example 4

"serviceRequest": { "id": 0, "lastModifiedDateTime": "string", "includeAttachments": true }, "asset": { "id": 0, "assetId": "string", "type": "string", "includeAttachments": true, "lastModifiedDateTime": "string" }


Please refer to the Tutorial: Getting Started with JSON articles to familiarize yourself with the methods available to prepare a JSON Upload Body. 

 

Updating an existing record using hardcoded values

4_Existing_Record.png

Existing Record in Infor. 

In this scenario, we will update the Assigned To, Comments, and Priority of an Infor Public Sector Work Order. In the InforRecordUpdater, set the ID parameter to the ID of the record you’d like to update (i.e. 1014). Similarly, set values for the AssignedTo (user ID in Infor) and Comment parameters. 

In the JSON Body, since we will be updating priority code, we will need to format the JSON as an array with a key-value pair. Set the value to:

"priority": { "code": "High" }


Priority code: along with many other coded attributes must already be created in the Infor Public Sector instance.​​​​​​​
5.jfif

6.png


7.png
​​​​​​​Existing record in Infor.

In this scenario, we will update the Assigned To, Comments, and Priority of an existing Infor Public Sector Work Order. In the InforRecordUpdater, set the ID, Assigned To, and comments to the attributes containing their respective attribute values. 


8.jfif
Click the drop-down arrow in the JSON Body parameter and open the text editor.

In the JSON Body, since we will be updating priority code, we will need to format the JSON as an array with a key-value pair. 

"priority": { "code": "@Value(Priority)" }


9.png
As demonstrated in this screenshot, reviewing the API documentation will provide you with the exact JSON formatting. It’s easy to copy and paste the JSON from the API and replace the “string” with the actual attribute value in the text editor. If you are wanting to format a large number of attributes you may want to consider utilizing the JSONTemplater transformer.


Note: When updating dates, please ensure the date values are formatted in ISO Datetime with Offset standard (i.e. %Y-%m-%dT%H:%M:%S%Ez). This can be done either using a DateTimeConverter or by using a Date/Time Function in the text editor.​​​​​​​
10.pngUpdated record in Infor.

 

Summary

After completing this tutorial, you should now be able to successfully update records from your Infor Public Sector instance via the Infor REST API. If the resource you are trying to update records on is not available in the resource drop-down, please see the Getting Started with Infor Public Sector article to see the Adding Additional API Calls section.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.