Creating a Case for an SMS
Overview
Whenever a user sends a message and the message is delivered to the below link, a case is created with the message received and is linked to the contact from which the message was received. It returns a JSON with the newly created caseId and case number.
URL : /services/apexrest/smsToCase
JSON to be sent from Workbench:
Copy
{
"ANI":"+1712304567",
"message_Body": "Test SMS creation-5/9/2019 5:02pm",
"subject":"smsToCase - 5/9/19 at 5:02pm",
"description":"Create support ticket via smsToCase for testing in QA environment to verify message record with contact name "
}
In the database, it creates a case with parent Account and Contact and case origin as SMS.
- You can see the received message with the number it came from.
- Write the message to send to the number displayed in the message.
- You can choose the Action to send message.
Smoke Test
SL# | Use Cases | Steps to Test | Test Cases | Expected Result | Actual Result |
---|---|---|---|---|---|
1 | Send messages to Case from Workbench | Below are the received values: ANI:’+17685310975′, message_Body:’Hello’ subject:Test subject, description:test for subject and description | After receiving the values, a case is created with the contact related to phone number and the account related to the contact. A related record for SMS is created. | A case should be created with account and contact. The message should display in the chat box. | A case is created with account and contact value. A related record is created. The message is displayed in the chatBox. |