helloagain / shopware6
HelloAgain Connector plugin Shopware 6
Package info
gitlab.com/helloagainpublic/connectors/shopware-6
Type:shopware-platform-plugin
pkg:composer/helloagain/shopware6
Requires
- php: ^8.0
- ext-curl: *
- ext-json: *
- firebase/php-jwt: ^6.0
README
This plugin integrates Shopware 6 stores with the hello again customer loyalty platform, enabling OAuth login, automatic points awards for orders, and seamless SSO for app users.
Features
- OAuth 2.0 Authentication - Connect hello again app accounts with Shopware shop accounts
- Automatic Points Awards - Track and sync completed orders to hello again for points
- Webview SSO - Auto-login app users when visiting the shop
Installation
- Install the plugin via Shopware plugin manager
- Configure API credentials in plugin settings
- Set up the cron job for order synchronization:
bin/console helloagain:data-export
Shopware Version Support
- 6.6 -
mainbranch - 6.5 -
shopware-6.5branch - 6.4 -
shopware-6.4branch (deprecated)
Configuration Endpoints
Configure these URIs in your hello again dashboard:
OAuth2 Authorize URI: BASEURL/hla/oauth2/authorize
OAuth2 Token URI: BASEURL/hla/oauth2/token
Webview SSO URI: BASEURL/hla/session/init?helloagain_token={{externalToken}}
Webview with Redirect: BASEURL/hla/session/init?helloagain_token={{externalToken}}&redirect_uri={{redirectUrl}}
Usage
OAuth 2.0 Login
Users can connect their hello again app account with their shop account through the OAuth flow. The app will redirect users to the authorize endpoint, where they log in and grant permission.
Webview SSO
Automatically log in users from the hello again app by appending a token to any shop URL:
https://yourshop.com/any-page?helloagain_token=<token>
The plugin intercepts the request, validates the token, logs in the user, and redirects to the requested page.
API Alternative (for headless/mobile):
curl -X POST https://yourshop.com/store-api/v1/get-user-by-token \
-H "Content-Type: application/json" \
-d '{"helloagain_token": "<token>"}'
# Returns: {"contextToken": "<shopware_session_token>"}
Order Points Export
Orders are automatically tracked when they reach configured statuses (e.g., "paid", "completed"). The cron job syncs them to hello again for points calculation.
Headless/Store API Usage
The plugin provides Store API endpoints for headless Shopware implementations.
OAuth Authorization Flow
Step 1: Get Context Token
curl -X POST https://yourshop.com/store-api/account/login \
-H "sw-access-key: <SW-ACCESS-KEY>" \
-F "username=<USERNAME>" \
-F "password=<PASSWORD>"
Step 2: Request Authorization Code
curl -X POST https://yourshop.com/store-api/v1/authorize \
-H "sw-access-key: <SW-ACCESS-KEY>" \
-H "sw-context-token: <SW-CONTEXT-TOKEN>" \
-H "Content-Type: application/json" \
-d '{"scope": "email first_name last_name"}'
Step 3: Exchange Code for Token
curl -X POST https://yourshop.com/store-api/v1/token \
-H "Content-Type: application/json" \
-d '{
"code": "<AUTHORIZATION_CODE>",
"client_id": "<CLIENT_ID>",
"client_secret": "<CLIENT_SECRET>",
"grant_type": "authorization_code"
}'
SSO via Token
curl -X POST https://yourshop.com/store-api/v1/get-user-by-token \
-H "Content-Type: application/json" \
-d '{"helloagain_token": "<hello-again-token>"}'
# Returns: {"contextToken": "<shopware_session_token>"}
API References
Testing
Manual Testing
For comprehensive manual testing instructions covering OAuth login, SSO, and order points award, see TESTING.md.
Postman Collection
A Postman collection is available in docs/postman/ with ready-to-use API requests for:
- OAuth authorization flow
- SSO token validation
- Order export testing
- Headless Store API operations
See docs/postman/README.md for setup instructions.
Development
Build Plugin Package:
./package.sh
Run Order Export Manually:
bin/console helloagain:data-export
Support
- Company: hello again
- Website: https://www.helloagain.com
- Email: info@helloagain.at
Additional Documentation
See CLAUDE.md for detailed technical documentation, architecture overview, and development guidelines.