1

Archival of SMS History Records

Background information

SMS-Magic does not have its archive mechanism for SMS History data. If you are facing storage usage problems for your Salesforce org and want to clear some storage by deleting older SMS History data then you can do it using Data Loader or Workbench tools.

Before you delete data, we recommend you to take back-up of SMS data.

Back up Procedure of SMS History Records

This can be done using Workbench & Dataloader. Be sure to include this in the KB.

Steps I – Take Data Back up (Full Export for SMS History Object)

Step II – Prepare file for Deletion

Step III – run deletion

Step IV – Review Success & Failure logs from Dataloader / Workbench.

Best Practices to delete SMS History Records

  1. Don’t Delete SMS History in a single go
  2. Try Deleting SMS History in chunks by using filters
  3. Verify after every chunk gets deleted
  4. It is advisable to delete the SMS History by date
  5. Check if any Process Builders/Workflows/ Apps are active on SMS History object. If yes, deactivate them.

Methods to delete SMS history records

  1. By Dataloader/Workbench.
  2. By Query from Developer Console(if req we can provide the queries)
  3. By List Views

Steps to Delete SMS History through Workbench

Incorrect records are deleted or the customer wants to restore the deleted messages. They should be able to do it using a backup file.

This can be done using Workbench & Dataloader. Be sure to include this in the KB.

Step I – Take Data Back up (Full Export for SMS History Object)
  1. Login to https://workbench.developerforce.com/ 
  2. Enter the org through which you are logging in (I have selected production)
  3. Enter the API version. (I have selected the latest version.)
  • In Action to perform – add “SOQL Query” and select the object as smagicinteract_smsMagic__c (This is the API name of SMS History object)
  • Now you need to run the query by selecting the column you wish to display. You can either select listview or select Bulk CSV.

Listview data –

After Selecting Bulk Csv, it redirects to a page where the CSV file is created and displays the status when it is completed.

To view the created file you need to login to salesforce and search “Bulk Data load jobs” in the quick find box.

To view the CSV file, click on “View Request”.

Step II – Prepare file for Deletion

Select Data→ Delete → Choose the file → Next → Select the CSV (The one requested from the salesforce to view the request).

Step III – run deletion (If you select -Permanently hard delete records option, you won’t be able to see/track deleted records from Recycle bin)
Step IV – Review Success & Failure logs from Workbench



View / Stop the Scheduled Actions / Messages

Step 1 – Check how messages are scheduled -:

  1. Via Workflow rule or Process Builder
  2. Via SMS-Magic Scheduler Addon or Via Schedule SMS button option from the object (from record/ list view/ campaign/Converse App)
  3. Via Campaign Launcher.
  4. Via Event Reminder Add-on

Step 2 – How to remove action based upon the source from where they are scheduled.

How to stop the scheduled actions/messages in salesforce

When the Workflow rule is Active:

When the Workflow rule is Active, the time trigger actions will be triggered based on the criteria. It means, as long as the workflow rule is active, the criteria will be re-calculated and time trigger actions will be fired accordingly. 

When the Workflow rule is Inactive:

If you deactivate the workflow rule, the scheduled actions will not be re-calculated due to which scheduled actions/SMS will be triggered even if the Process Builder is Inactive (As per the default behavior of salesforce). In this case, in order to stop the scheduled actions/SMS you need to delete the scheduled tasks. 

To do so follow the steps below: 

For Salesforce:

  1. Go to setup, then search for “flows” in the quick find box.
  2. Check and confirm if the listview is selected as “scheduled”.
  3. Delete the scheduled tasks which you want to.

For Workflow Rule:

  1. Go to setup search for “Time-Based Workflow” in the quick find box.
  2. Enter the criteria to monitor the queue.
  3. Delete the time-triggered action.

Below is the link for reference:
https://help.salesforce.com/articleView?id=workflow_queue.htm&type=0

When the Workflow rule is Deleted:

If you want to delete the Time based workflow if there is already an action scheduled in Salesforce then you need to remove all scheduled action from Time-Based Workflow (Monitor) queue. Then you can deactivate or delete the workflow.

In short, Even if the workflow is deleted, you still need to remove or delete time-based actions from the Time-Based Workflow queue. If you don’t delete these actions, then these scheduled actions will be triggered accordingly.

To delete scheduled actions from the workflow queue following are the steps:

  1. Go to setup search for “Time-Based Workflow” in the quick find box.
  2. Enter the criteria to monitor the queue.
  3. Delete the time-triggered action which you want to.

“For processes that are set to run when a record is created or edited, scheduled actions remain in the queue only as long as the criteria for those actions are still valid. If a record no longer matches the criteria, Salesforce removes the scheduled actions for that record from the queue.”

Points to be noted:

  1. All the above scenarios are applied for both workflow rule and process builder.
  2. If the evaluation criteria are set to Evaluate the rule when a record is: created, the workflow rule evaluates its time triggers only once. If the record that fired the rule changes to no longer meet the evaluation criteria, Salesforce removes the pending actions from the queue and never reapplies the rule to the record.
  3. Time-dependent actions can automatically be queued again if the record is updated and the evaluation criteria are set to Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria

You can refer below links for more detailed clarification.

FAQ: https://help.salesforce.com/articleView?id=000325723&language=en_US&type=1&mode=1

Considerations for Time-Dependent Actions and Time Triggers:
https://help.salesforce.com/articleView?id=workflow_time_action_considerations.htm&type=5

Via SMS-Magic Scheduler Addon on Via Schedule SMS button option from the object (from record/ list view/ campaign/Converse App)

To stop scheduled SMS with the above ways, below are the steps:

  1. Go to the “SMS scheduled” tab.
  2. Select and open the scheduled SMS record which you want to stop.
  3. Look for the “Schedule JobId” field and copy the value.
  4. Go to setup and type “scheduled jobs” in the quick find box and click on the same from the results.
  5. Search for Schedule JobId which you have copied from step 3.
  6. Select the record and click delete.

How to stop scheduled SMS via Campaign Launcher

  1. While you are still on the “Campaign Manager” tab, you should be able to view the List of scheduled campaigns.
  2. If not, click on the “Campaign Manager” tab under the “Campaign Launcher” app.
  3. From the list of scheduled campaigns, click on the dropdown icon on the right side of the campaign that you want to delete or stop.
  4. Select the “Pause Campaign” option. A confirmation selection pop-up will occur.
  5. Click on “Yes” to confirm and pause the campaign.
  6. The campaign status should be changed to paused.



Steps to Remove “Record Owner’s Sender Id” Option while Sending SMS

Important points to be noted before proceeding ahead:

  1. This option is available to delete only from SMS-Magic version 1.59 and onwards.
  2. Once deleted this option can’t be added again. The recommendation is to confirm the same with the customer before deleting this option.

Where is it used?

While sending SMS from salesforce org (through bulk SMS or automation/converse app), we get redirected to a page where we select sender ID, SMS template, etc. While selecting the sender ID, we can see there is one option called “Record Owner’s Sender Id” in the select sender ID dropdown.

How it works?

If we select this option while sending SMS, I will pick up whatever sender is assigned to the record owner. 

Ex-: Let’s assume, There is 1 contact record with the name “ABC” and the owner of this contact record is “XYZ”. There is a sender ID with the name “Welcome” assigned to the owner of “ABC”. i.e. “XYZ”.

Now, if we send SMS to contact “ABC” (Where we’ve selected sender ID as “Record Owner’s Sender Id” option from the dropdown) the contact “ABC” will receive SMS with the sender ID “Welcome”. 

To remove this option below are the steps:

  1. Goto setup and search for “custom metadata types” from a quick find box and click on it.
  2. Click on “outbound configurations” from results.
  3. Click “Manage outbound configurations”, you will see a list of options.
  4. Search (CMD+F) or look for “record owner’s sender ID” under “sender ID basic type column” and open the record.
  5. You need to delete two records: 1 for bulk conversion and another for Automated Conversations.
  6. Check for the fields below to confirm if you are deleting the correct option: (if you don’t see below fields, add from edit page layout)
1. For Bulk Conversations:
  • Outbound Configuration Name = Record_owners_senderID
  • Interface Category = Bulk Conversations
  • New Interface Category = Bulk Conversations
2. For Automated Conversations
  • Outbound Configuration Name = Record_owners_senderID
  • Interface Category = Automated Conversations
  • New Interface Category = Automated Conversations

7. Click on delete. (Don’t forget to delete both records)

8. Below are the screenshots for reference:

Refer steps: 1, 2 and 3

Refer step: 4

Refer steps: 6 and 7




SMS Template in ‘SMS On Workflow’ Addon Configuration

If you are using SMS On Workflow Version: 1.21 and above

  1. If the template used in the workflow XML configuration is updated, the XML will get updated automatically and we don’t have to make any further changes 
  2. The configuration name will remain the same 

Steps to check if XML is updated after changing the template:

  1. Go to the workflow -> Task
  2. Copy the configuration name from the comments field. It will look something like “ SMS-Notification-Lead-88c7”
  3. Go to all tabs -> workflow XML configuration -> search with config name 
  4. Open the XML and check <templateText> in XML string

Below are some screenshots for your reference:

Original Workflow XML Configuration:

Original Template:

Updated Template:

Updated XML:

If you are using SMS On Workflow Version: below 1.21 

  1. If the template is updated, XML will not get updated 
  2. You need to create a new XML and update it in the workflow task 

Follow the below steps:

  1. Go to SMS/Converse templates and edit the template 
  2. Go to all tabs -> workflow XML configuration 
  3. Click on new workflow XML configuration 
  1. Add the details as below 

Lookup object should be the object from which you are pulling the phone number. 

  • Select the “Mobile Phone field”in recipient type 
  • From the recipient list, select the phone field in which phone number is stored 
  • Select sender ID and template and click on the ‘Create’ button 
  1. After clicking on the name, configuration name will get generated 
  1. Copy this XML and update the comment field on the workflow task



Compliance Flows

Opt-In Flows

Trulli

Figure 1 – Consent via Web applications, Email etc: Double Opt-in Confirmation


Trulli

Figure 2 – Consent via Web applications, Email etc: Opt-in Confirmation


Trulli

Figure 3 – Contracts Agreements (offline): Double Opt-in Confirmation


Trulli

Figure 4 – Contracts Agreements (offline): Opt-in Confirmation


Trulli

Figure 5 – Import And Manage Consent Data in Bulk: Double Opt-in Confirmation


Trulli

Figure 6 – Import And Manage Consent Data in Bulk: Opt-in Confirmation


Trulli

Figure 7 – Trade Shows and Events Opt-in


Opt-Out Flows

Trulli

Figure 1 – Carrier Compliance: Opt-out


Trulli

Figure 2 – Content Type Opt-out