Professional Documents
Culture Documents
Using Web Services To Do File-Based Data Import
Using Web Services To Do File-Based Data Import
This software and related documentation are provided under a license agreement containing restrictions on use
and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license
agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit,
distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering,
disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you
find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf
of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs
installed on the hardware, and/or documentation, delivered to U.S. Government end users are “commercial
computer software” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental
regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any
operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be
subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications that may create a
risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used
under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD
logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a
registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and
services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party
content, products, or services.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Parameters That You Can Use With the submitImportActivity Method ................... 11
This topic describes how to use the Import web service to import your custom data into Oracle
Sales Cloud.
For example, open SoapUI. SoapUI is a functional testing application. For more
information, see http://www.soapui.org.
B. Use the SOAP tool to send the following SOAP envelope:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://xmlns.oracle.com/oracle/apps/marketing/commonMa
rketing/
mktImport/model/types/"xmlns:mod="http://xmlns.oracle.com/oracle/
apps/marketing/commonMarketing/ mktImport/model/">
<soapenv:Header/>
<soapenv:Body>
<typ:submitImportActivity>
<typ:importJobSubmitParam>
<mod:JobDescription>description</mod:JobDescription>
<mod:HeaderRowIncluded>header_row</mod:HeaderRowIncluded>
<mod:FileEcodingMode>encoding</mod:FileEcodingMode>
<mod:MappingNumber>mapping_number</mod:MappingNumber>
<mod:FileContent>import_content</mod:FileContent>
<mod:ImportMode>CREATE_RECORD</mod:ImportMode>
<mod:FileFormat>delimiter</mod:FileFormat>
</typ:importJobSubmitParam>
</typ:submitImportActivity>
</soapenv:Body>
</soapenv:Envelope>
where:
description is a string that describes the purpose of the job. You can use any
string.
header_row is one of the following values:
Y. Your input file includes a header row.
N. Your input file does not include a header row.
encoding specifies the encoding that the Import web service uses when it
converts your input file. For example, UTF-8.
mapping_number specifies the number that you identified in step 1.
import_content specifies the Base64 encoding that you prepared in step 2.
delimiter specifies the character that import_content uses to separate data
elements. Your input file must use the delimiter that delimiter specifies. A data
element is one part of a record. For example, PersonFirstName is one data
element of a consumer record.
For more information about these parameters, see Syntax That the
submitImportActivity Method Uses on page 11.
Note that the Import web service includes the following methods:
submitImportActivity. Submits the file import activity.
getImportActivityStatus. Gets the file import activity status.
getImportActivityLogs. Gets the file import activity logs.
For this example, use your SOAP tool to send the following SOAP envelope:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://xmlns.oracle.com/oracle/apps/marketing/commonMa
rketing/ mktImport/model/types/"
xmlns:mod="http://xmlns.oracle.com/oracle/apps/marketing/comm
onMarketing/ mktImport/model/">
<soapenv:Header/>
<soapenv:Body>
<typ:submitImportActivity>
<typ:importJobSubmitParam>
<mod:JobDescription>GLD - Import Contact
Demonstration</ mod:JobDescription>
<mod:HeaderRowIncluded>Y</mod:HeaderRowIncluded>
<mod:FileEcodingMode>UTF-8</mod:FileEcodingMode>
<mod:MappingNumber>300100018631447</mod:MappingNumber>
<mod:FileContent>UGVyc29uRmlyc3ROYW1lLFBlcnNvbkxhc3ROYW
1lDQpHbGFuZG9 uLExhdXJlbnQNCkdsYW5kb24sUGllcnJl</mod:FileContent>
<mod:ImportMode>CREATE_RECORD</mod:ImportMode>
<mod:FileFormat>COMMA_DELIMITER</mod:FileFormat>
</typ:importJobSubmitParam>
</typ:submitImportActivity>
</soapenv:Body>
</soapenv:Envelope>
In your SOAP tool, make sure you add the user name and password that Oracle
Sales Cloud requires. For example, in SoapUI, click the Aut button in the lower-left
corner, and then enter the user name and password.
C. Make sure Oracle Sales Cloud sends the following reply:
<ns0:submitImportActivityResponse>
<ns0:result>
<ns1:JobId>300100018636453</ns1:JobId>
<ns1:Result>Success</ns1:Result>
</ns0:result>
</ns0:submitImportActivityResponse>
where:
JobId identifies your job. Make a note of this number.
4. Get the status of your job. Send the following request to Oracle Sales Cloud:
<typ:getImportActivityStatus>
<typ:importJobId>300100018636453</typ:importJobId>
</typ:getImportActivityStatus>
where:
importJobId specifies the number that you noted in step C on page 7.
Oracle Sales Cloud sends a reply. For example:
<ns0:getImportActivityStatusResponse>
<ns2:result>
<ns1:BatchId>300100018636457</ns1:BatchId>
<ns1:Status>status</ns1:Status>
<ns1:LoadDate>2012-10-03</ns1:LoadDate>
<ns1:RecordReadFromFile xsi:nil="true"/>
<ns1:LoadErrors xsi:nil="true"/>
<ns1:FormatErrors xsi:nil="true"/>
<ns1:SuccessfullyLoaded xsi:nil="true"/>
</ns2:result>
</ns0:getImportActivityStatusResponse>
where:
Status indicates the status of your job. For more information, see Statuses That
the submitImportActivity Method Uses on page 13.
5. Repeat step 4 until Oracle Sales Cloud sends the following reply:
<ns2:result>
<ns1:BatchId>300100018636457</ns1:BatchId>
<ns1:Status>COMPLETE</ns1:Status>
<ns1:LoadDate>2012-10-03</ns1:LoadDate>
<ns1:RecordReadFromFile>2</ns1:RecordReadFromFile>
<ns1:LoadErrors>0</ns1:LoadErrors>
<ns1:FormatErrors xsi:nil="true"/>
<ns1:SuccessfullyLoaded>2</ns1:SuccessfullyLoaded>
</ns2:result>
where:
Status is COMPLETE.
LoadErrors is 0.
FormatErrors is true.
SuccessfullyLoaded is SuccessfullyLoaded.
6. Optional. Check the log.
You can check the log to determine if an error occurred, or to get the PartyId for
each record. Do the following work:
A. In your SOAP tool, send the following request to Oracle Sales Cloud:
<typ:getImportActivityLogs>
<typ:importJobId>300100018636453</typ:importJobId>
<typ:batchId>300100018636457</typ:batchId>
</typ:getImportActivityLogs>
where:
importJobId identifies the number that you noted in step C on page 7.
batchId identifies the number that Oracle Sales Cloud sent in the reply in
step 4.
Oracle Sales Cloud sends a reply. For example:
<ns0:getImportActivityLogsResponse>
<ns2:result>
<ns1:LogFileName>log-Import Activity 1349272813558
Data File.csv</ ns1:LogFileName>
<ns1:LogFileContent>
<xop:Include
href="cid:24f39a91936b44eeb3d0c1d6f4db93d2"/>
</ns1:LogFileContent>
<ns1:ErrorLogFileName xsi:nil="true"/>
<ns1:ExceptionLogFileName xsi:nil="true"/>
<ns1:BatchId xsi:nil="true"/>
</ns2:result>
</ns0:getImportActivityLogsResponse>
where:
Include href specifies the Id that identifies the log file that Oracle Sales
Cloud sends.
B. Locate, and then open the file that Oracle Sales Cloud sent.
For example, in SoapUI you can do the following:
Click the Raw tab. SoapUI displays the following reply:
Content-ID: <24f39a91936b44eeb3d0c1d6f4db93d2>
ObjectKey,PersonFirstName,PersonLastName
100100028456712,Antonia, Pinas
100100028456713,Christina,Aamos
------=_Part_161_384756467.1349273628660—
To open the log file, click Attachments, and then search the Name column
for the Content-ID. In this example, you search for the following value:
24f39a91936b44eeb3d0c1d6f4db93d2
7. Verify your work:
Do one of the following:
In SoapUI, use a web service to verify your work.
For example, you can use the following getPerson operation of the
foundationParties web service or the PersonService web service:
<ns0:getPersonResponse>
<ns2:result>
<ns1:PartyId>100100028456713</ns1:PartyId>
<ns1:PartyNumber>CDRM_1384311</ns1:PartyNumber>
<ns1:PartyName>Christina Aamos</ns1:PartyName>
<ns1:PartyType>PERSON</ns1:PartyType>
<ns1:ValidatedFlag>false</ns1:ValidatedFlag>
<ns1:LastUpdatedBy>BULK_IMPORT</ns1:LastUpdatedBy>
<ns1:LastUpdateLogin>-1</ns1:LastUpdateLogin>
<ns1:CreationDate>2012-10-03T07:04:18.577084-
07:00</ns1:CreationDate>
<ns1:RequestId>99999</ns1:RequestId>
<ns1:LastUpdateDate>2012-10-03T07:04:18.577084-
07:00</ ns1:LastUpdateDate>
<ns1:CreatedBy>BULK_IMPORT</ns1:CreatedBy>
<ns1:OrigSystemReference>300100018636467</ns1:OrigSystemRef
erence>
where:
PartyId specifies the Partyid that you identified in step 6. For example, the
PartyId for Christina Aamos is 100100028456713.
In your Oracle Sales Cloud application, locate the data that you imported in step
3. You search for People in the Customer Data Management Dashboard.
Table 1. Parameters That You Can Use With the submitImportActivity Method
Parameter Description
CallListCode Specify the Call List Code. The Call List Code is a
marketing code that identifies a group of records.
DateFormat Specify the date format that your input file uses.
ErrorThreshold Specify the error threshold. The import runs until the
number of errors is less than the value that you specify for
ErrorThreshold.
Parameter Description
FileFormat Specify the file format that the import file uses. You can
use one of the following values:
TEXT_FILE. Specifies that the input file is a text file.
XML_FILE. Specifies that the input file is an XML file.
ImportMode Specify the import mode. You can use one of the
following values:
CREATE_RECORD. Creates new records.
UPDATE_RECORD. Updates records that the Oracle
Sales Cloud database already contains.
JobDescription Describe the import job. You can include any description.
You can include this description as a string. It is not
necessary to use quotes to enclose this string.
JobName Specify the name of the import job. You can specify any
name. You can include this name as a string. It is not
necessary to use quotes to enclose this string.
Parameter Description
duplicate lead, then it does not import the duplicate,
but it does report this duplicate in the Exception
report.
The Import web service considers each duplicate that
it finds as an error when it determines the allowable
error count threshold.
Status Description
RUNNING Indicates that the import is uploading data from the input
file to the interface tables.
Status Description
SCHEDULED Indicates that Oracle Sales Cloud has set a start time for
the import, but has not yet started this import.
Delimiter Description
FIXED_WIDTH_DELIMITER Specifies that the input file uses a fixed width to separate
each data element.
XML_DELIMITER Specifies that the input file uses an XML tag to separate
each data element.
Format Example
yyMMddHHmmssZ 010704120856-0700
yyyy-MM-dd'T'HH:mm:ss.SSSZ 2001-07-04T12:08:56.235-0700