Auto Set Custom Attribute | ION Factory OS

The manual for the New ION Experience has been released.

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scenario

Every time a part is created, set the custom attribute Tracking Strategy based on the following table:

Tracking Level Sourcing Strategy Tracking Strategy
None Make N/A
None Buy N/A
Lot Make Lot - Make
Lot Buy Lot - Buy
Serial Make Serial - Make
Serial Buy Serial - Buy

Trigger

The flow should be triggered when a part is created.

Steps

Configure the Connection, GraphQL Query, and GraphQL Variables

Use the following query:

query getParts($filters: PartsInputFilters!) {
  parts(filters: $filters) {
    edges {
      node {
        id
        _etag
        partNumber
        sourcingStrategy
        trackingType
      }
    }
  }
}

Use the following query variables:

{
  "filters": {
    "id": {
      "eq":
    }
  }
}

Add a reference in the query variable to the incoming id from the webhook trigger

Refer to this for detailed documentation on using the First Resonance ION component.

Configure the branch step to check the Tracking Level:

Click the icon in the first Field and configure the input to the output of the previous step.

Select does not exist for the Operator

Enter trackingStrategy for the Key and N/A for the Value

Enter trackingStrategy for the Key

Enter references to the trackingType and sourcingStrategy for the Value separated by a -

Enter in trackingStrategy for the Key

Configure the Connection, GraphQL Query, and GraphQL Variables

Use the following query:

mutation UpdatePartAttributes($input: UpdatePartAttributeInput!) {
  updatePartAttribute(input: $input) {
    partAttribute {
      partId
      Etag
      key
      value
    }
  }
}

Use the following query variables:

{
  "input": {
    "partId": ,
    "key": "",
    "value": "",
    "etag": ""
  }
}

Add a references in the query variable to the partId, etag, and value.

Reference to the partId:

Reference to the etag:

Reference to the value:

The query variables should look like this:

The final flow should resemble this: