Introduction
This document provides guidance on making Matrix42 integration-ready with ONEiO. The default endpoint supports the integration of various objects, including:
- Incidents
- Changes
- Problems
- Service Requests
- Tickets
- Tasks
For any questions regarding the integration setup, please contact support@oneio.cloud.
You can sign up for a free trial of ONEiO using the following link: ONEiO Free Trial.
Sending Messages from ONEiO to Matrix42
To create and modify objects in Matrix42, ONEiO utilizes the native REST APIs available in your system.
Setup Requirements:
- Generate an API token in Matrix42.
- Insert the generated token in the "Token" field within the ONEiO app.
- Use a dedicated integration user for best security practices.
- Follow the Matrix42 API Token Creation Documentation for detailed instructions.
Sending Messages from Matrix42 to ONEiO
To extract and send data from Matrix42 to ONEiO, a combination of Compliance Rules and Workflows must be implemented.
For detailed information, refer to the official Matrix42 documentation on:
Creating a Workflow
Step 1: Loop Through Compliance Rule Actions
1. Open Matrix42 Workflow Studio.
2. Drag and drop a ForEach activity.
3. Set the loop variable to singleob
.
4. Ensure the source collection is ObjectContexts
.
5. Inside the loop, add a Flowchart for structured processing.
Step 2: Retrieve Ticket Data
1. Add a Get Ticket Data activity inside the Flowchart.
2. Configure the properties:
-
-
Data Definition:
SPSActivityClassBase
-
Where Expression:
[Expression-ObjectID] = @ExpressionObjectID
-
Store results in:
ID → fragmentid
TypeID → typeid
-
ExpressionObjectID → expression_object_id
-
Data Definition:
Step 3: Invoke PowerShell Script
1. Add an Invoke PowerShell activity.
2. Pass the following parameters:
-
TypeID (GUID)
ExpressionObjectID (GUID)
3. The PowerShell script will:
-
- Construct a JSON payload.
- Send a POST request to ONEiO’s endpoint using
Invoke-RestMethod
.
Example PowerShell Script
param(
[Guid] $ExpressionObjectID,
[Guid] $TypeID
)
# Define the target URI (auth_token value taken from ONEiO App)
$uri = "https://rest-receiver-test.service-flow.com/api?auth_token=xxx"
# Define the JSON payload
$data = @{
TypeID = $TypeID.ToString()
ExpressionObjectID = $ExpressionObjectID.ToString()
} | ConvertTo-Json -Depth 3
# Define headers
$headers = @{
"Content-Type" = "application/json"
}
# Debugging: Log JSON payload before sending
Write-Host "Sending JSON payload: $data"
# Send the HTTP POST request
try {
$response = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $data
Write-Host "Response from server: $($response | ConvertTo-Json -Depth 3)"
} catch {
Write-Host "Error occurred: $_"
}
$ResponseContained = $false
Step 4: Decision Making (Optional)
- Add a Decision activity to evaluate the API response.
- Configure conditional branches to handle different responses:
- Success
- Failure
- Retry Logic
Creating a Compliance Rule for Object Changes
Step 1: Creating a New Compliance Rule
- Navigate to Compliance Rule section in Matrix42 ITSM.
- Click New Rule.
- Enter a Name (e.g.,
Ud_oneio_test_2
). - Optionally, provide a Description.
- Under Configuration Element, choose Data Definition.
- Select Data Definition as
Activity (SPSActivityClassBase)
. - Under Configuration Items, select relevant options:
-
Ticket (
SPSActivityTypeTicket
) -
Service Request (
SPSActivityTypeServiceRequest
) -
Problem (
SPSActivityTypeGroupTicket
) -
Task (
SPSActivityTypeBase
) -
Incident (
SPSActivityTypeIncident
) -
Change (
SVMChangeRequestType
)
-
Ticket (
- Click Save to proceed.
Step 2: Defining Rule Conditions
- In Condition Type, select Change an Object.
- Click Add Condition and define trigger conditions you are interested in:
-
Activity.Description
– Changed -
Activity.DescriptionHTML
– Changed -
Activity.Priority
– Changed -
Main Data Definition.State
– Changed
-
- Use Group option if necessary.
- Click Save to continue.
Step 3: Configuring Processing Options
- Choose Processing Method:
- Process each compliance rule event for each object (Recommended for real-time updates)
- Only process the last compliance rule event per object (Prevents duplicate messages)
- Process compliance rule events for respective objects conjointly (Useful for bulk changes)
- Choose Processing Time:
- Immediately (Recommended for real-time processing)
- Delayed (For scheduled execution)
- Click Save.
Step 4: Setting the Subsequent Processing Action
- Click Add Action under Set the subsequent activity for processing.
- Select Start Workflow.
- Assign an Order Number if needed.
- Click Save.
Step 5: Linking to ONEiO Workflow
- In the Add Compliance Rule Action window, select the Workflow to initiate (e.g.,
ONEiO Test
). - Choose Previous Attributes if needed to retain "before" values in the workflow.
- Click Save to finalize the configuration.
Creating a Compliance Rule for Journal Updates (also covers object Creation)
Step 1: Creating a New Compliance Rule
- Navigate to Compliance Rule section in Matrix42 ITSM.
- Click New Rule.
- Enter a Name (e.g.,
Ud_oneio_test_2
). - Optionally, provide a Description.
- Under Configuration Element, choose Data Definition.
- Select Data Definition as
Journal Entry (SPSActivityClassUnitOfWork)
. - Under Configuration Items, select relevant options (same as object changes).
- Click Save to proceed.
Step 2: Defining Rule Conditions
No specific conditions required except for the Condition Type which should be "Create an Object".
Step 3: Configuring Processing Options
Only process the last compliance rule event per object
Step 4: Setting the Subsequent Processing Action
Follow the same steps as in Object Changes above.
Step 5: Linking to ONEiO Workflow
Follow the same steps as in Object Changes above.
Conclusion
By following these steps, you can successfully integrate Matrix42 with ONEiO, enabling efficient communication between the two systems. If you encounter any issues, reach out to support@oneio.cloud for assistance.
Comments
Please sign in to leave a comment.