Pages

Tuesday 10 January 2023

Use Oracle Integration Cloud (OIC) to integrate Oracle B2C Service Cloud (formerly known as Oracle Service Cloud) with Salesforce.


Oracle Integration Cloud (OIC) can be used to integrate Oracle B2C Service Cloud (formerly known as Oracle Service Cloud) with Salesforce. Here is a general overview of the process:

  • Create an integration in OIC to connect to the Oracle B2C Service Cloud instance. This will require providing the credentials for the instance, such as the URL, username, and password.
  • Create an integration in OIC to connect to the Salesforce instance. This will also require providing the credentials for the instance, such as the URL, username, and password.
  • Once the connections have been established, you can create a mapping in OIC to specify how the data should be transferred between the two systems. The mapping will define the fields in the Oracle B2C Service Cloud incident object that should be mapped to the fields in the Salesforce case object.
  • Use OIC integration's scheduler or trigger to schedule how often the integration will run to sync the incidents from Oracle B2C Service Cloud to Salesforce.
  • Make sure that the user who is scheduling the job has enough privileges to access the information and make sure that the same field names are being used in both systems.
  • Once the integration is set up and tested, you can activate it and the incidents will be transferred from Oracle B2C Service Cloud to Salesforce on a regular basis.

Note: OIC is a powerful tool that can handle complex integrations, however, it is important to have a good understanding of both Oracle B2C Service Cloud and Salesforce, as well as the data that is being transferred, before setting up the integration. If you are not familiar with the platform, it's advisable to work with an expert that can help you set up the integration and make sure that it is working correctly.

Step by step details:

To build the integration between Oracle B2C Service Cloud and Salesforce using Oracle Integration Cloud (OIC), you will need to complete the following steps:

1 Create an integration in OIC:
     In the OIC console, go to the Integrations page and click the "New" button to create a new integration.
     Select "Cloud Application" as the integration type, and then choose "Oracle B2C Service Cloud" as the source and "Salesforce" as the target.
     Provide the necessary credentials for the Oracle B2C Service Cloud instance, such as the URL, username, and password.
     Provide the necessary credentials for the Salesforce instance, such as the URL, username, and password.

2 Create an integration flow:
     Once the connections have been established, you can create an integration flow to define the data mapping between the two systems.
     Drag and drop the Oracle B2C Service Cloud's operations and Salesforce's operations to map and define the fields to be transferred.

3 Configure the integration flow:
     You can use OIC's built-in transformations and mappings to transform the data as needed before it is transferred to the target system.
     You can also use OIC's routing and conditional processing capabilities to control the flow of data based on certain conditions.

4 Test the integration:
     Test the integration by running a test case and validating that the data is being transferred correctly from Oracle B2C Service Cloud to Salesforce.
     Make sure that the incident is being created in Salesforce and that all the necessary fields are being populated correctly.

5 Schedule the integration to run automatically:
     Once the integration is working correctly, you can schedule it to run automatically at a specified interval, such as every hour or every day.
     You can use OIC integration's scheduler or trigger to schedule the integration.

6 Deploy and monitor the integration:
     Deploy the integration and monitor it to ensure that it is running smoothly and that there are no errors.
     OIC provides detailed logging and monitoring capabilities that you can use to troubleshoot any issues that may arise.

It's important to note that the process may be slightly different depending on the versions of Oracle B2C Service Cloud, Salesforce and OIC that you are using.
It's also important to have a good understanding of both Oracle B2C Service Cloud and Salesforce's objects and fields you are working with, so that you can map them correctly and design the integration in a logical way.
I recommend taking some time to familiarize yourself with the OIC platform, and consider consulting with an expert or a professional service provider if you have any doubts, so that you can ensure a smooth and successful integration.

Bulk Import:

You can import all incidents in bulk from Oracle B2C Service Cloud to Salesforce using Oracle Integration Cloud (OIC). One way to do this is to use the "bulk load" feature of Salesforce, which allows you to import a large number of records at once using a CSV file.

Here's an overview of the process:

  • In OIC, create an integration flow that exports the incidents from Oracle B2C Service Cloud and maps the fields to the corresponding fields in Salesforce.
  • Use a CSV file as the target file format of the integration and configure it to export all incidents at once.
  • In Salesforce, go to the Cases section, then click on the gear icon on the top right corner and select "Import"
  • Select the file format and upload the CSV file exported by OIC integration.
  • Map the fields in the CSV file to the corresponding fields in Salesforce, and configure any additional options, such as the status of the imported cases.
  • Run the import and review the results.

It is worth noting that Salesforce does have a limit of 50,000 records when using the standard import wizard, depending on your org the limit may be higher. If you need to import more than that, you can use Salesforce Data Loader or another third-party data loading tool.

It's important to make sure that you test the import process thoroughly before importing all of the incidents, and to double-check the mapping of the fields. A best practice is also to first import a small sample of data and verify that everything is working as expected before doing a full import.

In addition, you should consider that in case of failure in the integration, OIC allows you to handle errors and retry mechanism, which helps to prevent data loss during integration process.

Tuesday 24 March 2015

What is the difference between int(1) and int(10)? Can the field with int(1) store 1000 in it?


Of course yes. Int(1) can store 1000 in it. Here's why:

    An int is always 4 bytes. That can store signed numbers from -2 billion to +2 billion (and unsigned numbers 0 to 4B). So, what does it mean if you declare an int(10)? It does not restrict the number of digits to 10. The (10) is the display width. It's only used if you use UNSIGNED and ZEROFILL with an integer type. Then the display of those numbers with a zero-padding on the left to 10 digits if they contain less than 10 digits. The field will have a default value of 0 for int(1) and 0000000000 for int(10). Example:


CREATE TABLE `employee` (
`id` int(10) unsigned zerofill DEFAULT NULL
)

 SELECT * FROM employee;
+----------------+

| id                |

+----------------+

| 0000000042 |

| 0000000101 |

| 0009876543 |

+----------------+

Wednesday 17 September 2014

PHP Security: Never trust your users

You should always clean your user input for safe use. This includes escaping strings correctly, stripping html and tags, preventing SQL injection, and other security issues. Anytime you use a $_POST, $_GET, or receiving any information that the user can modify, you must be sure that you properly escape it, and clean it in all cases.

Let's get into the details.

Clean All User Inputs

Anytime you use a $_POST, $_GET, or are receiving any information that the user can modify, you must be sure that you properly escape it, and clean it in all cases.

Preventing SQL Injection

Let's take a login form as an example to query our database and check to see if they logged in correctly. You might use a query like

select `username`, `password` from `users` where `username` = $uname' and `pass` = '$pass';

If someone were to type in ‘ or username like’%admin%’; into the login form, they would be logged in with an account that has the word admin in it. To fix this problem, after connecting to the MySQL server, you have to use

 mysql_real_escape_string($uname);

Using this will escape all characters that need to be escaped to prevent tampering with the MySQL query.

Another problem for MySQL is % and _, which can be escaped using

 addslashes($uname);

HTML filtering

Sometimes you may want to clean certain html entities in strings. To do this, you use

 $var = “<b>bold</b>”;
 htmlentities($uname);

This would output:

 &lt; b &gt; bold &lt; /b &gt;

To change it back to a usable form, you use

  html_entity_decode($var);

To strip the HTML tags from a string, and specify which strings you want to allow, you use

 $var = “<a><b>link</a></b>”;
 strip_tags($uname,'<a><b>');


The second argument is not needed, passing just the variable you want to clean will strip all tags from the string. This example would only allow <b> and <a> tags through. However, it is important to note that strip_tags() is not failsafe; that is, malformed tags can remove more or less than required.

To make sure that html does not render if it gets shown, you can use

  htmlspecialchars($uname);

If you have a string that is escaped from using mysql_real_escape_string() or addslashes(), you can use stripslashes($uname) to remove all of the slashes.
Putting it all together into a function, something like:

  function CleanStr($var) {
      stripslashes($var);
      htmlentities($var);
      strip_tags($var);
      return $var;
  }

Thursday 11 September 2014

MYSQL: mysqldump error

I wanted to take a backup of the database using the mysqldump command and got the following error:

mysqldump: Got error: 1044: Access denied for user root'@'localhost' to database 'information_schema' when using LOCK TABLES 

It might be the possibility that because I was taking the backup from a remote server, I did not have the LOCK TABLES permissions. mysqldump locks the tables before taking the dump of the database.

A quick solution to this would be to pass the –single-transaction option to mysqldump:

$ mysqldump –single-transaction -u user -p database_name > backup_file.sql

Another solution would be to grant LOCK TABLES to the user you are using to take the mysqldump. But if you do not have grant rights its good to use --single-transaction.

NOTE: There might be some cases where --single-transaction might fail. In that case use -single-transaction [use single dash (-) instead of a double dash (--)].

Wednesday 10 September 2014

Do hyphens (-) in MySQL table names cause issues?

Yes, it causes issues if you use it directly like

DESCRIBE my-table;

This will definately cause issues. You will get the following error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-table' at line 1

We can resolve this issue enclosing the tablename in backticks (`). The identifier quote character is the backtick (`). So the syntax will be

DESCRIBE `my-table`;

For more details about the permitted characters in unquoted identifiers, check the MySQL identifiers HERE.