› BI › Event based processing in Scribe Online
Event based processing in Scribe Online
Event based processing allows us to expose a Scribe Online Integration as a REST endpoint.
Consider Source as an external application which makes calls to Scribe Online API Web service and Target as Microsoft Dynamics CRM Online.
Our goal is to send a request to the Web service in Scribe Online and execute the solution which inserts data in the target.
Here, we can use Scribe Event Solution which allows us to integrate data triggered by calls to a Web Service.
- Integration Services (IS) Event
- Open the Solution
- Select Agents from the navigation pane in Scribe Online
- Click New and select Integration Services (IS) Event
- Click New and select Request/Reply from the drop-down list
- Set up the Request/Reply map
Start with the Wait for Request block
Design the schema for your input fields
After you save the map, Scribe generates a unique endpoint URL for each map.
- Add a Build Reply block
Define the schema for the fields you want to retur (if any). It can be a Boolean value that says whether the customer was successfully created in Dynamics CRM.
- Send Reply Block
- Causes the Reply to be sent back to the requester
- Use this block to exit out of the map or to trigger an error message
- We can use Send Reply to change the error handling. (Send Reply is optional)
- Map the fields in the Target block
In our example, we check if the ID equals 100000001, create a new Project else Send a reply with ‘Do not create’.
- Set Security Rules
From the Security Tab on the Organization page, specify the security rules for the Event Solutions.
- Once saved your solution will be in a state of ‘Waiting for Event’.
- Set up custom application to call the Scribe REST API
Copy the endpoint URL and paste it in your custom application.
- Postman (Chrome) application is used to make REST call to the web service.
Below image contains POST request in JSON format to a particular URL.
Each map within an Event Solution runs independently, depending on the event that triggers
Click Send to call the Integration solution. You will get a response as shown in below image.
Use Event Solutions to create integration tasks triggered by calls to the Request/Reply Map.
Result in Target (CRM):
– Navigate to Projects
Scribe Online Integration Services provides two kinds of Solutions:
- Scheduled Solutions — Integrate data between online and on-premise data stores on a specified schedule or on demand.
- Event Solutions — Integrate data triggered by calls to a web service.
Liked it? Share it.