All skills
segmently-ai avatar

/segmently-cli-custom-screen-guide

@3c9bc34

Segmently CLI guide for reading, updating, applying, and validating V2 WebEmbed custom screens and FlexibleLayout paywall ProductCatalog linking. Use when migrating hardcoded WebEmbed HTML to data sources, routing Button and SingleSelectionList child data-source actions through graph edges, reproducing screenshot references as WebEmbed custom screens, checking variables inside custom screens, updating callback fallback edges, verifying shadow-DOM render correctness, migrating images, converting legacy custom-screen APIs, converting paywalls to ProductCatalog-driven custom screens through the Segmently CLI, or validating native FlexibleLayout Text/PurchaseButton labels linked to selected ProductCatalog products. Also trigger when Segmently Launch Assistant returns executeWith.skill/owningSkill=segmently-cli-custom-screen-guide or names this skill for a custom WebEmbed DO flow.

  • 20 files
  • 137.8 KB
  • Updated last week
  • GitHub

Use this Skill: https://skilld.dev/gh/segmently-ai/segmently-support-plugins/segmently-cli-custom-screen-guide

This session only. Nothing lands on disk.

referencespaywall.md

≈709 tokens on demand. Your agent reads this file only when SKILL.md points to it.

WebEmbed Paywall Flow

For custom paywalls, product identity and pricing should come from ProductCatalog instead of hardcoded HTML. Non-product copy can stay in Text or BulletList data sources.

Render Mode

Web Embedded Paywalls must run in shadow DOM mode, not iframe mode. In catalog artifacts set:

{
  "screenKind": "webembed-paywall",
  "renderMode": "shadow-dom",
  "isIframe": false
}

When applying the screen through the CLI, pass --iframe false explicitly so the saved screen does not fall back to the default iframe setting.

Because a paywall renders in a shadow root (not an iframe), it is subject to shadow-DOM render rules that healthcheck does not catch: load web/icon fonts from document.head (not the embedded <head>), and never viewport-pin the wrappers with min-height:100vh / overflow:hidden. Run the post-publish render check in references/shadow-dom-rendering.md.

ProductCatalog Data Source

Use a ProductCatalog child section with products configured for the funnel. The exact product ids come from the target environment. Keep copy labels in the catalog only when they are meant to be rendered by the paywall HTML.

Materialized data sources should preserve id, kind, label, order, and the product catalog content shape exported or accepted by the CLI.

SDK Pattern

segmentlySDK.ready().then(function (sdk) {
  var products = sdk.getProducts();
  products.forEach(function (product) {
    var price = sdk.getProductPrice(product.productId);
    // Render product.labels and price.displayPrice.
  });

  function choose(productId) {
    sdk.selectProduct(productId);
  }

  function buy(productId) {
    sdk.purchaseProduct(productId).then(function (result) {
      sdk.setVariable('payment_result', result && result.status ? result.status : 'unknown');
      sdk.navigateNext();
    });
  }
});

Use the screen's existing selection and purchase UI. Replace only the hardcoded product text and price reads.

Routing

If the funnel branches after payment, add a payment_result variable and an edges file with success/cancel/failure routes. Run variables apply --dry-run before applying the screen.

Checks

Run:

segmently funnels custom-screen healthcheck <funnelId> <versionId> <screenId> <projectId>
segmently funnels audit <funnelId> <versionId> <projectId> --require-paywall

Healthcheck validates data-source references and variable availability. Audit validates broader paywall readiness.

Safety

  • Do not hardcode prices such as $9.99 when product price APIs are available.
  • Do not create or mutate live payment products without explicit user approval.
  • Preserve existing product selection behavior unless the task asks to change the paywall.
  • Keep purchase error and retry copy in data sources when possible.

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 3c9bc34. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for segmently-ai/segmently-support-plugins/segmently-cli-custom-screen-guide