Skip to content

Commit 125d0c0

Browse files
authored
Merge pull request #49 from BitBagCommerce/feature/manual
Update documentation with User.com API usage, cookie domain handling,…
2 parents ba948cd + f92f81a commit 125d0c0

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

doc/adjustments.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ There is designated validator to check if request payload contains required fiel
1010
If there will be any field added by User.com, you can adjust this validator to check if this field is present in request payload.
1111
Also, in `BitBag\SyliusUserComPlugin\Assigner\AgreementsAssigner` you can adjust existing logic to assign agreements to customer in a way that suits your needs.
1212

13+
The endpoint is exposed in `Swagger` under `UserComAgreements`, making it easy to test and explore directly from the API documentation.
14+
15+
>If you use several channels, remember to select one of the available channels using the get method and parameters before using the API:
16+
`?_channel_code=CHANNEL_CODE`
17+
1318
```php
1419
public function assign(CustomerInterface $customer, array $agreements): void
1520
{

doc/functionalities.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ The **BitBagSyliusUserComPlugin** integrates **User.com** with Sylius-based stor
3131

3232
### 7. User information object
3333
- you can use `user_com_customer_info` in browser console to check currently logged in customer data
34+
35+
### 8. Webhook Endpoint: Updating User Marketing Consents
36+
- Exposes a dedicated endpoint for handling User.com webhooks (`UserComAgreements` in `Swagger`),
37+
allowing the update of user marketing consents. By default, it manages the `subscribedToNewsletter` flag,
38+
but the mechanism is fully extensible to support additional types of consents.”

doc/installation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88
USER_COM_FRONTEND_API_KEY=""
99
USER_COM_ENCRYPTION_KEY=your-32-character-long-key
1010
USER_COM_ENCRYPTION_IV=your-16-character-long-iv
11+
USER_COM_COOKIE_DOMAIN=""
1112
MESSENGER_USER_COM_ASYNCHRONOUS_DSN=""
1213
```
14+
- You can find the `USER_COM_FRONTEND_API_KEY` in the User.Com integration guide for `Google Tag Manager (Settings->Setup & Integrations)`.
15+
- `USER_COM_COOKIE_DOMAIN` is optional, if not set, cookies will be set for the current domain.
16+
17+
1318
3. Add plugin dependencies to `config/bundles.php` file. Make sure that none of the bundles are duplicated.
1419
```php
1520
return [

0 commit comments

Comments
 (0)