Releases: talon-one/TalonOnePHPsdk
v9.0.0
Summary
New endpoints
Integration API
generateLoyaltyCard | POST /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card
Management API
createBatchLoyaltyCards | POST /v1/loyalty_programs/{loyaltyProgramId}/cards/batch | Create loyalty cards
createCouponsDeletionJob | POST /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job
disconnectCampaignStores | DELETE /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores
exportCampaignStores | GET /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores
exportLoyaltyCards | GET /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards
importCampaignStores | POST /v1/applications/{applicationId}/campaigns/{campaignId}/stores/import | Import stores
oktaEventHandlerChallenge | GET /v1/provisioning/okta | Validate Okta API ownership
scimCreateUser | POST /v1/provisioning/scim/Users | Create SCIM user
scimDeleteUser | DELETE /v1/provisioning/scim/Users/{userId} | Delete SCIM user
scimGetResourceTypes | GET /v1/provisioning/scim/ResourceTypes | List supported SCIM resource types
scimGetSchemas | GET /v1/provisioning/scim/Schemas | List supported SCIM schemas
scimGetServiceProviderConfig | GET /v1/provisioning/scim/ServiceProviderConfig | Get SCIM service provider configuration
scimGetUser | GET /v1/provisioning/scim/Users/{userId} | Get SCIM user
scimGetUsers | GET /v1/provisioning/scim/Users | List SCIM users
scimPatchUser | PATCH /v1/provisioning/scim/Users/{userId} | Update SCIM user attributes
scimReplaceUserAttributes | PUT /v1/provisioning/scim/Users/{userId} | Update SCIM user
Changes
Management API
activateUserByEmail | POST /v1/users/activate | Enable user by email address
deactivateUserByEmail | POST /v1/users/deactivate | Disable user by email address
v8.0.0
Summary
New endpoints
Management API
Changes
The disabled
and archived
campaign states were added.
⚠️ Deprecation Notice
v7.0.0
Summary
New endpoints
Management API
- Create Achievements
- Get achievement
- List achievements
- Update achievement
- List customer achievements
- Export achievement customer data
- Delete achievement
- Invite User
- Resend Invitation Email
- Update user
- Deactivate user by email address
- Delete user
- Delete user by email address
- Update role
- Export audience members
- Import audience members
- List audience members
- List audience analytics
- Get campaign access group
- List campaign access groups
v6.0.0: Track Event V2 endpoint, loyalty integration endpoint and loyalty, catalogs management endpoints
Summary
New endpoints
Integration API
Management API
- Export customers' tier data
- Export giveaway codes of a giveaway pool
- Import customers into loyalty tiers
- List items in a catalog
- Activate or deactivate notification
- Create notification about pending loyalty points
- Create store POST
/v1/applications/{applicationId}/stores
- Delete store DELETE /v1/applications/{applicationId}/stores/{storeId}
- Get store GET
/v1/applications/{applicationId}/stores/{storeId}
- List stores GET
/v1/applications/{applicationId}/stores
- Update store PUT
/v1/applications/{applicationId}/stores/{storeId}
Changes:
- Create strikethrough notification endpoint path was changed to
/v1/applications/{applicationId}/catalogs/notifications/strikethrough
⚠️ Deprecation Notice
- The
TrackEvent
endpoint/v1/events
was deprecated. Please use theTrackEventV2
instead/v2/events
. - The endpoint to create notification about campaign-related changes (POST
/v1/applications/{applicationId}/notification_webhooks
) was deprecated - The endpoint to delete notification about campaign-related changes (DELETE
/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}
) was deprecated - The endpoint to get notification about campaign-related changes (GET
/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}
) was deprecated - The endpoint to list notifications about campaign-related changes (GET
/v1/applications/{applicationId}/notification_webhooks
) was deprecated - The endpoint to update notification about campaign-related changes (PUT
/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}
) was deprecated
v5.1.0: Fix PHP 8.1 incompatibility issues in SDK
What's Changed
- fix: PHP 8.1 incompatibility issues in SDK by @rubyjohn93 in #19
New Contributors
- @rubyjohn93 made their first contribution in #19
Full Changelog: v5.0.0...v5.1.0
v5.0.0: Reopen session endpoint, loyalty data integration endpoints and loyalty card management endpoints
Summary
Integration API
- Reopen customer session
- Get customer's loyalty points
- List customer's loyalty transactions
- Get card's point balances
- List card's transactions
- Link customer profile to card
Management API
-
Export customer loyalty balances -- please note deprecation notice blow
⚠️ Deprecation Notice: Export customer loyalty balance to CSV endpoint
Please note that the Export customer loyalty balance to CSV endpoint is getting deprecated, please update your code to point at the new Export customer loyalty balances
v4.0.1: Fix query parameters are not processed forwarded to the request as expected
v4.0.0: Collection Items, Catalog Sync Loyalty Transactions retrieval & Guzzle's v7 adjustments
v4.0.0
New features support:
- Partial Returns
- Collection Items
- Catalog Sync
- Effects in getCustomerSession
- Loyalty Transactions retrieval
- and more...
⚠️ Upgrade Guzzle dependency to ^7
Starting version 4.0.0, we have updated the dependency of guzzlehttp/guzzle
from >= 5.3
to ^7
, this is why we have also bumped a major version of the library itself.
The code is now adjusted to use Guzzle's new functions when building parameters similarly to the development versions 3.5.0 and 3.6.0.
If you have already updated the dependency in your code to one of those versions, upgrading to v4.0.0 should impose no more further changes.
v3.4.0: Multiple personal coupons creation endpoint, Loyalty and Referrals counters and Export Endpoints
Summary
Management API
Introduce createCouponsForMultipleRecipients
Endpoint
An endpoint to allow creation of multiple coupons of the same configuration for up to 1,000 recipients at once.
Expose export endpoints as integral part of the SDK
All of our CSV export endpoints are accessible via the Web Application from the corresponding entity pages (refer to our Help Center for an example regarding Coupons).
Now these are also available endpoints as part of the SDK (links to our developer docs):
- Coupons Export
- Customer Sessions Export
- Effects Export
- Customer Loyalty Balance Export
- Customer Loyalty Ledgers Log Export
Example code snippet demonstrating consuming and printing the lines of a Customer Loyalty Balance Export:
// ...preparing api client...
// An example could be seen at the repository's README file: https://github.com/talon-one/TalonOnePHPsdk#management-api
$loyalty_program_id = '1';
$export_data = $managerApi->exportLoyaltyBalance($loyalty_program_id);
$csv = str_getcsv($export_data);
$headers = array_shift($csv); // extracting headers and remove their line
foreach ($csv as $line) {
// do something with line...
print_r($line);
}
One can also map the contents into object per line, with the headers as the object's keys using the snippet in the following link
Expose destroySession
Endpoint
Expose an existing endpoint to allow destroying a bearer token used in the context of the management-api.
This endpoint imitates a "logout" function and will make the attached token invalid for consequent requests.
Introduce loyalty effects related and referrals creation counters on Campaign entities
As part of the newly added budgets to campaigns (see relevant Help Center Section), we have added new counters on campaigns with regard to loyalty and referrals:
createdLoyaltyPointsCount
: Total number of loyalty points created by rules in this campaigncreatedLoyaltyPointsEffectCount
: Total number of loyalty point creation effects triggered by rules in this campaignredeemedLoyaltyPointsCount
: Total number of loyalty points redeemed by rules in this campaignredeemedLoyaltyPointsEffectCount
: Total number of loyalty point redemption effects triggered by rules in this campaignreferralCreationCount
: Total number of referrals created by rules in this campaign
⚠️ ⚠️ Breaking Change: Fix Campaign's discountCount
type from int
to float
Campaign's discountCount
counter property was all along calculated as a floating decimal number by our system.
From this release on the returned values will be floating decimals and not cut-off integers:
- **discountCount** | **int** | Total amount of discounts redeemed in the campaign. | [optional]
+ **discountCount** | **float** | Total amount of discounts redeemed in the campaign. | [optional]
Integration API
Improve Responses Transparency
We are constantly extending and improving our integration API to provide our consumers with the best transparency regarding what exactly has happened within their requests.
We have added new data points to our v2 endpoints effects in order to improve the transparency we aspire for:
- If an effect was triggered because of a specific coupon the effect will now include this coupon ID, see
Effect.md
- When a coupon is rejected we attach more details regarding the origin of the failure in
RejectCouponEffectProps
:conditionIndex
- The index of the condition that caused the rejection of the couponeffectIndex
- The index of the effect that caused the rejection of the coupondetails
- More details about the failure (if available)
- The same applies for referrals, when a referral is rejected we attach more details regarding the origin of the failure in
RejectReferralEffectProps
:conditionIndex
- The index of the condition that caused the rejection of the referraleffectIndex
- The index of the effect that caused the rejection of the referraldetails
- More details about the failure (if available)
Moreover, we have introduced a new response content, ruleFailureReasons
, which when requested will attach to the response a collection containing all failed rules, with details (see the ruleFailureReason
model to help narrowing down failures and further debugging efforts to a specific single condition or effect that caused the failure.
One "gotcha" to keep in mind: in order to maximize transparency, and due to the fact that we do not know in advance which campaign in the application the request targets, the list contains a collection of all failure reasons.
Meaning that, it might have "white noise" with data about failures that could be considered as "obvious" to the consumer. Therefore, we suggest always filtering the list by the campaign id that was expected to trigger and did not.
Attach Loyalty Program ID in responses
When the consumer requires that the response will contain the details of loyalty programs involved in processing the requests, we now attach the identifier of the loyalty program to the returned loyaltyProgramLedgers
models.
The idea behind attaching the identifier is to help streamline further potential requests to our Management API with regard to details about a Loyalty Program, for example getLoyaltyStatistics or getLoyaltyPoints, that require the program identifier as part of the URI of the endpoint.
⚠️ A reminder of The Deprecation Notice: Integration API@v1 endpoints
The deprecation was introduced already in the last release of the SDK, here is a kind reminder of the deprecation notices for Integration API@v1 endpoints:
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 highly encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See our developer docs section about API V2.0).
[☝️ Back to Table of Contents](#user-co...
v3.3.0: Customer Profile Update v2 dry runs & Loyalty Program Statistics
Summary
Integration API
- Introduce
loyalty
flag ingetCustomerInventory
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 should be a "dry run" or force it to "run rule engine"
Loyalty Programs
- Introduce Loyalty Programs statistics endpoint to get a loyalty program stats snapshot
Account Analytics
- Account analytics now respect live/sandbox application flagging and reports new data points:
liveApplications
,sandboxApplications
andliveActiveCampaigns
Misc: OpenAPI Generator version upgrade
We have upgraded the OpenAPI Generator used to release this SDK from v4.2.3 to v4.3.1 which includes a few subtle improvements in the generated code, for full list of changes, please consult the release logs' under the PHP section.