Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions apps/docs/content/docs/integrations/windchill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ This integration talks to Windchill REST Services (WRS) 2.7 over OData — the q
Bulk actions are atomic on Windchill's side: PTC documents that if the action fails for any object in the collection, the entire action is rolled back and nothing changes.

Two limits are worth knowing before you build. Windchill identifies everything by OID (`OR:wt.doc.WTDocument:48796581`), so most operations need an OID you got from a list or get call rather than a document number. And this integration supports Basic authentication only — Windchill deployments fronted by OAuth are not currently supported.

The block also supports provider-managed document webhook triggers for attribute changes, identity changes, lifecycle-state changes, and custom installed events. Choose one document, a folder, or a container as the subscription scope. Triggers require a self-managed Windchill deployment with WRS 2.7 and a Basic-authenticated account that can manage Event Management subscriptions; Windchill+ and OAuth authentication are not supported. A Windchill administrator must set the site-level **Webhooks > Outgoing Webhook URL** to the same host as the generated Sim callback URL.

Sim creates the subscription when the trigger is saved and removes it during cleanup. Keep the generated callback URL private: PTC does not publish a callback payload schema, signing contract, or delivery identifier. Sim passes the JSON callback body through unchanged rather than exposing inferred event fields.
{/* MANUAL-CONTENT-END */}


Expand Down Expand Up @@ -935,3 +939,87 @@ Upload one or more files as document attachments
| `uploadedFileNames` | array | Names of files accepted by Windchill |



## Triggers

A **Trigger** is a block that starts a workflow when an event happens in this service.

### Windchill Custom Document Event

Trigger a workflow for an installed Windchill document event

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerBaseUrl` | string | Yes | Complete versioned HTTPS OData service root for a self-managed Windchill deployment; Sim uses its installation root to access the default EventMgmt domain |
| `triggerUsername` | string | Yes | Username |
| `triggerPassword` | string | Yes | Password |
| `triggerScope` | string | Yes | Scope |
| `triggerDocumentOid` | string | No | Subscribe to one WT.Document object |
| `triggerSubscribeAllVersions` | boolean | No | Apply the subscription to current and future versions of the document |
| `triggerFolderOid` | string | No | Subscribe to documents in this folder |
| `triggerContainerOid` | string | No | Subscribe to documents in this product, library, or other container |
| `triggerEvent` | string | Yes | Exact event identifier returned by EventMgmt/GetApplicableEvents\(EntityName='PTC.DocMgmt.Document'\) |


---

### Windchill Document Attributes Changed

Trigger a workflow when Windchill document attributes change

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerBaseUrl` | string | Yes | Complete versioned HTTPS OData service root for a self-managed Windchill deployment; Sim uses its installation root to access the default EventMgmt domain |
| `triggerUsername` | string | Yes | Username |
| `triggerPassword` | string | Yes | Password |
| `triggerScope` | string | Yes | Scope |
| `triggerDocumentOid` | string | No | Subscribe to one WT.Document object |
| `triggerSubscribeAllVersions` | boolean | No | Apply the subscription to current and future versions of the document |
| `triggerFolderOid` | string | No | Subscribe to documents in this folder |
| `triggerContainerOid` | string | No | Subscribe to documents in this product, library, or other container |


---

### Windchill Document Identity Changed

Trigger a workflow when a Windchill document identity changes

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerBaseUrl` | string | Yes | Complete versioned HTTPS OData service root for a self-managed Windchill deployment; Sim uses its installation root to access the default EventMgmt domain |
| `triggerUsername` | string | Yes | Username |
| `triggerPassword` | string | Yes | Password |
| `triggerScope` | string | Yes | Scope |
| `triggerDocumentOid` | string | No | Subscribe to one WT.Document object |
| `triggerSubscribeAllVersions` | boolean | No | Apply the subscription to current and future versions of the document |
| `triggerFolderOid` | string | No | Subscribe to documents in this folder |
| `triggerContainerOid` | string | No | Subscribe to documents in this product, library, or other container |


---

### Windchill Document Lifecycle State Changed

Trigger a workflow when a Windchill document enters a selected lifecycle state

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerBaseUrl` | string | Yes | Complete versioned HTTPS OData service root for a self-managed Windchill deployment; Sim uses its installation root to access the default EventMgmt domain |
| `triggerUsername` | string | Yes | Username |
| `triggerPassword` | string | Yes | Password |
| `triggerScope` | string | Yes | Scope |
| `triggerDocumentOid` | string | No | Subscribe to one WT.Document object |
| `triggerSubscribeAllVersions` | boolean | No | Apply the subscription to current and future versions of the document |
| `triggerFolderOid` | string | No | Subscribe to documents in this folder |
| `triggerContainerOid` | string | No | Subscribe to documents in this product, library, or other container |
| `triggerLifecycleStateValue` | string | Yes | Internal lifecycle state value that should trigger the workflow |

45 changes: 45 additions & 0 deletions apps/sim/blocks/blocks/windchill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { WindchillIcon } from '@/components/icons'
import type { BlockConfig, BlockMeta } from '@/blocks/types'
import { AuthMode, IntegrationType } from '@/blocks/types'
import { normalizeFileInput } from '@/blocks/utils'
import { getTrigger } from '@/triggers'

const SINGLE_DOCUMENT_OPERATIONS = [
'windchill_get_document',
Expand Down Expand Up @@ -130,11 +131,42 @@ export const WindchillBlock: BlockConfig = {
category: 'tools',
integrationType: IntegrationType.Documents,
authMode: AuthMode.ApiKey,
triggerAllowed: true,
bgColor: '#FFFFFF',
icon: WindchillIcon,
canvasPresentation: {
defaultTitle: 'Windchill',
operationSubBlockId: 'operation',
triggerSentences: {
default: [
'Run on',
{ field: 'selectedTriggerId', core: true },
{
text: 'for',
field: ['triggerDocumentOid', 'triggerFolderOid', 'triggerContainerOid'],
core: true,
},
],
byTrigger: {
windchill_document_lifecycle_state_changed: [
'Run when',
{
field: ['triggerDocumentOid', 'triggerFolderOid', 'triggerContainerOid'],
core: true,
},
{ text: 'enters', field: 'triggerLifecycleStateValue', core: true },
],
windchill_custom_document_event: [
'Run on',
{ field: 'triggerEvent', core: true },
{
text: 'for',
field: ['triggerDocumentOid', 'triggerFolderOid', 'triggerContainerOid'],
core: true,
},
],
},
},
sentences: {
byOperation: {
windchill_list_documents: [
Expand Down Expand Up @@ -721,6 +753,10 @@ export const WindchillBlock: BlockConfig = {
mode: 'advanced',
required: true,
},
...getTrigger('windchill_document_attributes_changed').subBlocks,
...getTrigger('windchill_document_identity_changed').subBlocks,
...getTrigger('windchill_document_lifecycle_state_changed').subBlocks,
...getTrigger('windchill_custom_document_event').subBlocks,
],
tools: {
access: [
Expand Down Expand Up @@ -920,6 +956,15 @@ export const WindchillBlock: BlockConfig = {
condition: { field: 'operation', value: DOWNLOAD_OPERATIONS },
},
},
triggers: {
enabled: true,
available: [
'windchill_document_attributes_changed',
'windchill_document_identity_changed',
'windchill_document_lifecycle_state_changed',
'windchill_custom_document_event',
],
},
}

export const WindchillBlockMeta = {
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/lib/webhooks/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import { verifyTokenAuth } from '@/lib/webhooks/providers/utils'
import { vercelHandler } from '@/lib/webhooks/providers/vercel'
import { webflowHandler } from '@/lib/webhooks/providers/webflow'
import { whatsappHandler } from '@/lib/webhooks/providers/whatsapp'
import { windchillHandler } from '@/lib/webhooks/providers/windchill'
import { zendeskHandler } from '@/lib/webhooks/providers/zendesk'
import { zohoDeskHandler } from '@/lib/webhooks/providers/zoho-desk'
import { zoomHandler } from '@/lib/webhooks/providers/zoom'
Expand Down Expand Up @@ -134,6 +135,7 @@ const PROVIDER_HANDLERS: Record<string, WebhookProviderHandler> = {
vercel: vercelHandler,
webflow: webflowHandler,
whatsapp: whatsappHandler,
windchill: windchillHandler,
zendesk: zendeskHandler,
zoho_desk: zohoDeskHandler,
zoom: zoomHandler,
Expand Down
Loading
Loading