> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Package: catalogV3 # Namespace: customizationsV3 # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/customization-deleted.md ## Introduction Triggered when a customization is deleted. --- ## REST API ### Schema ``` Webhook: Customization Deleted Description: Triggered when a customization is deleted. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. ``` ### Examples ```curl { "id": "e18d36ef-b012-4105-a3f3-7ae89daf7dd0", "entityFqdn": "wix.stores.catalog.v3.customization", "slug": "deleted", "entityId": "38715c2b-5525-48cf-926d-54f118aa290f", "deletedEvent": { "movedToTrash": true, "deletedEntityAsJson": { "id": "38715c2b-5525-48cf-926d-54f118aa290f", "revision": "2", "createdDate": "2024-06-26T14:06:45.672Z", "updatedDate": "2024-06-26T14:18:49.167Z", "key": "Shirt Sizes", "name": "Shirt Sizes", "customizationType": "PRODUCT_OPTION", "customizationRenderType": "TEXT_CHOICES", "choicesSettings": { "choices": [ { "id": "fc6029be-036a-4634-967f-b74fd73fa3f5", "choiceType": "CHOICE_TEXT", "key": "XL", "name": "XL", "assignedProductsCount": 0 }, { "id": "889de7a7-df48-4b5c-b21b-88d79e19662d", "choiceType": "CHOICE_TEXT", "key": "L", "name": "L", "assignedProductsCount": 0 } ] } } }, "eventTime": "2024-06-26T14:28:49.396299332Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "12" } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onCustomizationDeleted Description: Triggered when a customization is deleted. Payload: CustomizationDeletedEnvelope - name: entity | type: Customization | description: none - ONE-OF: - name: freeTextInput | type: FreeTextSettings | description: Free text input settings. > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. - name: minCharCount | type: integer | description: Minimum text character length. - name: maxCharCount | type: integer | description: Maximum text character length. - name: defaultAddedPrice | type: string | description: Default amount added to a product's price when this choice is assigned to a modifier. - name: title | type: string | description: Title to display to customer for their free-text input. - name: key | type: string | description: A read-only identifier generated from the title. Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md). - name: choicesSettings | type: ChoicesSettings | description: Choices settings. > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. - name: choices | type: array | description: List of choices. - ONE-OF: - name: colorCode | type: string | description: Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). - name: _id | type: string | description: Choice GUID. - name: choiceType | type: ChoiceType | description: Choice type. > **Notes:** > + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`. > + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`. - enum: - CHOICE_TEXT: For a `customizationRenderType` of `TEXT_CHOICES`. - ONE_COLOR: For `customizationRenderType: SWATCH_CHOICES`. - name: key | type: string | description: A read-only identifier generated from the choice name. Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md). - name: name | type: string | description: Choice name. - name: defaultAddedPrice | type: string | description: Default amount added to a product's price when this customization is assigned to a modifier. - name: displayImage | type: string | description: Optional image displayed alongside a ONE_COLOR choice in the storefront. Only valid for ONE_COLOR choices; not populated for other choice types. - name: primaryChoiceIds | type: array | description: IDs of the primary choices this choice is grouped under. A choice that has `primaryChoiceIds` is a "linked" choice; a choice without `primaryChoiceIds` is a "primary" choice. A linked choice can reference up to 4 primary choices and appears nested under each of them on the storefront, rather than in the top-level choice list. Only one level of grouping is supported: a primary choice cannot itself be a linked choice. - name: _id | type: string | description: Customization GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the customization is updated. To prevent conflicting changes, the current revision must be passed when updating the customization. Ignored when creating a customization. - name: _createdDate | type: Date | description: Date and time the customization was created. - name: _updatedDate | type: Date | description: Date and time the customization was updated. - name: key | type: string | description: A read-only identifier generated from the customization name. Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md). - name: name | type: string | description: Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). - name: customizationType | type: CustomizationType | description: Customization type. - enum: PRODUCT_OPTION, MODIFIER - name: customizationRenderType | type: CustomizationRenderType | description: Customization render type. Defines how the customization will be displayed in the storefront. - enum: - FREE_TEXT: Customization by free text input. - TEXT_CHOICES: Customization by selection of text choices. - SWATCH_CHOICES: Customization by selection of colors. - name: assignedProductsCount | type: integer | description: Number of products this customization is assigned to. > **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests. - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { customizationsV3 } from '@wix/stores'; customizationsV3.onCustomizationDeleted((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { customizationsV3 } from '@wix/stores'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { customizationsV3, }, }); wixClient.customizationsV3.onCustomizationDeleted((event) => { // handle your event here }); ``` ---