@extends('layouts.app') @section('title', 'Story Purchase') @section('content')
Use one Instagram link for all stories. We sync stories, show only enabled ones in the wizard, detect price with AI, and send customers straight to checkout.
Funnel for {{ now($spStatsTz)->format('M j, Y') }} ({{ $spStatsTz }}): checkouts started = wizard sent the customer to checkout; paid = money collected. Do not treat checkout starts as Shopify sales. Abandoned Shopify checkouts are in Marketing.
@if(!empty($bestToday) && !empty($bestToday['story'])) @php $bestStory = $bestToday['story']; $bestStats = $bestToday['stats'] ?? []; $bestThumb = $bestStory->thumbnail_url ?: $bestStory->media_url; @endphpStory Purchase uses the same token and Instagram User ID as Automatic Story Scheduler. Publishing stories only needs publish permissions; reading live stories for sync needs read access too.
@if(session('instagram_verify')) @php $verify = session('instagram_verify'); @endphp{{ $verify['scheduler_note'] }}
@if(!empty($verify['scheduler_sufficient']))Scheduler connection: sufficient for Story Purchase
@elseScheduler connection: may work for publish only — fix read permissions for sync
@endifRemoves every story variant and images on {{ $settings->product_title ?: 'selected product' }}. STORY-DEFAULT ($100) only appears when all stories expired or after this reset. While any story variant exists, the default is removed from Shopify automatically.
@if($settings->auto_wizard_on_caption_price)Stories with a price in the caption (or AI-detected price in the media) are auto-shown on sync. @endif Seller hashtags from Sales commissions also auto-show the story and assign that salesperson. Without a match, use Show below.
@if($stories->total() === 0)No stories match these filters.
@else| # | Preview | Media | Caption | Performance | Status | Wizard |
|---|---|---|---|---|---|---|
| {{ $story->id }} |
@if($story->thumbnail_url || $story->media_url)
N/A
@endif
|
{{ $story->media_type }}
@php $displayTz = config('app.deals_display_timezone', 'America/New_York'); @endphp
|
{{ $story->caption ?: 'No caption' }}
@if($story->salesperson)
{{ $story->salesperson->instagram_hashtag ?: $story->salesperson->full_name }}
@elseif($story->has_shop_tag)
Seller tag
@endif
@if($story->detected_price)
@endif
|
@php $perf = $story->performance ?? []; @endphp
@if(!empty($perf['is_best_today']))
Today
@endif
@if(!empty($perf['is_top']))
Top
@endif
{{ (int) ($perf['views'] ?? 0) }} views
·
{{ (int) ($perf['sends'] ?? 0) }} checkouts started
·
{{ (int) ($perf['paid_count'] ?? 0) }} paid
${{ number_format((float) ($perf['revenue'] ?? 0), 2) }}
@if(($perf['conversion'] ?? null) !== null)
·
{{ $perf['conversion'] }}% conv
@endif
@php
$convBar = min(100, max(0, (float) ($perf['conversion'] ?? 0)));
@endphp
|
{{ $story->is_active ? 'Active' : 'Inactive' }} |