---
title: "entityIdentifier(for:)"
framework: appintents
role: symbol
role_heading: Type Method
path: "appintents/syncableentityidentifier/entityidentifier(for:)"
---

# entityIdentifier(for:)

Creates an identifier from a string representation.

## Declaration

```swift
static func entityIdentifier(for string: String) -> SyncableEntityIdentifier<LocalID, StableID>?
```

## Parameters

- `string`: The string representation

## Return Value

Return Value An identifier with local ID set, or nil if parsing fails

## Discussion

Discussion Attempts to parse the string as a local ID. The stable ID is not populated during deserialization - it should be populated by queries when fetching entities.
