Concept for migrating template-based campaigns to content-block based ones

Problem

Currently, user can still create template-based (built-in and custom ones) campaigns, while the block-based editor is already available.

Goal

We want a process of how to migrate our existing template-based campaigns to be block based ones.

Proposal

Built-in templates

All built-in templates were already migrated to blocks on Production and Staging.

Custom templates

Customer ID Custom templates

218527814 210268110 (Integration_demo) 8 overlay + 1 inline 648255943 (Runtastic_staging) 2 overlay + 3 inline 645781705 (Runtastic) 7 overlay + 9 inline 789826614 7 overlay 213679138 (mobile_villans) 3 overlay 4408 (studio_berlin) 21 overlay + 4 inline 212841174 (retail_demo1) 3 overlay + 5 inline 758336025 16 overlay + 4 inline 4871 (studio_global) 11 overlay + 2 inline

Workflow

  1. Currently, for a template-based campaign, we store the template name used (e.g. fullscreen-a). We have additional info for the block-based campaign such as block ID and published ID, where the block ID is stored as the template name. We need to map the block ID from Content Blocks Editor with the template name for built-in templates at first. The Content Blocks Editor still does not validate against duplicate block names. The mapping may be done manually and saved in a JSON file used during the migration. Our assumption is that after the mapping was finished, no other custom templates will be created.

  2. To keep track of which customer was migrated, an additional table can be created with the fields customer_id and migration_status (e.g. IN_PROGRESS, DONE, FAILED). A log entry should be created as well.

  3. Implement an endpoint that deals with the migration for a given user for all campaigns using the mapping of block ID and template name. We need to fetch all the necessary blocks with their latest revision for each block ID. Afterwards, we can add the published ID and set the isBlockBased to true in the campaign meta.

During the campaign migration, we need to handle the custom templates migration to blocks (WebChannel templates → blocks) as well, since this is a dynamic process. This should be done for the V1 editor of Content Blocks. The Drag&Drop editor does not handle yet the characteristics of an In-app block. See examples of how we convert from WebChannel templates/ content blocks to In-App templates. - https://github.com/emartech/me-modules/blob/95d20195303d5dcf835cc9cc471352c85a0b593b/modules/me-clients/lib/webchannel-templates/transform-template.ts#L56 - https://github.com/emartech/me-modules/blob/57c44cb5774785e76292beb1a54e2673b4ac99fe/modules/me-content-blocks/lib/index.ts#L70

Use the ESCHER endpoints to create the blocks. See Swagger documentation for Content Blocks API, especially the POST ESCHER endpoint: - https://curly-fiesta-304b0826.pages.github.io/ { "name": "string", "description": "string", "blockType": "customer", "content": "string", "styles": "string", "variables": [ {} ], "javascript": "string", "dndData": null, "version": 0 }

  1. The customers will have a month time (during 02/2025), to complete the migration by clicking “Yes” get asked if they want to continue. A notification will appear for the account in the platform. Once the timeline has passed, no user interaction will be needed.

  2. Implement a job to handle the second round of migrations for each customer.

  3. Once both rounds of migration are finished, we need to clean up the DB schema.

Testing

Ask QA to test the process for both built-in and custom templates, both overlay and inline.

UX

Ask UX to prepare the mocks for the campaign creation dialog after the migration, as well as the notification, including translations strings.

Questions/issues to address

  1. Should the customers still be able to create custom templates once we migrate their existing custom templates?

  2. Once the campaigns migration for a customer is done, we need to change the campaign creation dialog so that it reflects that only one editor is available for now (block-based editor).

  3. Should the users be informed also by email in case they don’t access the platform in the given timeline?

  4. Let us consider that there are two marketers who are shown the notification at the same time. One confirms the migration while the other does not. The second one also creates a campaign using the template-based editor, which may not be migrated during the process. After the timeline passes, we could automatically migrate that as well.