Using Taleo Bulk API

Introduction

In this post I would like to provide brief overview of Taleo Enterprise Edition Bulk API web services. Bulk API is a set of web service operations for bulk import and export of data to and from Taleo. These operations enable the transfer of large amounts of data asynchronously without impacting product performance.

WSDL Information about Bulk API web service can be obtained from your zone. For example for SmartOrg type the URL (which will be similar to https://myzone.taleo.net/smartorg/soap) in a browser. Enter the account credentials. For Recruiting you should use following URL https://myzone.taleo.net/enterprise/soap. Please note web services should be activated for your zone otherwise it will be inaccessible and you need to submit SR to support team.

For Bulk API we need to use IntegrationManagementService WSDL

bulk-api-services

For demonstration purposes I will use SoapUI web service testing tool. A free version of SoapUI is available. Simply go to http://www.soapui.org/, download the latest version and install.

Using Bulk API

In this section, I will illustrate how to use Bulk API import operation. In my scenario I would like to create Taleo user account from external identity system. I will use the following operations: submitDocument(), getMessageByKey(), getDocumentByKey(). Probably in production environment we should use submitLargeDocument() and getLargeDocumentByKey() which designed to handle large documents (over 50K) and should have MTOM setting enabled.

For more information please see Oracle Taleo Enterprise Integration Bulk API Reference Guide Feature Pack 14B http://docs.oracle.com/pdf/E58305_01.pdf

Despite its advantages, an extra complexity comes with the use of the Bulk API which is to implement the Send/Poll/Retrieve sequence. Because it is asynchronous, the following algorithm must be implemented:

Phase 1: Send

  • Run the submitLDocument action.
  • Get the MessageKey from the response.

Phase 2: Poll

  • Run the getMessageByKey action with the MessageKey from previous step.
  • From the response, get the CorrelationKey and State. Possible states are: 1 – NEW, 2 – INCOMING, 3 – READY, 4 -INPROGRESS, 5 – COMPLETED, 6 -INTERRUPTED, 7 -SUSPENDING, 8 -SUSPENDED, 9 – INERROR, 10 – STOPPING, 11 – DELEGATED.

Phase 3: Retrieve

  • Run the getDocumentByKey action with the CorrelationKey when status = COMPLETED
  • Get the response.

Please see screenshot for Phase 1:

submit-document

Sample Request code below:


<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:add=”http://www.w3.org/2005/03/addressing&#8221; xmlns:man=”http://www.taleo.com/ws/integration/toolkit/2011/05/management&#8221; xmlns:ns=”http://www.taleo.com/ws/integration/toolkit/2011/05″&gt;
<soapenv:Header>
<add:Action>http://www.taleo.com/ws/integration/toolkit/2005/07/action/import</add:Action&gt;
<add:ReplyTo>
<add:Address>http://www.taleo.com/ws/integration/toolkit/2005/07/addressing/queue</add:Address&gt;
<!–Optional:–>
<add:ReferenceParameters>
<!–You may enter ANY elements at this point–>
</add:ReferenceParameters>
</add:ReplyTo>
<add:MessageID>PS_SD_7701</add:MessageID>
</soapenv:Header>
<soapenv:Body>
<man:submitDocument>
<ns:Document>
<!–Optional:–>
<ns:Attributes>
<!–1 or more repetitions:–>
<ns:Attribute name=”version”>http://www.taleo.com/ws/so800/2009/01</ns:Attribute&gt;
</ns:Attributes>
<ns:Content>
<!–You may enter ANY elements at this point–>
<ImportEntities xmlns=”http://www.taleo.com/ws/so800/2009/01″&gt;
<User-create xmlns=”http://www.taleo.com/ws/so800/2009/01&#8243;
xmlns:m=”http://www.taleo.com/ws/integration/toolkit/2005/07&#8243;
xmlns:SOAP-ENV =”http://schemas.xmlsoap.org/soap/envelope/&#8221;
xmlns:tn=”http://www.taleo.com/ws/integration/tn/2005/07&#8243;
xmlns:wsa=”http://www.w3.org/2005/03/addressing”&gt;
<User>
<CorrespondenceEmail>ogenry@invalidemail.com</CorrespondenceEmail>
<FirstName>O</FirstName>
<LastName>Genry</LastName>
<ContentLanguages>en</ContentLanguages>
<CorrespondenceLanguage>en</CorrespondenceLanguage>
<!– <Title>
<value locale=”en”>Test-title</value>
</Title> –>
<UserAccount>
<UserAccount>
<Loginname>ogenry</Loginname>
<ForceChangePassword>yes</ForceChangePassword>
</UserAccount>
</UserAccount>
</User>
<Password>test1234</Password>
<Null/>
</User-create>
</ImportEntities>
</ns:Content>
</ns:Document>
</man:submitDocument>
</soapenv:Body>
</soapenv:Envelope>

Mandatory tags are Action,  MessageID and Attribute version.

Next screenshot for Phase 2:

get-message-by-key

And last one for Phase 3:

get-document-by-key

As you can see operation has been completed successfully. For final check I would like to login to the my taleo zone and try to find new user by e-mail (ogenry@invalidemail.com)

Unbelievable It’s really works!

ogenry-user1

Good luck and remember:

Experience increases our wisdom but doesn’t reduce our follies.
– Josh Billings

Advertisements

2 thoughts on “Using Taleo Bulk API

  1. Thanks Josh for such wonderful blog. I was successfully created user by following this blog. Though I know TCC but not much familiar with web services. can you please provide information on TCC to create the web services and API calls.

  2. How do we assign user groups, user types and configuration profile using the API calls while creating the users? This info would be really helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s