---
title: "EntityDuplicatorService"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/service/helpers/entity-duplicator/entity-duplicator.service.ts" sourceLine="23" packageName="@vendure/core" since="2.2.0" />

This service is used to duplicate entities using one of the configured
<DocsLink href="/reference/typescript-api/configuration/entity-duplicator#entityduplicator">EntityDuplicator</DocsLink> functions.

```ts title="Signature"
class EntityDuplicatorService {
    constructor(configService: ConfigService, configArgService: ConfigArgService, connection: TransactionalConnection)
    getEntityDuplicators(ctx: RequestContext) => EntityDuplicatorDefinition[];
    duplicateEntity(ctx: RequestContext, input: DuplicateEntityInput) => Promise<DuplicateEntityResult>;
}
```

<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(configService: ConfigService, configArgService: ConfigArgService, connection: <a href='/reference/typescript-api/data-access/transactional-connection#transactionalconnection'>TransactionalConnection</a>) => EntityDuplicatorService`}   />


### getEntityDuplicators

<MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>) => EntityDuplicatorDefinition[]`}   />

Returns all configured <DocsLink href="/reference/typescript-api/configuration/entity-duplicator#entityduplicator">EntityDuplicator</DocsLink> definitions.
### duplicateEntity

<MemberInfo kind="method" type={`(ctx: <a href='/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, input: DuplicateEntityInput) => Promise<DuplicateEntityResult>`}   />

Duplicates an entity using the specified <DocsLink href="/reference/typescript-api/configuration/entity-duplicator#entityduplicator">EntityDuplicator</DocsLink>. The duplication is performed
within a transaction, so if an error occurs, the transaction will be rolled back.


</div>
