Showing posts with label Marketing Cloud. Show all posts
Showing posts with label Marketing Cloud. Show all posts

Thursday, 6 May 2021

Integration of Salesforce Marketing Cloud with Open Source CRM System using Rest API

INTRODUCTION

While working on one of the requirements for a transportation sector project for a client based out of Melbourne, Australia there was a requirement to import existing records\leads into the Salesforce Marketing Cloud from third party open source CRM system.

We also needed to provide specifications to add lead into SFMC on the fly from an external CRM system by doing necessary configuration. Given specifications are to be used by other CRM team to insert record from CRM to SFMC on the fly. Below are the detailed steps we need to follow:

APPROACH

1) For importing existing data into Salesforce Marketing Cloud, we have created Data Extension and fields into SFMC and used CSV Import.

2) For integration with third party system, Marketing Cloud provides two APIs that uses OAuth 2 authentication mechanism:
  • The REST API gives you more access to Marketing Cloud features.
  • The SOAP API gives you complete access to most email features.

In this scenario, we have used REST API to integrate with external system. 

Marketing Cloud administrator user is required to perform the actions needed for configuration. Following steps are executed in SFMC.

  • Log in as Marketing Cloud Administrator user in SFMC.
  • Go to Setup -> Apps ->Installed Packages.
  • Click New to create a new package.
  • In the New Package Details window, enter the Name and Description of the package.
  • Click on the Save button.
  • Click on Add Component and will open one pop-up window for setup.
  • In pop-up, select API Integration and click Next. 

  • Select Server-to-Serveras Integration type then click Next.
  • Select required permission for API and click the Save button. Permission can be updated in future, if required.
  • Copy Client Id, Client secret, Authentication URL, and REST URL which will be used for API integration in future steps.

  • Getting Access Token
    • Example Request:
      • Authentication endpoint can be retrieved from the above step.
      • Endpointhttps://YOUR_SUBDOMAIN.auth.marketingcloudapis.com/v2/token
      • Method: POST
      • Content-Type: application/json
    • Request Body:
  • {
    "grant_type": "client_credentials",
    "client_id": "7a9j47upktedde30uedl822p",
    "client_secret": "195527892567524157"
    • Example Response : HTTP/1.1 200 OK
    • Response Body:
  • {
    "access_token":"eyJhbLciOiJIPzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjIifQ.eyJhY2Nlc3NfdG9rZW4iOiJhYmJUQTlpSHZqRjkyd3Jkb0xWZEFCaloiLCJjbGllbnRfaWQiOiI3ZTRmYW1xaWUzcWtzdzlhNDRrcmxvZDgiLCJlaWQiOjEwNzU3Njc2LCJzdGFja19rZXkiOiJRQTFTMSJ9.wSFfEdeNrkoiU_tnmJ2ihm8iUqnJKlZoI3GlavTGBhs.hU4EsiC1e9txh_TCt90YlI2l7xZZ5E6_oa0xku3Jj9CCk1B72M4bhO3kUIyhwfVuB0MFbL0y9KD_RRFzg-nuqPgjPyONnby-iWopdZPBHd-3woupxCMST5-vfJO9qAED9qiUfYLS4WmHRuJTCX4NPScyu8BdROTVEe-D3iAoAeFoJX_rLZ9d5eEhIn1AvkYgoj9siuxAprHEvmySTgNIXkQA6uT_IQ-H1dbfOyJmlFKpYzvhvHb0KH7NJ24zy5bd2MQ5",
    "expires_in":1080,
    "token_type":"Bearer",
    "rest_instance_url":"mc563885gzs27c5t9-3k636tzgm.rest.marketingcloudapis.com",
    "soap_instance_url":"mc563885gzs27c5t9-63k636tzgm.soap.marketingcloudapis.com",
    "scope": "email_read email_write email_send"
    
    }

  • Upsert records in Data Extension: 
    • In a single synchronous call, the API upserts multiple data extension rows. The maximum size of a payload is 5 megabytes. We can post a maximum of 50 fields and 50 records at a time as a best practice.
    • Example Request: 
      • Host:https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com/hub/v1/dataeventsasync/key:YOUR_KEY/rowset
      • Method: POST
      • Content-Type: application/json
      • Authorization: Bearer YOUR_ACCESS_TOKEN
    • Request Body 

  • [ { "keys":{ "Email": "someone@example.com"}, "values":{ "LastLogin": "2013-05-23T14:32:00Z", "IsActive": true, "FirstName": "John", "FollowerCount": 2, "LastName": "Smith" } }, { "keys": {"Email": "someone2@example.com"}, "values":{ "LastLogin": "2013-05-23T14:32:00Z", "IsActive": true, "FirstName": "Jane", "FollowerCount": 2, "LastName": "Smith" } } ]
    • Example Response : HTTP/1.1 200 OK
    • Response Body:
  • [
         {
             "keys": {
                     "Email": "someone@example.com"
                     },
             "values": {
                     "LastLogin": "2013-05-23T14:32:00Z",
                     "IsActive": true,
                     "FirstName": "John",
                     "FollowerCount": 2,
                     "LastName": "Smith"
                     }
         },
         {
             "keys": {
                     "Email": "someone2@example.com"
                     },
             "values": {
                     "LastLogin": "2013-05-23T14:32:00Z",
                     "IsActive": true,
                     "FirstName": "Jane",
                     "FollowerCount": 2,
                     "LastName": "Smith"
                     }
         }
     
  • API returns a 400 response for an an invalid request with details on the error.

SUMMARY
Using Salesforce Marketing cloud APIs, third party open source CRM can be integrated with SFMC. APIs and its sample responses are used to add records on the fly into SFMC. For further details you can refer to this Link!

If you have any questions you can reach out our Salesforce Consulting team here.

Thursday, 29 April 2021

[SFMC Email Campaign]: Emails Send to Data Extension Not Delivered to all Subscribers

INTRODUCTION

While working on one of the requirements for a transportation sector project for a client based out of Melbourne, Australia, there was a requirement to run an Email Campaign using an automation studio with data source as DataExtension in Salesforce Marketing Cloud.


We've used SQL Query activity in automation studio to get filtered leads from DataExtension based on filter criteria (e.g. Date Range, Status etc.) and add it to another filtered DataExtension. Then the filtered DataExtension is used as a data source in Email Activity to run campaign. 


Challenge

The campaign ran successfully at the specified time, but looking at the SFMC Email Tracking, we have found that none of the emails was sent out even though all the records were having proper emails. 


Digging out in detail, we have found that due to Email field of data extension has a text data type.

 


APPROACH\RESOLUTION

First, we have removed the email field having text data type from filtered data extension. Then we have added new email field with Email data type and ran the campaign. This time, we were able to see emails sent out in SFMC email tracking.


Marketing Cloud uses the Subscriber Relationship to see a subscriber exists in All Subscribers and uses the email address field from the All Subscribers List as email address where email to be sent out.


If a subscriber does not exist in the All Subscribers List, OR there are several fields with an EmailAddress data type in the DataExtension, OR there isn't any field with an EmailAddress data type in the Data Extension, then system does not know which email address to use and will not send to those subscribers.


To ensure proper email delivery, we have to modify the DataExtension so that there should be only one field with an EmailAddress data type, and it should have the desired email address to be sent. 

If you have any questions you can reach out our Salesforce Consulting team here.

Tuesday, 12 January 2021

A Productive selling with Marketing Cloud

    Marketing Cloud, previously known as Exact Target, is the digital marketing arm of Salesforce product family as this CRM platform allows marketers to create and manage marketing relationships and campaigns with customers. 


    The Marketing Cloud incorporates integrated solutions for customer journey management, email, mobile, social media, web personalization, advertisingcontent creation, content management and data analysis.  

The software helps digital marketers to create personalized 1-to-1 email communications to drive better customer engagement and marketing ROI (Return on Investment).  


    The E-mail marketing solution is one of the most preferred marketing cloud features that is scalable and comprehensive. It can execute promotional and automated campaigns, highly personalized E-mails, transactional messages, behavior triggered messages and much more on this robust platform for businesses of all size and industries 

 

Image Source: - www.marketingcloud.today/salesforce-marketing-cloud-connect 

 

The Marketing Cloud is also connected to Salesforce Sales Cloud and Service Cloud, which enables coordination, that provides a unified experience and prevents customers from being contacted separately by marketers from all three groups. 


Marketing Cloud API and SFTP enables integration with any external systems. SSH File Transfer Protocol (SFTP) is a method for transferring data from one computer to another over the Internet. The SFTP server uses SFTP as a secure and flexible file transfer protocol. Importing lists and exporting information from SFTP server. 


    Unlike many other Email Marketing Providers, Marketing Cloud offers a robust API in several languages including C#, Java, Node, PHP, Ruby and Python. It offers both a SOAP and a REST API, but not all features are available in each. In general, the REST API has the newer features and Salesforce is constantly updating it. If your external system integration needs to be highly custom, this is the way to go. You can even take advantage of Heroku, Salesforce’s cloud-based application platform. 


Salesforce Marketing Cloud allows companies to personalize customer experiences across every channel using a combination of tools, which includes: 

1)Journey Builder: 

Make the journey of your customers from discovery to fulfillment using journey builder. Provide each of them with personalized journey and a connected experience at every stage of their buying journey, making them feels like they are only customers being handled by you.  


2)Email Studio: 

Create personalized emails tailored just for your contacts, filled with engaging and persuasive content for gaining the required traction. To send the right messages at right time you have to do is configure various data relationships and email templates 


3)Data Studio: 

It allows marketers to find new audiences and activate data with easy integration into other channels. It has a user-friendly interface that makes it easy for everyone to use. 


4)Social Studio: 

Social Studio is an all-in-one social media marketing and management tool. Configure different workplaces and social accounts on the most suitable platforms for reaching out to your target audience. Social studio is designed to improve your social media game! 


5)Advertising Studio: 

Advertising never goes out of fashion! Provide a platform for your out-of-box ideas for creating personalized advertising campaigns. Reach out to your existing and potential customers on multiple platforms with effective cross-channel advertising. 


6)Mobile Studio: 

It helps you create and send highly targeted mobile messages. It allows you to target your audience by automatically message delivery, analyze and tracking management. 


7)Interaction Studio: 

It helps your co-ordinate online and offline and offline customer experiences with real time interaction management. It helps you guide your customers along with appropriate purchasing journey and connects to offline interactions like call center and ATMS. 


8)Datorama: 

Use advanced marketing intelligence platform to connect all relevant data available across different platforms, obtain key marketing insights based on your campaigns and create robust marketing analytics apps for improved performance. 


9)Analytics Builder: 

Use your customer database to get an insight into the behaviors and trends regarding your clients using analytics builder. Create customized and automated reports to obtain a detailed and extensive summary of the activities conducted by your team, helping you make key business decisions. 


10)Audience Studio: 

Formerly known as Salesforce DMP (Data Management Platform), helps to create a complete customer profile as it updates in real-time in accordance with new data signals and sources. It’s a holistic platform that helps power insights across advertising, content and commerce. 


11)Pardot: 

Pardot is software as a service (SAAS) marketing automation platform. Its main feature is email automation. Acquire your B2B sales lead in a personalized way to leverage your sales process.  


Want to learn more? Contact us for free consultation or learn more about our Marketing cloud services at Binary Republik-SFDC. 

If you have any questions you can reach out our Salesforce Consulting team here.