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.


Monday, 8 September 2014

What is the difference between == and === in PHP?

The == operator just checks to see if the left and right values are equal. But, the === operator (note the extra “=”) actually checks to see if the left and right values are equal, and also checks the variable types.

Friday, 10 January 2014

How to get a free domain and free hosting?


Steps to make your free domain and free hosting:


- Click dot.tk and login [with google or facebook or email or whatever]

- Once you signed in go to the domain panel tab on top, and select add a domain domain Ex. coolwebsite.tk

- Select free domain and press next.

- Put the registration length to 12 months.

- Once you are done with your .tk domain on dot.tk, register with 000webhost.com and create your new .tk domain.

- Or login to your 000webhost.com account and create a new domain if already registered.

- Select "I want to host my own domain" and enter your .tk website name and set a password.

- When the account is created there will be a notice on top that your namedserver is not set.

- At the right you can view the account details.

- Copy the IP address and go to your dot.tk account and go to the domain panel.

- Click on "MODIFY" to add the IP address to your selected domain Ex. coolwebsite.tk

- Select "Dot TK DNS Service".

- Under the hostname put your .tk domain name [Ex. coolwebsite.tk] and under the IP enter the IP you copied from 000webhost.com and then click "Add New".

- Again under the hostname put your .tk domain name with www [Ex. www.coolwebsite.tk] and under the IP enter the IP you copied from 000webhost.com and then click "Add New".

- Click "Save Changes".

- Everything is now set perfectly.

- You will have to wait for a while around 15-20 mins to activate the server.

- You can check my website:  http://traffix.tk 

Monday, 9 December 2013

GIT Part 2

Getting started 

Let’s get started with GIT. We will start with installing. You can download it from here
Git-1.8.4-preview20130916.exe
We will be using windows. We will not use any third party softwares here, as it slows down the process. 
We will use Git Bash. So go to start and open Git Bash.
In this window type 
ssh-keygen
This command will generate a key. Out of the files that are created in the default folder location, open
the file named “id_rsa.pub”. This file contains the public key.
Now login to your github.com account (assuming that you already have a github account. If not it just takes 2 minutes. Go on and register for your free account on github.com) 
Go to properties >> SSH Key >> Add SSH Key that was created in the previous step (the one which we
created in id_rsa.pub)
Part 3 COMING SOON...

Wednesday, 16 October 2013

GIT Part 1

Linus Torvalds
Linus Torvalds

How did GIT come into existence?

Linus Torvalds, the creator of Linux, wanted to make an OS that was open source. He used to worK on UNIX. So, based on unix he started to develop his own operating system. Later on he also added in his team, the people all over the globe who were intrested in the development of Linux. Every on used VCS. But Linus Torvalds did not like the time it took just to commit a single line of code. So he decided to develop his own versioning system, which will complete the operations within approximatly 3 seconds. This is how GIT came into existance. GIT is free for public access. But if you want to make the repository private, you have to use their paid service.


What is Git?

Git is a Distributed Version Control Systems (DVCSs). In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every checkout is really a full backup of all the data. Furthermore, many of these systems deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project. This allows you to set up several types of workflows that aren’t possible in centralized systems, such as hierarchical models. 
 

Features

Git is easy to use. It’s incredibly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development.





Tuesday, 27 August 2013

Hyperlinks not working with jQuery mobile... Why?


Mobile jQuery processes each and every link and considers it as an ajax by default which will loads in the same page and not refresh the entire page. Links that point to other domains or that have rel="external", data-ajax="false" or target attributes will not be loaded with Ajax. Instead, these links will cause a full page refresh with no animated transition. Both attributes (rel="external" and data-ajax="false") have the same effect, but a different semantic meaning: rel="external" should be used when linking to another site or domain and data-ajax="false" is useful for simply opting a page within your own domain from being loaded via Ajax. Because of the security restrictions, the framework always opts links to external domains out of the Ajax behavior.

Let’s have a look at an example. I have many links on the page already and let’s say we have to popup using mobile jQuery. Adding rel="external" to each link is not possible as there are around thousand of links on my page. So using jQuery we can use the following code:

$(document).ready(function(){
    $("a").each(function(){
          $(this).attr("rel","external");
    });
}); 

The above code will apply rel attribute to all the links on the page. But if we want to 
implement a simple popup using the following code:
 
 <a href="#popupBasic" data-rel="popup">Open Popup</a>
 <div data-role="popup" id="popupBasic">
      <p>This is a completely basic popup, no options set.</p>
</div>
 
we will get issues as the “rel” attribute will also be applied to the link for popups too. 
So we can add a condition as shown below to avoid adding rel attribute to popup links:
 
$(document).ready(function(){
    $("a").each(function(){
        if($(this).attr("data-rel")!="popup") {
            $(this).attr("rel","external");
        }
    });
});

For more information click here
 
                                           

Sunday, 25 August 2013

INSERT … SELECT

INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
       [INTO] tbl_name [(col_name,...)]
       SELECT ...
       [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
With INSERT ... SELECT, you can insert many rows into a table from one or many tables. This is a method to insert data very fast.

Example:
INSERT INTO employee (dept_id,emp_name)
       SELECT d.d_id as dept_id, p.name as emp_name
       FROM department as d 
       JOIN people as p 
       ON d.category_id = p.category_id
       WHERE p.category_id < 20;

In the above example we have fetched the department ids and the names from the select query and inserted into the employee table.

Saturday, 24 August 2013

INSERT

The INSERT ... VALUES and INSERT ... SET forms of the statements are used to insert rows which have values that are explicitly specified.

INSERT [IGNORE]
       [INTO] tbl_name [(col_name,...)]
       {VALUES | VALUE} ({expr | DEFAULT},...),(...),...
       [ ON DUPLICATE KEY UPDATE col_name=expr
       [, col_name=expr] ... ]

OR
INSERT [IGNORE]
       [INTO] tbl_name
       SET col_name={expr | DEFAULT}, ...
       [ ON DUPLICATE KEY UPDATE col_name=expr
       [, col_name=expr] ... ]

The INSERT ...SELECT form inserts rows selected from another table or tables.

INSERT [IGNORE]    
       [INTO] tbl_name [(col_name,...)]
       SELECT ...
       [ ON DUPLICATE KEY UPDATE  col_name=expr
       [, col_name=expr] ... ]

You can use REPLACE instead of INSERT to overwrite old rows.
The following statement
will create a row with the fields with its default values:
INSERT INTO tbl_name () VALUES();

If you want to insert a value[dependent on the previous
column] into a  column, then you can use
expressions.
INSERT INTO tbl_name (col1,col2) VALUES(20,col1*5); 
This will create a row with a value 20 in col1 and 100 (i.e. 20*5) in col2. 
NOTE: You cannot use the columns in the expressions before they have been assigned values.
SO THE FOLLOWING STATEMENT BECOMES ILLEAGAL:
INSERT INTO tbl_name (col1,col2) VALUES(col2*5,20);