Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.2.0: Loyalty Programs pending points & statistics, Introducing Loy…
…alty customer inventory, customer profiles v2 integration dry runs (#10) ## Summary ### Integration API - Introduce `loyalty` flag in [`getCustomerInventory`](https://developers.talon.one/Integration-API/API-Reference#getCustomerInventory) endpoint to retrieve also profile's loyalty programs subscription and stats upon querying the endpoint - Introduce flags to control whether a customer [profile update request v2](https://developers.talon.one/Integration-API/API-Reference#updateCustomerProfileV2) should be a "dry run" or force it to "run rule engine" ####⚠️ Deprecation Notice: Integration API@v1 endpoints This version also introduced the deprecation notices for Integration API@v1 endpoints: - [Update a Customer Session (V1)](https://developers.talon.one/Integration-API/API-Reference#updateCustomerSession) - [Update a Customer Profile (V1)](https://developers.talon.one/Integration-API/API-Reference#updateCustomerProfile) These endpoints will be flagged deprecated on _15.07.2021_, meaning support for requests to these endpoints will end on that date. **We will not remove the endpoints**, and they will still be accessible for you to use. We do encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See [our developer docs section](https://developers.talon.one/Getting-Started/APIV2) about API V2.0). ### Loyalty Programs Introduce Loyalty Program pending points: points that belong to the program's balance but will become active in the future: - Introduce [Loyalty Program](https://github.com/talon-one/talon_go/blob/07573d293ffd2df5cf5053699a389337025eb0c4/docs/LoyaltyProgram.md) setting to control default points' pending duration - Introduce a couple of new attributes to communicate better a [ledger](https://github.com/talon-one/talon_go/blob/07573d293ffd2df5cf5053699a389337025eb0c4/docs/LoyaltySubLedger.md)'s points status (pending, active, expired and spent) - Introduce Loyalty Programs statistics [endpoint]((https://developers.talon.one/Management-API/API-Reference#getLoyaltyStatistics)) to get a loyalty program stats snapshot ####⚠️ ⚠️ Breaking Change: Loyalty Program points addition payload This version also introduced the ability to set both loyalty points _pending_ and _validity_ durations. In order to communicate these more clear, we have renamed the former `expiryDuration` attribute of [`LoyaltyPoints`](https://github.com/talon-one/talon_go/pull/10/files?file-filters%5B%5D=.go&hide-deleted-files=true#diff-1ed3738651d0b079312508954b5336517e852ad6e814bd706ff7173d48db280dL23-R24) entity to **`validityDuration`**: ```diff loyaltyProgramID := "1" profileIntegrationID := "Customer_Profile_ID" body := talon.LoyaltyPoints{} body.SetPoints(42.42) body.SetName("Points that expire after 3 days") - body.SetExpiryDuration("72h") + body.SetValidityDuration("72h") res, err = managementClient.ManagementApi. AddLoyaltyPoints(managerAuthContext, loyaltyProgramID, profileIntegrationID). Body(body). Execute() ``` ####⚠️ Deprecation Notice: Loyalty Program Ledger's `total` property Please note that we are deprecating the `total` property of the [`LoyaltySubLedger`](https://github.com/talon-one/talon_go/blob/07573d293ffd2df5cf5053699a389337025eb0c4/model_loyalty_sub_ledger.go#L19-L20) entity. In order to be more transparent and express better distinction between a customer's balance in a program (active, pending, and expired points). We will remove this property in the next version of the SDK, please use the new `totalActivePoints` property instead. ### Sandbox/Live Applications & Account Analytics Applications now can be flagged as live or sandbox (available only via the web application): - This can be seen via the `sandbox` attribute of the [Application entity](https://github.com/talon-one/talon_go/blob/07573d293ffd2df5cf5053699a389337025eb0c4/docs/Application.md#properties) - [Account analytics](https://github.com/talon-one/talon_go/blob/07573d293ffd2df5cf5053699a389337025eb0c4/docs/AccountAnalytics.md#properties) now respect this separation and reports new data points: `liveApplications`, `sandboxApplications` and `liveActiveCampaigns`
- Loading branch information