How to set up FTP Server in Siebel eMail Marketing

This guide is just useful when email Marketing Siebel installation is installed. If you still don´t have installed follow the instructions of: Siebel Marketing Installation and Administration Guide -

eMail Marketing allow to configuring templates as html email templates with images. For upload images to the server, because the Siebel Server could manage it, you need a FTP Server. If FTP Server is not well configured or you don’t put a title, you could attach pictures but only would be available for local computer or simply the system hang out.

Let´s see how to configure it. First of all we can read the technical note:
http://docs.oracle.com/cd/E14004_01/books/MKTG_InstallAdmin/MKTG_InstallAdmin_InstallEmailMktg9.html
The FTP Server allow to download server pictures to the template and upload local pictures to the server. Follow next steps:
1- Decide which will be the physical path for your FTP. Normally are used the path images of the Siebel web server: [SWEAppInstall dir]\PUBLIC\enu\images.
2- Create an FTP Server in the Siebel web server machine (in this guide we use IIS) and associate the path. If is ok, right click in FTP and click in explore should navigate inside [SWEAppInstall dir]\PUBLIC\enu\images directory

3- Enable option and add Everyone in Group or user names to give access to everybody. If you want to control access you can do it through security tab:

4- Make a backup of the config.xml file located in [...]sba81/[SWEApp]PUBLIC\enu\webeditor\v4.
And modify the next lines:
a)Put the domain in tag domain
b)Put the directory of FTP, where the images are, in:
webroot src=”<http://xxx.xxx/sales_enu/images/>”
To resolve path, being more fast in the FTP process put the path of FTP in src here:
resolvemethod value=”full” “<src=”http://xxx.xxx/sales_enu/images>” resolve=”true” allowoverride=”true

5- Working with FTP
Open a session in Siebel, Go to the site map and click on Offers. Add a new offer or click in an existent one. Click on All Treatments drilldown of a treatment with channel: web or email. This opens a template (third applet).

Install the ekstron pluggin if it´s not already installed

6- Select a template or create new one in HTML applet. You have source code view and normal view, and you can associate BC fields.

7- Insert a Picture (use the icon for pictures)
To use a file located in the server and put it in the template choose Select Server File. Put the path and file. For example http://server/xxx_xxx/images/ebus.gif
And always select a title for the image.

To upload an image to the server and at the same time using it in the template: select explore and select an image. When credentials appears simply click OK. without introducing nothing. If the config.xml is well configured you don´t have to put anything else. Introduce a title and at the same time that the image is introduced into template is uploaded to the server (ftp route).

A common problem arrived to this point is this bug:

Oracle Technical note summary:

Steps to reproduce:

1. Create a new Offer
2. Create a treatment on this offer of type “Web”
3. Drill into the treatment and click on “Template Name” in Edit Web Treatment view after clicking on New button.
4. Try to save the selected template, the below error is thrown.

Because of this error it is not possible for the user to associate a web template tot a web treatment.

Solution
1. In order to resolve this error:

a) create a new field in the Web Offer Template buscomp with following properties:

name = File Type
join = S_LIT
column = FILE_EXT

b) Recompile the SRF

Create EAI Object Manager in Siebel

This post explains how to create a customize object manager. In the example a EAI new object manager that works with AD (Active Directory).

Step 1: Create a copy of siebns.dat file located in Siebel Server machine in path: […]\sba81\gtwysrvr\ADMIN

Step 2: Open a session in the environment where you will create the object manager. Navigate to  Administration Server Configuration/Enterprises/Component Definitions

Step 3: Make a copy of the object manager of reference that you want to copy. This is not an exact copy, it’s a copy of the initial definition of the component. So take care that the next parameters are well populated:

  • Language
  • Locale
  • Application Name
  • Siebel File System
  • Maximum Tasks
  • Application Repository File

Step 4: Located in the record of the component created, click in Activate and then click in Sincronyze. Take care because once you activate you could lost focus on that record.

Step 5: Stop Siebel service and Gateway service in Siebel Server machine.

Step 6: Take down and restart  IIS service and WWW web service publishing service located in web server machine.

Step 7: Make a back up of eapps.cfg  file localed in Web Server machine in path

[…]\sba81\SWEApp\BIN

Open eapps.cfg with text editor and look for the object manager of reference used for copy. Copy the entrance and change name and alias. For example eai_fin is the obj mgr of reference and crm_desktop the new one:

[/eai_fin]ConnectString = siebel.TCPIP.None.None://faln342:2321/SBA_81/EAIObjMgr_finEnableExtServiceOnly  = TRUEWebPublicRootDir = c:\sba81\SWEApp\public\fin

SiebEntSecToken = Gf4GpDFSDsV04NbDDFDFDSJeiJFqF1ScqwEFcm2E

AnonUserName  = SVC-Siebeltest_anon

AnonPassword  = Gf4GpDFSDsV04NbDDFDFDSJeiJFqF1ScqwEFcm2E

[/crmdesktop_fin]

ConnectString = siebel.TCPIP.None.None://faln342:2321/SBA_81/MYEAIObjMgr_fin

EnableExtServiceOnly  = TRUE

WebPublicRootDir = c:\sba81\SWEApp\public\fin

SiebEntSecToken = Gf4GpDFSDsV04NbDDFDFDSJeiJFqF1ScqwEFcm2E

AnonUserName  = SVC-Siebeltest_anon

AnonPassword  = Gf4GpDFSDsV04NbDDFDFDSJeiJFqF1ScqwEFcm2E

If you need to recreate the password you could generate it opening cmd dos:

If you work in the same web server machine:

Cd […]C$\sba81\SWEApp\BIN

Else

pushd […]C$\sba81\SWEApp\BIN

(don’t forget to put C$ to access if was necessary.)

encryptstring.exe [mypassword]

this command will encrypt password.

Step 8: Restart IIS service and WWW service in web server machine

Step 9: Go to the IIS located in Web Server machine. In Web Sites / Default Web Sites

In Default Application do click right and add Application

Add Script map (this notes are taked in IIS 7)

put the same alias than in eapps

put in physichal path= [...]/sba81/SWEAPP/Public/[language of our eai objmgr]

copy of other virtual directory the swe and swef libraries and change the name….

Step 10: Restart IIS service and www service

Step 11: Optional, if we would like to put AD security instead of DB Authentication:

  • Go to Administration Server/Components/Parameters.
  • Change Security Adapter Mode from DB to ADSI
  • Change Security Adapter Name: Is the name of an existing profile configurated to AD.

If we don´t have this profile created, we need to created before, and we need the put Active Directory parameters. To do this: Go to Profile and some of the most important parameters that you have to populate with Active Directory information are:

  • Application_user
  • Application_Password
  • Base DN
  • CRC
  • Credential Attribute
  • Security DLL
  • Server Name
  • Shared Credentials

For more info see this technical note: http://dc431.4shared.com/doc/np2SeFJH/preview.html#6

Add Input language device and translated strings in Android

In Android mobiles and tablets, for example Samsung Galaxy, is only possible to select input languages ​​that come by default in the device.

To add new languages, for example if we want to create applications for other language that is not in the device, we should use the market and look for an application called More Local 2. With this application and the configuration of our app strings in the language you want will allow to see our application in that language.

We can control the language of our application selecting custom locale option in More Locale 2. So, If we can show our application in other country, we can do it. In addition, all applications that incorporate strings in this language will also be translated.

Step by step:

1- Download and install MoreLocale 2 App. This application has default languanges that you can extend selecting custom option (in the top of the right). Here you can looking for any language. Once you select the language, write the code of the country that you want to translate your application.

2- For example Portugal is pt. Lets create our String.xml translated in Portuguesese :

In the res path, create a folder named values-pt and new Android xml file of translations to Portuguese such as it specifies in Localized Files section of:

http://developer.android.com/resources/tutorials/localization/index.html

For extended info there’s this tutorial: http://www.icanlocalize.com/site/tutorials/android-application-localization-tutorial/

3- Select the new input language selecting custom locale option in More Locale 2 in our device

4- Run the app and change the input language in your device. You can do it in execution time.

 

EAI OutBound Web Service

Simple Data Export Example (Order, Line Items and Addresses)

This article shows an example of using EAI to export orders from Siebel to an external system. In this example we will expose a workflow that collect Siebel Order Data and call a web service to send the information as a XML.

Fist we want to create the Siebel outbound Web service, it will be created by one WSDL file provided by the external system.

Creating The Web Service.

We just navigate to web service administration view: Site Map –> Administration – Web Services –> Outbound Web Services, and import the file.

Once we finalize this action Siebel will create a new Outbound Web Service, that contain the definition, methods, namespace, etc needed by the external system, and also Siebel will create a Business Service in the repository that allow us to call the web service and two Integration objects, one, that represents the request parameters and other that represents the response of the remote system,.

So, as you can see Siebel helps us, making hard work for us.

Creating The Integration Objects.

The first thing that we notice when we see to the IOs is that the structure of these objects doesn’t correspond to a valid Siebel structure, and this fact is logic because those, represent the structure of Orders on the remote system, not in Siebel. So the next step is to build an IO that corresponds to a Siebel valid structure.

In our case we create an IO with name: Order Entry – Orders Out

We only want to send order header, line items and the shipping addresses, so we only need 3 Integration Components.

Note** We can create the Integration Object with Siebel wizard choosing new Object on the menu, or just copy the standard Order IO, and then customize the object according with our needed.

At this point we have 2 integration objects, one external created by the WSDL file, that represent the order in the external system and another that we created, that represent the order in Siebel, so we need to match both structures, we are going to create the data mapping between both IOs.

We navigate to Site Map –> Administration – Integration –> Data Map Editor:

We need to create a record on the top applet with following parameters:

Name: ERP Order Entry Interface
Source Object Name: Order Entry – Orders Out
Target Object Name:  ProcessSiebelOrder

And then for each integration component and integration component field, create the correspondence as you can see:

Creating the Worflow.

At this point we have the web service, internal integration Object, external Integration object and data mapping between both. So we are going to put all together.

To create a workflow with the following parameters:

Name: Order WS Outbound
Workflow Mode: Service Flow
Businees Object: Order Entry

And left the rest as default.

We need to add the following parameters as process properties

DebugMode: False, String  (only for debugging propose).
Error Code: String
Error Message: String
ExternalMessage: Hierarchy
IntegrationObject: Order Entry – Orders Out, String
MensajeString: String
Message: Hierarchy
Object Id: String
Process Instance Id: String
Siebel Operation Object Id: String
XMLDocument: Hierarchy


*** Note: When I developed this web service I needed to send only the main address of the order to the external system, that is the reason for extra boxes on the picture, but for this example we can omit the extra staff and we only focus on the main procees.

To add a start Box:

Then we add GetOrderData BS to build our Internal Order representation:

Name: GetOrderData
Businness Service Name: EAI Siebel Adapter
Businness Service Method: Query

Inputs:
OutputIntObjectName:  Process Property –>  IntegrationObject
PrimaryRowId:  Process Property –> Object Id

Outputs:
Message: Output Argument –> SiebelMessage
Then we transform our Siebel representation stored in our internal IO to a remote Order representation stored in our external IO.

Name: Transform Message
Businness Service Name: EAI Data Transformation Engine
Businness Service Method: Execute

Inputs:
MapName:  Literal  –>  ERP Order Entry Interface (Data mapping that we created previously).
SiebelMessage:   Process Property –>  Message
OutputIntObjectName:    Literal  –> ProcessSiebelOrder

Outputs:
ExternalMessage:  Output Argument  –>  SiebelMessage
Now we have a representation of order data in a external system form, just left call to the web service with this parameters

Name: Call Web Service
Businness Service Name: Service1Soap   (The BS Created by WSDL)
Businness Service Method: ProcessSiebelOrder

Inputs:
ProcessSiebelOrderSoapIn:parameters:   Process Property  –>  ExternalMessage

Outputs:  (Store the response not really needed)
XMLDocument:   Output Argument  –>   ProcessSiebelOrderSoapOut:parameters

Finally we add a end box.

Now we can deploy and call the workflow passing the Object Id =  row_id of our order as a parmeter and the workflow will call the web service to integrate this data on the remote system.

EAI Inbound Web Service

Importing Orders Into Siebel (practical example)

This article shows an example of using EAI to import orders into Siebel. In this example we will expose a workflow as a web service, this web service can then be called by external applications sending XML orders into Siebel to be imported.

First we need to create an Integration Object to represent the Order & Order Item data in a common structure that Siebel EAI understands. The Integration Object will represent the Order data in XML format. In Siebel Tools menu, click File > New Object then in the New Objects Wizard window, click the EAI tab, select Integration Object and click OK.

The Integration Object Builder window will be displayed, in this first window select the Project for the Integration Object and in the field Specify the source system of the new Integration Object, select EAI Siebel Wizard. Then click Next.

In the second window, select the source object: Order Entry, select the source root: Order Entry – Orders, then enter the name of the Integration Object to be a unique name. I will call it: Test Order Entry – Orders Out. Then click Next.

In the next window it will display the Business Object Components under the Order Business Object. You need to select what components to include, we need select “Order Entry – Orders” the root item, “Order Entry – Line Items” and “Order Entry – Orders_Ship To Address” components to import Orders, Lines and Addresses. Then click Next.

**This is the standard way but you can also copy the standard Order IO and then remove all the not needed Integration components.

The next window will display messages during creation of the Integration Object, click Finish.

Workflow Creation

In Siebel Tools Object Explorer > Workflow Process, create a new workflow with the following detail:

Name: Test Order WS Inbound
Workflow Mode: Service Flow
Business Object: Order Entry
Leave other default values as is.

Right click the new workflow record and select Edit Workflow Process from the right click menu. In the workflow canvass create the workflow as such:

Add a new process property to the workflow. In the Process Properties list, click New and enter the following detail:

Name: IO
In/Out: In
Data Type: Integration Object
Integration Object: Order Entry

Add a start step connected to a business service step. Update the business service step properties as such:

Name: Import Order
Business Service Name: EAI Siebel Adapter
Business Service Method: Upsert

Add an input argument record to the business service as such:

Input Argument: SiebelMessage
Type: Process Property
Property Name: IO


Create an End step and connect the business service step to the End step.

Save the workflow and Publish the workflow (click the Publish button).

Creating Web Service

In the Siebel Tools Workflow Process list select the workflow, right click and select Deploy as Web Service from the right click menu. A windows will then be displayed asking for operation name for the new web service, in this field populate: ImportOrder. It will also have another field on this window specifying Please specify URL for the Web Service. The following will be already defaulted into this field:

http://[webserver]/eai_[lang]/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&WSSOAP=1

Change to the name of the web server and to the language. For example the value of this at my implementation is as such:

http://server34/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&WSSOAP=1

Click the Finish button.

You or your Siebel Administrator now need to ensure that the EAI component is up and running and the web server eapps.cfg file has an entry for the virtual directory eai_. This will ensure that the web server knows where to route the web service calls to. I am not going to go into this in detail.

In the Siebel UI, navigate to Administration – Business Process, query for the workflow Test Order WS Inbound and click the Activate button.

Restart the Siebel server(s) as this needs to occur for the new Integration Object to work.

Navigate to Administration – Web Services > Inbound Web Services and query for Name: Test Order WS Inbound. This is the web service that we created. Click the Generate WSDL button and save the XML file to your PC.

Now we are ready to test the process. We can use a free software called soapUI that can call the web service. Download soapUI and install it. Google “Download soapUI” and you will find the link as the first in the list.

Open Soap-UI and select File > New soapUI Project, then in the new project window enter the following:

Project Name: TestOrderImport
Initial WSDL/WADL: Browse for the WSDL you saved earlier and select this.
Create Requests:

Once created, expand the TestOrderImport project and then expand the ImportOrder interface and then expand the operation under this and then double click the Request properties icon. This will display the sample XML for the web service.
It will have ? characters for all field values, remove the ? from all the fields and enter data into required fields for instance:

Now the address bar at the top of this window is the address of the web service. Verify that this is correct, if not edit this address. Then click the green arrow button at the top left of the window, this will invoke the web service passing the XML. The result will be displayed in the right hand pane of this window. Verify that the Order, Line Items has been imported.

How to work with Android, Installation Applications in tablets

1. Introduction

When we develop in Android we can do it through an emulator (usually eclipse emulator) or directly with the Tablet.

Advantages of working directly with the tablet are:

  • Faster than emulator
  • You see real dimension of UI over the tablet. In the emulator you see the dimension that you’ve specified in the emulator’s configuration and if you don’t have a screen resolution similar than the tablet you cannot see the real interface.
  • You can see the UI configuration in portrait and landscape
  • More efficient than emulator. Sometimes emulator stop unexpected and you have to restart loosing time.

The unique disadvantage for me:

  • If you want to access to local DB you should rooting the tablet (get to enter with a Admin User in Tablet Linux OS). Running the application in emulator you can access easier to the data and see the schema and data.

2. Android Installation

Android framework is composed by a SDK (Software Development Kit that is a Java framework for Android). The last version is 3.2 until now. Before install anything, match the following prerequisites:

http://developer.android.com/sdk/requirements.html

Mainly:

You need a supported OS

  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
  • Mac OS X 10.5.8 or later (x86 only)
  • Linux (tested on Ubuntu Linux, Lucid Lynx): GNU C Library (glibc) 2.7 or later is required. On Ubuntu Linux, version 8.04 or later is required.  64-bit distributions must be capable of running 32-bit applications. For information about how to add support for 32-bit applications, see the Ubuntu Linux installation notes.

You need an IDE to working with emulator.The recommended is Eclipse. Take care not all  eclipse versions are valid to working with Android.

  • Install: Eclipse 3.5 (Galileo) or greater
  • You’ll need a pluggin to integrate working with Android in eclipse emulator: Eclipse JDT (Java Development Tools) plugin (included in most Eclipse IDE packages)

Download and install SDK. Here you can find recommended exe: http://developer.android.com/sdk/index.html

Here it’s the Android official  installation guide:

http://developer.android.com/sdk/installing.html

3. Running Emulator

Start the android emulator often can become a task that we have to repeat several times to get start properly. The recommended steps to avoid repeating several times this task before it can work are:

Open eclipse. If the installation was successfully it will appear an icon  called “Open the Android SDK and Android Virtual Device( AVD) Manager”

Create one or better 2 new Virtual Device with the appropriate Android API and platform (3.0 or more, Api 11+). It’s important to take into account of: setup SD Card size select 300 Mb at least, overall if your app is big and mark wipe user data.

You can use as well another way to start the emulator through Run/Run Configurations…

If emulator doesn’t work. The following Eclipse tasks could help you:

  • Eclipse / Project Uncheck Automatically Built.
  • Mark clean and clear the projects we are working
  • Check Automatically Built
  • Close the emulator if it’s still  open
    In your PC clean all .img extension files of path  \. android \ avd \ [name of avd that works].avd. Left alone: config-ini and emulator-user.ini

4 Access to Local DB

Android Platform incorporates SQLITE Database called sqlite3 of Debug Bridge. SQLite is a relational client/server Database ideal for mobile devices. http://www.sqlite.org/

If you’ve developed an app that use SQLITE Database and you’ll want to access to the data to revise the data, here is an explanation of adb debug bridge commands to access inside of emulator data (if you want to access to Tablet Database you have to root the tablet before and use special apps. This will be object of another entry).

http://developer.android.com/guide/developing/tools/adb.html

If you want to access the DB created by applications on the emulator you can do it through the console. Write the bold commands by this order:

1- cd [unit: \ Android \ android-sdk \ tools>

2- adb-s [name of your emulator] shell. For example emulator-5554. This info you can get it typing adb devices

Or if we work just with one emulator just: adb shell or adb –e shell

This will allow you to enter to the emulator Android OS.

3- cd data/data/[name of the package]

4- cd Databases and dir will tell us if exists any database and its name.

5- Sqlite3 [name of the database.db] . This command allow you to access the Database info

6- .schema . This shows the structure of the DB

Here you can use DML such as inserts, queries, insert or delete actions. Or DDL such as create, alter tables, etc.

5- Running your app into the tablet when it’s connected to PC

You can directly work via usb over the tablet. To do this previously it’s necessary to download drivers to recognize Tablet by PC.

Download PDANet for Android from here:

http://www.junefabrics.com/android/download.php

How To Set Up ADB/USB Drivers for Android Devices in Win OS

http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/

How To Set Up ADB/USB Drivers for Android Devices in Linux OS

http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/

Once this done, connect the tablet to the pc and we can install applications. The application file required is a binary apk.

Save the apk in a PC folder and open a msdos console.Type:

1- cd [android unit where it is installed]: \ Android \ android-sdk \ tools>

if we execute:  adb devices we get the tablet device emulator code. Now execute this command:

2- adb install path\[name of your apk]

This is a step by step resum of how to install your app developed in emulator into your tablet:

1) Download the last SDK version to your PC and unzip it for example in C/Android/android-sdk. Use the recommended link in: http://developer.android.com/sdk/index.html   This is an installation guide for any hesitate http://developer.android.com/sdk/installing.html2) On the tablet click Settings > Applications > Development and make sure USB Debugging is on

3) Connect the tablet to the pc via usb

4) Install PDANet in the pc, contains the drivers because pc recognize the tablet. Follow the instructions of the installation. http://www.junefabrics.com/android/download.php If the drivers still don’t recognize the tablet follow: http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/

5) open a console: Windows+Run and put cmd

6) in the console put cd Android/android-sdk/tools adb devices –> if the previous steps are well done should show the device number

7) Go to the path in your pc where is the apk file that you want to install (you can find it in directory bin) then writes in the console adb install [path where is the apk file saved]/[apk file].  The installation of the application is completed.

 

6. Download an APK from an URL into the tablet (outside of the market)

  1. In your tablet Go to Applications-> Settings -> Applications-> Turn ON “Unknown sources”.
  2. In your table open the navigator and go to the website where is located the apk. Download it and android will save the apk in the tablet sd card.
  3. In your tablet go to Applications > Market and look for a free application called: “AppsInstaller” and install it.
  4. After installation is complete, run the app. “AppsInstaller” will automatically scan your SD Memory Card for apk files in it and select the apk. This will install the application in the tablet.