Use to send an SMS or email feedback invitation to the customer after an interaction, transaction or milestone.
1.Send Send Email / SMS
Preparation
Please create a Send Rule in the Client Edit page
Obtain programme and location information
All location and programme information can be obtained through POM Lookup V2
1.1.1 Implementation
CR support team shall:
1.1.1.1 Generate a username and password for the client.
1.1.1.2 Set up / create a Client, Location, POM (Point Of Measure), Programme and share these details along with the username and password to the clients’ technical team and ask them to first authorize themselves by:
1.1.1.3 Authorization
1.1.1.3.1 Request
Method: POST
URL: api.feedback.fyi/auth/login
Example Body:
{
"username":"testing" ,
"password":"testing12345"
}
1.1.1.3.2 Response
Example Response:
{
"token": "eyJ0eXAiOiJKVs23bGciOiJIUzI1NiJ9.eyJleHAfdsgfSDYyNDQsInVzZXJOYW1lIjoidGVzdCJ9.f5Lsz6jPsKFXL4fktRUvAD5wj3b0_ihm_rOrW9jkRGw",
"expiration": 1517434473.269,
"userName": "testing"
}
1.1.1.3.3 Implementation
This token needs to be set in the header for all requests and is valid for 60 minutes once generated. Once the token has expired, use “/auth/login” to authorise again using provided username and password and receive a new token.
1.1.1.4 Send interaction / transaction details
1.1.1.4.1 Request
Method: POST
URL: api.feedback.fyi/invitation
Headers:
|
Key |
Value Example |
Format |
Req* |
Details |
|
Authorization |
eyJ0sUHBDusmUUmiYQiL.CJaJ0-XAiabs |
Alpha |
Yes |
The token which was received after successful submission of username and password. |
|
Content-Type |
application/json |
JSON |
Yes |
Body or JSON format. Some tools may populate this value by default when adding raw JSON to Body. |
Body Type: Raw / JSON
Body:
|
Key |
Value Example |
Format |
Req* |
Details |
|
clientDisplayId |
8291a9ed952342c5b5fe2915f2189e7c |
Alphanumeric |
Yes |
CR Support will provide clientDisplayID to clients.
Look at specific set up under Client in the CR system. |
|
|
|
Alphanumeric |
YES |
CR Support will provide a programmeDisplayId the client.
Look at a specific Programme set up under Client in the CR system. |
|
|
|
|
|
|
|
|
abc@g.com |
|
YES |
|
|
|
021000001 |
|
|
|
|
|
|
|
NO |
|
|
|
|
|
NO |
|
|
locationDisplayId |
|
Alphanumeric |
YES |
CR Support will provide locationDisplayId to clients. Look at a specific location set up under Client in the CR system. |
|
pomDisplayId
|
|
Alphanumeric |
NO* |
CR Support will provide pomDisplayId to clients. Look at a specific POM set up under Client/Location in the CR system. *Required IF location has two or more POMs / sub-measures |
|
|
|
|
NO |
Clients shall be able to pass any additional information after putting info in the specific tag and value.
Key is mapped to internal CR programme settings and must match case/spelling between client and CR.
Clients can add as many fields as required. To add / update fields, contact the CR Support team at support@customerradar.com. |
|
|
|
|
|
|
|
|
|
|
|
|
Example Request:
{
"clientDisplayId": "8291a9ed952342c5b5fe2915f2189e7c",
"programmeDisplayId": "1cf118a0326d47aa851a90b9674e90aa",
"sendData": [
{
"email": "abc@gmail.com",
"mobile": "0211234321",
"firstName": "Dave",
"lastName": "Brown",
"locationDisplayId": "1cf118a0326d47aa851a90b9674e90aa",
"pomDisplayId": "7547ct569yh67n0326vghddte86bkkn",
"metadata": [
{
"key": "booking_reference",
"value": "122334345"
},{
"key":"invoice_no",
"value":"INV00001"
}
]
}
]
}
Important:
1.1.1.4.2 clientDisplayId will be provided to you by Customer Radar Support.
1.1.1.4.3 If you receive an error such as:
a. No Feedback code found for this clientDisplayId, locationDisplayId, pomDisplayId & programmeDisplayId.
The locationDisplayId, pomDisplayId & programmeDisplayId can be obtained via the lookup v2 APIs.
b. To send an email invitation, the programme must set Postmark ID. Provide correct details & try again.
This Postmark ID is set by CR Support, contact us using tsupport@customerradar.com to resolve.
1.1.1.4.4 Response
Example Response:
{
"code": "00000",
"description": "success",
"data":"846673197418938368"
}
1.1.1.4.5 Implementation
This api should respond with 200 (success) if the SMS or Email has been triggered or should notify requesters about the error message 400 (Bad Request) if any mandatory attribute is missing in request or is wrong.