dxp-ux
Notifications (TMF-681)
- This use case creates a communication entity to send Email and SMS.
- It is implemented for 'PR' and 'PA'.
POST /communicationMessage
URL
https://[localhost]:[port]/dxp-ux/v1/PA/communicationMessage
URL PARAMS
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. | Y (PA, PR) |
Header
name | value | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y (PA, PR) |
client_secret | string | Password associated with the client_id. | Y (PA, PR) |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y (PA, PR) |
QueryParams
name | value | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
notificationType | string | Business notification type. | N/A (PR), Y(PA-RomingPurchaseConfirmation-Success) |
Data Model
Request Data Model
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
state | string | Communication message state type. Possible values [ initial, inProgress, completed, cancelled, failed ] | Y (PA, PR) |
priority | object | Sender of the communication message. | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
messageType | string | The type of message, such as: SMS, Email, Mobile app push notification | Y (PA, PR) |
sender | object | Sender of the communication message. | Y (PA, PR) |
sender.phoneNumber | string | Phone number of the sender, if the communication type is SMS. | Y (PR), N(PA) |
sender.name | string | name of the sender, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
receiver[] | array | Receivers of the communication message. | Y (PA, PR) |
receiver[].phoneNumber | string | Phone number of the receiver, if the communication type is SMS. | Y (PA, PR) |
receiver[].'@type' | string | type of the receiver, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
content | string | The content of the communication message | Y (PA, PR), N/A (PA-RomingPurchaseConfirmation-Success) |
characteristic[] | array | Any additional characteristic(s) of this message | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].name | string | Name of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].value | any | Value of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].'@type' | string | type of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
@type | string | type of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
receiver subRequest - dataModel
field | type | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
---|---|---|---|---|
phoneNumber | string | Phone number of the receiver, if the communication type is SMS. | Y (PA, PR) | { "phoneNumber": "9393130477" } |
@type | string | type of the receiver, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance) | { "@type": "LogicalResource" } |
characteristic subRequest - dataModel
field | type | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
---|---|---|---|---|
name | string | Name of the characteristic | N/A (PR), Y(PA) | {"name": "$Parameter1", "value": "Mr. Jones"} |
value | string | Value of the characteristic | N/A (PR), Y(PA) | {"name": "$Parameter1", "value": "Mr. Jones"} |
@type | string | type of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance) | {"@type": "PARAMETER"} |
Response Data Model
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
state | string | Communication message state type | Y (PA, PR) |
priority | object | Sender of the communication message. | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
messageType | string | The type of message, such as: SMS, Email, Mobile app push notification | Y (PA, PR) |
id | string | Unique identifier of Communication Message | Y (PA, PR) |
sender | object | Sender of the communication message. | Y (PA, PR) |
sender.phoneNumber | string | Phone number of the sender, if the communication type is SMS. | Y (PR), N(PA) |
sender.name | string | name of the sender, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
receiver[] | array | Receivers of the communication message. | Y (PA, PR) |
receiver[].phoneNumber | string | Phone number of the receiver, if the communication type is SMS. | Y (PA, PR) |
receiver[].'@type' | string | type of the receiver, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
characteristic[] | array | Any additional characteristic(s) of this message | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].name | string | Name of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].value | any | Value of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
characteristic[].'@type' | string | type of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance, PA-RomingPurchaseConfirmation-Success) |
@type | string | type of the characteristic | N/A (PR), Y(PA-PrepaidAdvanceBalance) |
receiver subResponse - dataModel
field | type | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
---|---|---|---|---|
phoneNumber | string | Phone number of the receiver, if the communication type is SMS. | Y (PA, PR) | { "phoneNumber": "9393130477" } |
@type | string | type of the receiver, if the communication type is SMS. | N/A (PR), Y(PA-PrepaidAdvanceBalance) | { "@type": "LogicalResource" } |
Key Considerations :
- Please refer the examples from the following URL - DXP UX - POST CommunicationMessage
Key Considerations for PR:
- The Paytm team will manage email and SMS templates.
- We are assuming that there won't be a large payload for P0 notifications and attachment.
- Both application/json & application/zip request payload is supported.
- P0 notifications will be customer-specific and will be sent one at a time.
"SMS"
- For "SMS", the message is sent from Mavenir.
- Mavenir doesn't accept special characters in "content" field (Example: á, é, ñ).
- Mavenir will send SMS to only one reciever.phonenumber at a time.
- Mavenir will send SMS with the same name sent from input request field "sender.name". If we wont receive sender.name from input request, ESB will send default value as "Liberty".
- There is no format and length validation on reciever.phoneNumber in ESB.
- Mavenir doesn't accept spaces and special characters in case of Phone Number, expected phoneNumber format "1++"countryCode"++PhoneNumber". Example: 1787XXXXXX.
"Email"
- For "Email", ESB is integrated with AWS SES Service.
- Sender email(from email address) should configured in AWS SES, same configured email should be passed. Example: For eCommerce LCPR "shop-noreply@libertypr.com" is configured.
- The payload.content type should be "JSON" string.
Key Considerations for PA:
General SMS Key points:
- The SMS is sent from Mavenir.
- Mavenir doesn't accept accent / special characters in "content" field (Example: á, é, ñ).
- Mavenir will send SMS to only one reciever.phonenumber at a time.
- Mavenir will send SMS with the same name sent from input request field "sender.name". If we won't receive sender.name from input request, ESB will send default value as "Liberty".
- Mavenir doesn't accept spaces and special characters in case of "sender.name", expected "sender.name" format Example: MasMovil.
- There is no format and length validation on reciever.phoneNumber in ESB.
- Mavenir doesn't accept spaces and special characters in case of Phone Number, expected phoneNumber format "1++"countryCode"++PhoneNumber".
- In case of any dynamic parameters in the template, the request need to be sent by adding notification_type (queryParameter) and characteristics in request payload accordingly.
- "state" should be sent as "initial" in the request.
roamingPlanPurchase-purchaseConfirmation:
- For Roaming Purchase Confirmation SMS usecase when the purchase is successful, the queryParam 'notificationType 'should be 'ROAMING_PURCHASE_CONFIRMATION' and characterstic 'ProductName' should be sent in input payload request (refer the example 'PA-MiAPP-Purchase-Confirmation-SMS-Success-Request').
- When the plan purchase can not be completed, Static failure message should be sent in the input request payload (payload.content).
- Sender name should always need to be sent as 'MasMovil'.
- For purchase confirmation SMS notification success usecase, the SMS content value will be 'Su paquete
<ProductName>
ha sido activado. Disfruta tu viaje!' - For purchase confirmation SMS notification error usecase, the SMS content value will be
'Error de transaccion
Hubo un error y no pudimos completar la transaccion. Puedes volver a intentarlo o cambiar el metodo de pago'
prepaidAdvanceBalanceAndPlans:
- For prepaidAdvanceBalanceAndPlans characteristic[] array is dynamic and will be sent from input request
/communicationMessage/send:
URL
https://[localhost]:[port]/dxp-ux/v1/CR/communicationMessage/send
Base URI Parameter
Name | Type | M/O | Description |
---|---|---|---|
businessId | string | M | businessId string M Business unit identifier. Example: "CR” |
Headers
Name | Type | M/O | Description |
---|---|---|---|
channelId | string | O | Channel to identify the business group. |
Security Headers
Name | Type | M/O | Description |
---|---|---|---|
client_id | string | M | Client Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332 |
client_secret | string | M | Client secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43f |
QueryParams
Name | Type | M/O | Description |
---|---|---|---|
notificationType | string | M | Business notification type. Example: "B2B_PLACE_ORDER_CUSTOMER" |
Data Model: CR B2B
Field Name | M/O | Notes |
---|---|---|
Subject | M | For B2B_PLACE_ORDER_CUSTOMER: Su orden de Liberty ha sido solicitada For B2B_PLACE_ORDER_AGENT: Web B2B Venta - Empresa: Ex: Web B2B Venta - Empresa: LLA For B2B_PLACE_LEAD_CUSTOMER: Su solicitud de contacto con Liberty ha sido recibida For B2B_PLACE_LEAD_AGENT: Web B2B Lead - Empresa: Ex: Web B2B Lead - Empresa: LLA |
receiver.email | M | The recipients email address |
sender.email | M | Senders email address |
Type | M | Email. Currently only supported |
Characteristic | M | Is the array object with name value pairs. |
"name": "CUSTOMER_NAME", "value": "david" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "PHONE", "value": "9999-9999" | M (Format should be : XXXX-XXXX (8 digits in 2 groups of 4 digits separated by a Hyphen)) | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "COMPANY", "value": "LLA" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "ID_NUMBER", "value": "9876543210" | M (Format should be: XXXXXXXXXX (10 digits with no separation)) | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "EMAIL", "value": "fname.lname@gmail.com" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "PRODUCT_NAME1", "value": "Triple Play Full" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "PRODUCT_SUPERCATEGORY_NAME1", "value": "3P-Bundles" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_ORDER_CUSTOMER/ B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |
"name": "REQUEST_URL", "value":"https://libertycr.com/es/home-empresas? u_content=GoogleAds&utm_medium=cpc&utm_source= google.com&utm_campaign=CRC_B2B_LAUNCH" | M | M for notificationType= B2B_PLACE_ORDER_AGENT/ B2B_PLACE_LEAD_AGENT |
"name": " MESSAGE", "value":"Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt consequatur ad impedit. At nostrum aspernatur non totam, voluptatem quis. Blanditiis, debitis pariatur non vel deserunt dolorum voluptate aliquid perspiciatis possimus?" | M | M for notificationType= B2B_PLACE_LEAD_AGENT/ B2B_PLACE_LEAD_CUSTOMER |