--- title: "Create entity mapping" slug: "create-an-entity-mapping" updated: 2026-04-22T14:22:01Z published: 2026-04-22T14:22:50Z canonical: "docs.zilliant.com/create-an-entity-mapping" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Create entity mapping Post/v1/E2eMapping Creates a new entity mapping definition for copying or moving data from a source entity to a target entity. SecurityAPI Key: AuthorizationHeader parameter nameAuthorization Add an **Authorization** header to authenticate requests originating outside of Zilliant's internal network. Set the header to `Authorization: OAuth <tokenResponseBase64>`. `<tokenResponseBase64>` is the Base64-encoded entire JSON response body returned by the Salesforce OAuth token endpoint. Encode the full JSON payload, not only the **access_token** field. For details, read [Request an access token](https://docs.zilliant.com/apidocs/request-an-access-token). Header parametersX-Forwarded-Hoststring OAuth host for your environment. Use it for all requests that originate outside Zilliant’s internal network. For details, read **X-Forwarded-Host header** in [Introduction](https://docs.zilliant.com/apidocs/introduction-2#xforwardedhost-header). Body parametersCreate a mapping example In this example we are mapping the **CUSTOMER** entity data to the **TRANSACTIONS** entity. We use the **upsert** mode because we want to both update existing records of the target entity and to insert new records into it. The filters array limits this mapping operation to only those records with the **P2** value in the **Product_Id** source entity field and the **000247** value in the **Customer_Id** source entity field. In the fields array we specify how to map source entity fields to the target entity. ```json { "mapping": { "name": "New Lines Based on Product Cost Changes", "mode": "upsert", "sourceEntity": "CUSTOMER", "targetEntity": "TRANSACTIONS", "filters": [ { "filterName": "Product", "filterExpression": "Product_Id eq 'P2'" }, { "filterName": "Customer", "filterExpression": "Customer_Id eq '000247'" } ], "fields": [ { "sourceEntityField": "New_Price", "targetEntityField": "List_Price" }, { "sourceEntityField": "New_Date", "targetEntityField": "Effective_Date" } ] }, "name": "DemoMappingToDelete" } ``` Expand Allobject mappingobject Required Mapping definition that specifies source and target entities, mode, optional filters, and field mappings. namestring Required Description of the entity mapping. ExampleNew Lines Based on Product Cost Changes modestring Required Defines how to map data to the target entity. Supported values: - **insert**—New records will be added to the target entity but its existing data won't be updated. - **update**—Existing records of the target entity will be updated with the new data. - **upsert**—New records will be inserted into the target entity and its existing records will be updated with the new data. Valid values[ "insert", "update", "upsert" ]Exampleupsert sourceEntitystring Required Unique system name of the source entity. ExampleCUSTOMER targetEntitystring Required Unique system name of the target entity. ExampleTRANSACTIONS filters Array of object Filters that limit which source records are mapped to the target entity. object filterNamestring Required Filter name. ExampleProduct filterExpressionstring Required OData-style filter expression. The value should take the format `fieldSystemName operator fieldValue`. ExampleProduct_Id eq 'P2' fields Array of object Required Field mappings from source entity fields to target entity fields. Min items1object sourceEntityFieldstring Required System name of the source entity field. ExampleNew_Price targetEntityFieldstring Required System name of the target entity field. ExampleList_Price namestring Required Unique name of the entity mapping. ExampleDemoMapping Responses201 The entity mapping created. Returns the unique identifier and the created mapping metadata. 409 Conflict. An entity mapping with the same name already exists. 422 Unable to process the content. **name** and **mapping** must not be **null**.