Items Routing Scripting
Item Routing scripting lets you decide where Getint creates each synced item. The script reads the item that triggered the sync and returns the project and item type for its counterpart on the other side. Use it when items from one project need to land in different projects or item types based on their field values, such as the assignee.
How to Access the Items Routing Code Editor
From your integration editor, click Items Routing.

The Items Routing panel opens with the visual route builder. Click Switch To Code Editor at the top of the panel.

Enter your script and click Apply.
How Item Routing Works
Each Item Routing script belongs to one side of the integration and decides where that side creates items. The trigger object always comes from the opposite side.
For example, if you set Item Routing for the LEFT app:
state.triggerObjholds the item from the RIGHT app.The script returns a
projectIdandissueTypeNamethat exist in the LEFT app.
Required Return Value
The script must return an object with two non-empty properties:
projectId: the ID of the target project.issueTypeName: the name of the target item type.
return {"projectId": "10778", "issueTypeName": "Task"}
Available Commands
State
API
Example: Route Jira Issues by Assignee
This script routes Jira issues to different projects based on the assignee's display name. Issues assigned to a user whose name contains "Marcin" go to project 10778, and issues assigned to a user whose name contains "Service" go to project 11405. Both are created as Tasks.
Checking Script Logs
Messages written with api.log appear in the Run logs. Getint resolves Item Routing before the sync starts, so the output belongs to the run rather than to an individual item sync.
Last updated
Was this helpful?
