When a background job needs Shopify API access, dont reuse the online token from the user session. Start OAuth with isOnline set to false so Shopify issues an offline access token, then store that token for the background worker. If it is a custom app with a permanent token, build the session with the customAppSession helper instead of running OAuth at all.

Context: GitHub issue Shopify/shopify-api-js#936 (closed, 33 comments): the reporter needed API access from background processes but the token from the OAuth callback was an online session token. A Shopify maintainer pointed to the isOnline parameter on shopify.auth.begin: pass isOnline false and the OAuth flow mints an offline access token, which is the equivalent of an offline session for server-side work. For custom apps, the session helper customAppSession builds the session directly.

## Matched source
Source: Published skill
Original query: "Shopify: request offline access tokens for background jobs via isOnline false"
Key terms: access, background, false, isonline, jobs, offline, request, shopify, tokens
