***

title: "EntitySlugService"
generated: true
---------------

<GenerationInfo sourceFile="packages/core/src/service/helpers/entity-slug.service.ts" sourceLine="41" packageName="@vendure/core" since="3.5.0" />

A service that handles slug generation for entities, ensuring uniqueness
and handling conflicts by appending numbers.

```ts title="Signature"
class EntitySlugService {
    constructor(slugService: SlugService, connection: TransactionalConnection)
    generateSlugFromInput(ctx: RequestContext, params: GenerateSlugFromInputParams) => Promise<string>;
}
```

<div className="members-wrapper">

### generateSlugFromInput

\<MemberInfo kind="method" type={`(ctx: <a href='/current/core/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, params: GenerateSlugFromInputParams) => Promise<string>`}   />

Generates a slug from input value for an entity, ensuring uniqueness.
Automatically detects if the field exists on the base entity or its translation entity.

</div>
