Skip to content

Comments

DXIM-344 [PRELOAD HOOK] - Add example in extension_sdk repository#34

Open
sarah-zatar wants to merge 6 commits intomainfrom
DXIM-344
Open

DXIM-344 [PRELOAD HOOK] - Add example in extension_sdk repository#34
sarah-zatar wants to merge 6 commits intomainfrom
DXIM-344

Conversation

@sarah-zatar
Copy link

@sarah-zatar sarah-zatar commented Feb 18, 2026

Product:
image

Product Model
image

Custom component (sdk_script) positioned on pim.product.header that
demonstrates a "preload hook" pattern: on mount, it fetches product
info via PIM.api.product_uuid_v1.get() and displays simulated external
data (stock availability, pricing, compliance) without user interaction.
Add a commented example of PIM.api.external.call() in useProductInfo.ts
to show how to fetch data from an external service (ERP, pricing, etc.).
Update README with a new "Calling an external API" section.
Add a commented example of PIM.custom_variables usage alongside the
existing api.external.call example in useProductInfo.ts. Reorganize
README into a "Connecting to your own tools" section covering both
config-based (custom_variables) and API-based (external.call) hooks.
sarah-zatar and others added 3 commits February 19, 2026 13:35
- Rename useProductInfo hook to usePreLoadData (file, interface, exports)
- Move commented examples (external API, custom_variables) to top of hook
- Invert example order: external API call is now EXAMPLE 1, custom_variables is EXAMPLE 2
- Add product model support: use context.product.uuid for products,
  context.product.identifier for product models
- Replace stock/price/compliance with certification and expiration badges
- Add supported positions table in README (product, product-model,
  sub-product-model headers)
- Set transparent background on html/body for iframe styling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace simulated data with a certification expiration message using
custom_variables for the date. Simplify App.tsx rendering, update
labels to "Certification notification", and document the
certification_expiration_date custom variable in the README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants