Hello,
I'm running into some confusion with VTC - Customer Rules API.
I'm trying to send a request in the sandbox environment to enable the declineThreshold control using spendLimit. With the following request, it seems declineThreshold does not get saved. However, alertThreshold does appear to be saved when I include it in the request instead.
Can you let me know if there's an issue with my request?
Furthermore, in this request there's a field called currentPeriodSpend and in the docs it's marked as a required field. However, I'm not sure what API to call to retrieve this value. What should I be setting this field to?
Request:
{
"globalControls": [
{
"shouldDeclineAll": false,
"isControlEnabled": true,
"userInformation": {
"applicationDefinedAttributes": [
"APP"
],
"bankingIdentifier": "BI",
"name": "BOA"
},
"spendLimit": {
"currentPeriodSpend": 100.00,
"type": "LMT_MONTH",
"declineThreshold": 200.00
},
"shouldAlertOnDecline": true
}
]
}
Response:
{
"receivedTimestamp": "2023-02-13 21:17:31.62",
"processingTimeinMs": 1423,
"resource": {
"globalControls": [
{
"shouldDeclineAll": false,
"shouldAlertOnDecline": true,
"spendLimit": {
"type": "LMT_MONTH",
"currentPeriodSpend": 100.0,
"alertThreshold": 200.0,
"timeZoneID": "GMT",
"currentPeriodEnd": "2023-02-28 23:59:59"
},
"userIdentifier": "4991104699359772",
"userInformation": {
"name": "BOA",
"applicationDefinedAttributes": [
"APP"
],
"bankingIdentifier": "BI"
},
"isControlEnabled": true
},
{
"shouldDeclineAll": false,
"shouldAlertOnDecline": true,
"userInformation": {
"name": "BOA",
"applicationDefinedAttributes": [
"APP"
],
"bankingIdentifier": "BI"
},
"isControlEnabled": true
}
],
"lastUpdateTimeStamp": "2023-02-13 21:17:32",
"documentID": "ctc-vd-6a07eba1-e1fd-48e6-8206-65cd4d9dec51",
"createdOnDate": "2023-02-10 18:41:32.709"
}
}
Hi @leighcrowder,
I've reached out to the product team regarding your inquiry and will reach back out when I receive a response.
Thanks,
Illana
Hi @I_Doroteo3 do you have any update on this? Thank you!
Hi @leighcrowder,
Could you also provide the following information so that I can share this with the team?
Thanks,
Illana
I ran the request again today with a new document-id and now that field seems to be saving... I'm not sure what changed as I ran the same request as I posted originally and now the response is returning with declineThreshold included. The only thing I can think of is that I somehow got my test data into a bad state.
I'm still not sure about my other question, though-- where should I get the value for currentPeriodSpend? Also, when setting an alert preference for example on transactionControls, will sending alertTheshold: "0.00" trigger an alert for any transaction performed on that card?
For example
{
"transactionControls": [
{
"isControlEnabled": true,
"controlType": "TCT_CROSS_BORDER",
"userIdentifier": "4991104699359772",
"alertThreshold": "0.00",
"userInformation": {
"bankingIdentifier": "BI",
"name": "BOA",
"applicationDefinedAttributes": []
}
}
]
}
---
Not sure if this is still needed, but I have my original request/response bodies in my initial post. I don't have the headers saved from the original request and since my new request is working, I don't have any header values/X-CORRELATION-ID that correspond to what I was originally seeing either.
Endpoint: https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols/{document-id}/rules
Likewise with document-id, I didn't save the document-id from the original request.
hi @I_Doroteo3
Do you have any update on my last questions? About what values should be used for currentPeriodSpend and whether alertThreshold being 0.00 will turn alerts on (and related if alertThreshold is null will that turn alerts off completely?)
Thank you so much!
Hi @leighcrowder,
Apologies for the late response; currentPeriodSpend is the total amount of all approved transactions performed within the time period for this control type.
If the Alert threshold is set to $0.00, every approved transaction (assuming the transaction is equal to or more than $0.00) would trigger a notification to the user.
Hope this helps!
Thanks,
Illana