Salesforce Sales Cloud messaging
Connect to your Infobip account to start sending messages through Sales Cloud using your registered Infobip sender.
Use this app to set up and send messages in bulk to pools of contacts, or to send more personalized messages through direct sending over your preferred channel.
Some channels' messaging like WhatsApp and Viber consist of their own fields and formats, this is all taken into account when integrating with Sales Cloud and are supported.
This includes tracking and displaying message activity over profiles and reports, message templates, and rich messaging types.
What You Will Need
The main prerequisites for setting up the integration are:
- Infobip account. If you do not have an account, you can create one.
- A Salesforce user
Disclaimer
This integration works only with legacy Named Credentials.
In addition to what you need to connect to your Sales Cloud you will also need to:
- Have an account manager access the managed package
- Install the managed package
- Configure messaging settings in Sales Cloud
- Set up a site for URL tracking (optional)
- Grant access to reports by sharing
- Configure merge fields and delivery reports
Links to the relevant Salesforce help docs have been included as part of these docs where necessary.
Setup
These setup steps are the same for all channels but differ depending on the type of send method you use. You will need to complete these steps (some optional) before you can start sending messages.
Configure dynamic actions
If you are using dynamic actions for bulk messaging, you'll need to configure an action to trigger a message through Infobip.
- For direct messaging, go to the Contact/Lead records page. For bulk messaging, go to the Campaign record page
- Click the gear icon at the top of the page, and select Edit Page.
- Now in Lightning App Builder select Highlights Panel
- Add a new custom action and select an Infobip send action, for example, Send Infobip SMS
- For Contacts/Leads, add the Activities component to the record page to be able to view events
- Click Save to action your changes
Configure page layout
If you are using page layout, you'll need to configure it to have access to the send option in the Sales Cloud interface.
- For direct sending, navigate to Contact/Lead object in Object Manager, or for bulk sending, go to Campaign object.
- Go to Page Layouts and edit the layout you want the action to be visible from, and then select Mobile & Lightning Actions.
- Find Infobip send action (e.g. Send Infobip SMS) and drag it into the Salesforce Mobile and Lightning Experience Actions section.
- or Contacts/Leads, select Related Lists and find the Open Activities and drag it into the Related List section.
- Click Save to action your changes.
Enable sending for users
Infobip Bulk Sends are available as a related list on the Campaign object. You can add the related list to the campaign layout or campaign Record page, depending on what your existing solution uses. The related list will display all bulk sends created for a given Campaign.
Infobip Messages are available as a related list on Contact and Lead records. You can add the related list to the lead/contact Layout or Record Page, depending on what your existing solution uses. The related list will show all messages sent to a given Lead/Contact.
For more information about Salesforce related lists see their dedicated help docs.
Configure merge fields
By default, all fields from Contact and Lead objects will be available to add as merge fields from the Send Infobip component. If you do not wish users to use specific fields, or if they are not required, you can customize the set of fields available for message personalization.
- In Object Manager go to the Contact or Lead object.
- Go to Field Sets and create a field set named "Infobip_Personalization_Fields" (case sensitive).
- Drag and drop the fields you want to include in the Field Set section.
- Click Save to action your changes.
For more information about Salesforce field sets, see their dedicated help docs.
Enable tracking
URL tracking is optional however enabling it can help to see campaign efficacy through conversion rates. In order to collect tracking data you will need to set up a Salesforce site.
- Go to Setup > Sites and register your site domain
- Set the site name to "INFOBIP_Url_Tracking"
- Create and activate your site, then go to Public Access Settings and add the URL Tracking endpoint to Enabled Apex Classes
- From Public Access Settings go to View Users and select the user displayed and grant access to URL Tracking entities by assigning them App Guest permission.
URL tracking will only come into effect after the site has been created. This will not work on past communications.
Next steps
You can now start sending direct or bulk messages, but it is advised to continue the setup on the reporting side if you want to track activity straight away.
This is optional and does not prevent you from sending messages, however is advised to complete before sending out communications.
Direct messaging
Send messages directly to individual recipients through a single channel using the Contact / Lead objects. Use direct messaging to send things like personalized messages or information relevant to individuals only.
Before sending any messaging you will need to have completed the steps in the Send messages setup guide for Sales Cloud.
Direct messaging is available over the following channels:
Some steps and fields vary depending on the selected channel. This will be made evident where this is the case in the steps below.
The first step is to create a new campaign. To do so you will need to have Marketing User access, contact your admin for more info. You can also follow these steps if you are working on an existing campaign.
- Create a new contact/lead, and/or navigate to the contact/lead record page in Lightning Experience.
-
Click Send Infobip (channel) action for required channel and provide all of the required details in the pop up window. Note some of the fields may not be supported by some channels.
Sender Number Select a number from which messages will be sent. Here you'll see numbers which you have purchased through or registered with your Infobip account
If there are no options to select from, you'll need to purchase or register a number through Infobip
Add Contact / Add Lead These fields are visible if any of your campaign members are assigned as Leads or Contacts. Clicking on a lead or contact will display the available merge fields which are in {{Object.Field}} format
Add merge fields to message content so the values can be replaced with the data stored against lead/contact records in output messages
If your Campaign contains both Leads and Contacts, consider adding both Contact and Lead fields (e.g. "Hi, {{Contact.FirstName}}{{Lead.Firstname}}! Your discount expires today”)
Message Template WhatsApp only
Select an approved WhatsApp message template to use as your message content. Upon selecting a template you will see a preview which may display some additional fields.
Textual content itself is read-only as part of the template, however you can customize placeholders using the available merge fields. You will also need to provide a URL for any media included as part of the message, followed by the file extension
The grey file icon will become green to indicate successful validation
Some templates support buttons and can trigger WhatsApp responses, e.g. calls, redirects, etc. If button links contain placeholders you can customize these like in message content
URL buttons on the preview will redirect to the URL you specify. Quick response and call buttons on the preview show a grey message that explains the action they trigger
Message Content Provide your message text where you can also manually insert merge fields. Caution, any double curly bracketed words will be treated as merge fields, if no values are found it will be removed from the output message
Make sure to familiarize yourself with the character limits for SMS and WhatsApp
Enable URL Tracking SMS only
This option is disabled by default. Enable if your message contains a URL and you wish to track how many people opened the link
- Cick Send. Send-success notifications contain a link to the send record which you can view at any time. This record is also available in the Message related list, assuming your administrator has added it to the Contact/Lead page
Bulk messaging
Send messages to a group of recipients through a single channel using the Campaign object. Use bulk messaging to send things like announcements, notifications, updates, etc.
Before sending any messaging you will need to have completed the steps in the Send messages setup guide for Sales Cloud.
Bulk messaging is available over the following channels:
Some steps and fields vary depending on the selected channel. This will be made evident where this is the case in the steps below.
The first step is to create a new campaign. To do so you will need to have Marketing User access, contact your admin for more info. You can also follow these steps if you are working on an existing campaign.
- Add your recipients referred to as Campaign Members. To do so, select the required Leads and/or Contacts. You can send the message to a subset of campaign members without removing any from the campaign if required (see step 4).
- Go to the campaign record page in Lighting Experience and click Send Infobip (channel) action for the required channel.
-
Provide all of the required details in the pop up window. Note some of the fields may not be supported by some channels
Send to all Campaign Members This option is enabled by default. Disable this option is you wish to send messages to a subset of your campaign members
Select Campaign Members This option becomes available if you disable the above option, and allows you to select specific campaign members to send messages to. The right column contains the members to which messages will be sent
Sender Number Select a number from which messages will be sent. Here you'll see numbers which you have purchased through or registered with your Infobip account
If there are no options to select from, you'll need to purchase or register a number through Infobip
Is promotional Viber only
This option is enabled by default and is required to be used for all promotional transactions according to Viber's terms of use. This is for reference purposes only and does not affect message sending in any way functionally or visibly
Message elements Viber only
Select which message types to send and populate the subsequent message fields as required
Message Content is where you provide your message text where you can also manually insert merge fields. Caution, any double curly bracketed words will be treated as merge fields, if no values are found it will be removed from the output message
Image URL is where you provide your image URL and also supports merge fields
Button Text is the text to appear on your button on rendered output messages, and Button URL is where the recipient will be taken when they click the button
Add Contact / Add Lead These fields are visible if any of your campaign members are assigned as Leads or Contacts. Clicking on a lead or contact will display the available merge fields which are in {{Object.Field}} format
Add merge fields to message content so the values can be replaced with the data stored against lead/contact records in output messages
If your Campaign contains both Leads and Contacts, consider adding both Contact and Lead fields (e.g. "Hi, {{Contact.FirstName}}{{Lead.Firstname}}! Your discount expires today”)
Message Template WhatsApp only
Select an approved WhatsApp message template to use as your message content. Upon selecting a template you will see a preview which may display some additional fields.
Textual content itself is read-only as part of the template, however you can customize placeholders using the available merge fields. You will also need to provide a URL for any media included as part of the message, followed by the file extension
The grey file icon will become green to indicate successful validation
Some templates support buttons and can trigger WhatsApp responses, e.g. calls, redirects, etc. If button links contain placeholders you can customize these like in message content
URL buttons on the preview will redirect to the URL you specify. Quick response and call buttons on the preview show a grey message that explains the action they trigger
Message Content Provide your message text where you can also manually insert merge fields. Caution, any double curly bracketed words will be treated as merge fields, if no values are found it will be removed from the output message
Make sure to familiarize yourself with the character limits for SMS and WhatsApp
Enable URL Tracking SMS only
This option is disabled by default. Enable if your message contains a URL and you wish to track how many people opened the link
- Click Send. Send-success notifications contain a link to the bulk send record which you can view at any time. This record is also available in the Bulk Send related list, assuming your administrator has added it to the Campaign page.
See the troubleshooting section of these docs if you are running into any issues when attempting to send.
Reporting and analytics
See how your messages are performing and what kind of interactions they are getting, as well as getting insights into delivery statuses.
In this section you will find the steps on how to set up the following report types:
- Send reports for direct and bulk sends
- Delivery reports
- Chat app reports
- URL tracking
Direct send reports
Message activity, or Events, are saved on Contact / Lead record pages, and are automatically assigned to their creator. To avoid events being assigned to the app user, you will need to assign the message creator as the Event owner.
If for any reason the message creator (contact/lead) is not the message owner, the contact / lead should still be able to see the event and should be added as an Attendee.
In the Activity timeline, you will see a log of events which have clickable options to view more details. The following event logs are available: sent, delivered, failed, seen.
Clicking on any hyperlinked message details will display extra information specific to that event. Clicking the status will take you to that event page where you can view further event records and data.
Bulk send reports
To use this report and view report charts in bulk send records you need to share access to the required users.
- Go to Reports, select All Folders and find the INFOBIP folder.
- Click Share and set which users, roles, or groups should have access.
View allows users to view and export the reports. Edit allows users to edit the reports (add fields, rename, change chart type, etc.) Note that any edits made will be visible to all users from the Bulk Send record page. Manage allows users to share the folder with other users
- Click Done to action your changes.
For more information about Salesforce report sharing, see their dedicated help docs.
Delivery reports
By default delivery reports are automatically retrieved every 15 minutes. You can also get delivery reports on demand for a bulk send or a message by using the Get Delivery Report function from bulk send or message records.
To change the automated time interval go to Setup > Jobs > Scheduled Jobs and you should see four scheduled jobs. Use the Del option to remove them.
These jobs were configured by a post-installation script. Because a single job cannot run more than once per hour, four jobs were set up to retrieve data at 15-minute intervals.
To set up a new job run the following script:
System.schedule('Scheduled infobip delivery report fetch :00', '0 0 * * * ?', new infobip.DeliveryReportsScheduledJob());
Example script that will retrieve delivery reports every 20 minutes:
System.schedule('Scheduled infobip delivery report fetch :00', '0 0 * * * ?', new DeliveryReportsScheduledJob());
System.schedule('Scheduled infobip delivery report fetch :20', '0 20 * * * ?', new DeliveryReportsScheduledJob());
System.schedule('Scheduled infobip delivery report fetch :40', '0 40 * * * ?', new DeliveryReportsScheduledJob());
Every DeliveryReportScheduledJob run makes a callout to the Infobip API. If your organization is already making a lot of callouts, it is a good idea to take Salesforce limits into account when scheduling very frequent fetches of delivery reports
DeliveryReportScheduledJob uses the /sms/1/reports endpoint at Infobip API. This endpoint shows every status update only once. This means that if you have the solution installed in more than one org, or you are using the /sms/1/reports endpoint in any other way, the status updates might not show correctly. In this scenario, advise your users to use the Get Delivery Reports buttons
Delivery statuses
For sent messages you can check the delivery status in the message record.
- Go to a Bulk Send record which are available under INFOBIP Bulk Send related list on the Campaign page.
- On a record, go to the Related tab. In the INFOBIP Message related list you will see your sent messages and their statuses. Click on a related list to see all of the messages. You can also click on single messages to review them in more detail.
- Back on the Bulk Send record page, click Get Delivery Reports to get the most recent statuses for the messages in the bulk send. Statuses are automatically updated every 15 minutes or depending on your configured delivery report jobs.
- On the Message record page you can perform the following:
- Review message details, including message body, status, related Lead or Contact, and timestamps
- For SMS messages click Get Delivery Reports. This works the same as the Get Delivery Reports button on the Bulk Send record page, but only updates the statuses for the message in the current view
- For WhatsApp messages with any webhook connections, you can see the activity logs for message in the Related tab
- You can also go to the Reports tab on a Bulk Send record page. The Delivery Report donut chart displays how many messages sent, delivered, or failed. If you want to see more details, Click View Report.
Depending on the access your administrator provided to you, you will be able to view and export the report, or edit it (eg. add fields). If you cannot see the charts in the Reports tab, ask your administrator to share the INFOBIP Report folder with you.
Use the refresh button to reload the chart with the latest data
Reports for chat apps
Activity tracking for chat apps requires a separate app and integration user in Salesforce, and to be connected to webhooks Infobip end. Infobip support will be able to provide you with the required webhook connectors.
You will need this in order to be able to receive delivery reports and seen reports.
The first step is to create a connected app. Start by logging in to your Salesforce account.
- In Salesforce, navigate to Setup > Apps > App Manager and select New Connected App.
- Provide all the basic information and make sure to enable the OAuth Settings option.
- Set the Callback URL to "https://[your org url].my.salesforce.com/services/oath2/token".
- From Available OAuth Scopes select Manage user data via APIs and Perform requests at any time.
- Click Save to action your changes.
For more information about Salesforce apps, see their dedicated help docs.
Make sure to take note of your Consumer Key and Consumer Secret assigned to your new app. You will need both when you request help from Support.
Now you need to create the integration user. If you are using an existing user, you can skip the creation steps below.
- Navigate to Setup > User > New
- Provide all the basic information and use the link in the email you should have received to set a password
- Log in as the user and reset your security token via Personal Settings > Reset my security token
- Assign the permission INFOBIP App Guest to the user
For more information about Salesforce users, see their dedicated help docs.
The final step is to share your information with us to enable this. Contact Infobip Support. For the subject line, enter: Salesforce Sales Cloud app - Delivery Reports setup.
URL tracking
After sending messages containing links, and with URL tracking enabled, you will be able to see CTA counts in Bulk Sends reports and record pages.
Go to the Bulk Send record which are available under an INFOBIP Bulk Send related list on the Campaign page.
The Details section shows the total count of all clicks for all URLs you included in all messages in the Bulk Send. The Related section shows the total count of clicks for each URL in related lists.
- URL Click Count is how many clicks a certain link gathered
- URL Clicked Msgs is how many messages the link was clicked from
If one recipient clicked the same link multiple times, the first count will increase while the second will not.
Use the refresh button to reload the chart with the latest data.
use the View Report option to see report details. You will need the appropriate permissions from your administrator to be able to view, edit and export reports.
If you do not see the charts in the reports tab, ask your administrator to share the INFOBIP Report folder with you.
Note that if a message includes a link which is longer than 80 characters, the full link will not be displayed as URL tracking name. To check the URL you'll need to navigate to the URL Tracking record page and check the URL Address field.
Troubleshooting
The following steps are indented to provide diagnostic data to send to us when needing to troubleshoot.
- Navigate to Setup
- In the Quick Find box, input "Debug Logs"
- Under User Trace Flags, click New and input the following values:
- Traced Entity Type: User
- Traced Entity Name: Full Name of the user who will reproduce the issue
- Start Date: Use the current date using the link on the right from the field
- Expiration Date: Set this to a time after which you will have finished reproducing the issue
- Debug Level: Select SFDC_Devconsole
- Click Save.
- Go back to the page where you encountered the issue and reproduce it.
- Go back to the Debug Logs page. In the Debug Logs list you should see new entries with your provided name in the User column, and start time set to the time when you reproduced the issue. Download the logs and send them to the Infobip app support team.
For more information about Salesforce debug logs, see their dedicated help docs.