Develop > Persistence layer > WebSphere Commerce Web services with JSP pages > Understand the WebSphere Commerce Web service framework > WebSphere Commerce as a service provider > Inbound Web services provided


Synchronize organization service

The synchronize organization service is an inbound Web service responsible for adding or updating an organization in WebSphere Commerce to synchronize WebSphere Commerce with the external master repository.


Typical use cases


Endpoint URL and operation

The default endpoint URL of this inbound Web service is https:// hostname:8000/webapp/wcs/services/MemberServices. The operation of the service is SyncOrganization, with the SyncOrganization BOD as request and the ConfirmBOD BOD as response.


Request

Requests to this inbound Web service are in the form of SyncOrganization BODs. There are two types of requests that can be made:

  1. Add or update an organization

  2. Add or update an address for an organization


Add or updating an organization

Requests to add or update an organization are mapped to com.ibm.commerce.usermanagement.commands.OrgEntityAddCmd and com.ibm.commerce.usermanagement.commands.OrgEntityUpdateCmd respectively and should contain the following information:

XPath* Type Maps to the following command parameter Description Required
ApplicationArea/BusinessContext/ContextData USERDATA - Context Data. For example:

  • storeId

  • langId

N
DataArea/Sync/ActionCriteria/ActionExpression/@actionCode string action The action code. Valid values are... Add: to add a organization Change: to update an existing organization Y
DataArea/Sync/ActionCriteria/ActionExpression string commerceObject Action Expression. Must be specified...

  • Organization

Y
DataArea/Organization/OrganizationIdentifier/DistinguishedName string distinguishedName Distinguished name of the organization. Y - when updating an organizationN - when adding an organization
DataArea/Organization/ParentIdentifier/DistinguishedName string parentDN Distinguished name of the parent organization. Y - when adding an organization and OrganizationType equals 'OU'. When OrganizationType =O, this parameter is not mandatory; it defaults to Root Organization.This parameter only applies when adding an organization.
DataArea/Organization/OrganizationName string orgEntityName Short name for organization (O) or organization unit (OU). Y - when adding an organizationN - when updating an organization
DataArea/Organization/OrganizationType string orgEntityType Type of OrgEntity. Valid values are... O: organization OU: organization unit Y - when adding an organizationThis parameter is only applies when adding an organization.
DataArea/Organization/BusinessCategory string businessCategory The business category, which describes the kind of business performed by an OrgEntity. N
DataArea/Organization/Description string description A description of the OrgEntity. N
DataArea/Organization/ContactInfo/Telephone[1] string phone1 The organization's primary phone number. N
DataArea/Organization/ContactInfo/Telephone[1]/@type string phone1Type The type of phone used for the organization's primary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters. N
DataArea/Organization/ContactInfo/Telephone[1]/@publish string publishPhone1 Specifies whether the primary phone number is listed. N
DataArea/Organization/ContactInfo/Telephone[2] string phone2 The organization's secondary phone number. N
DataArea/Organization/ContactInfo/Telephone[2]/@type string phone2Type The type of phone used for the organization's secondary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters. N
DataArea/Organization/ContactInfo/Telephone[2]/@publish string publishPhone2 Specifies whether the primary phone number is listed. N
DataArea/Organization/ContactInfo/Email[1] string email1 The organization's primary email address. N
DataArea/Organization/ContactInfo/Email[2] string email2 The organization's secondary email address. N
DataArea/Organization/ContactInfo/Fax[1] string fax1 The organization's primary fax number. N
DataArea/Organization/ContactInfo/Fax[2] string fax2 The organization's secondary fax number. N
DataArea/Organization/ContactInfo/Address/@type string addressType The purpose of the address. Valid values are: S: shipping B: billing SB: shipping and billing (The default value) N
DataArea/Organization/ContactInfo/Address/City string city The city. N
DataArea/Organization/ContactInfo/Address/StateOrProvinceName string state The state or province. N
DataArea/Organization/ContactInfo/Address/Country string country The country or region. N
DataArea/Organization/ContactInfo/Address/PostalCode string zipCode The zip code or postal code. N
DataArea/Organization/ContactInfo/Address/AddressLine[1] string address1 The first line of the street address. N
DataArea/Organization/ContactInfo/Address/AddressLine[2] string address2 The second line of the street address. N
DataArea/Organization/ContactInfo/Address/AddressLine[3] string address3 The third line of the street address. N
DataArea/Organization/ContactInfo/Address/UserData/UserDataField USERDATA - Used to pass additional parameters to the target command. N
DataArea/Organization/ContactInfo/UserData/UserDataField USERDATA - Used to pass additional parameters to the target command. N
DataArea/Organization/ContextAttribute[j]/Name string attributeName portion of the following custom member attribute specification: &attributeName_storeId_r_n=value Name of a customizable attribute. N
DataArea/Organization/ContextAttribute/AttributeValue[k]/Value string value portion of the following custom member attribute specification: &attributeName_storeId_r_n=value Value of the customizable attribute. N
DataArea/Organization/ContextAttribute/AttributeValue[k]/StoreID string storeId portion of the following custom member attribute specification: &attributeName_storeId_r_n=value Store ID where the attribute value applies. If not specified, the value will apply to all stores. N
DataArea/Organization/UserData/UserDataField USERDATA - Used to pass additional parameters to the target command. N


Add or updating an address for an organization:

Requests to add or update a address for a person are mapped to com.ibm.commerce.usermanagement.commands.AddressAddCmd and com.ibm.commerce.usermanagement.commands.AddressUpdateCmd respectively. The requests should contain the following information:

XPath* Type Maps to the following command parameter Description Required
ApplicationArea/BusinessContext/ContextData USERDATA - Context Data. For example:

  • storeId

  • langId

N
DataArea/Sync/ActionCriteria/ActionExpression/@actionCode string action The action code. Valid values are... Add: to add an address for an organization Change: to update an address for an organization Y
DataArea/Sync/ActionCriteria/ActionExpression string commerceObject Action Expression. Must be specified...

  • Organization/ContactList/ContactEntry

Y
DataArea/Organization/OrganizationIdentifier/DistinguishedName string distinguishedName Distinguished name of the organization. Y
DataArea/Organization/ContactList/ContactEntry/@contactNickName string nickName The nickname or identifier of the address being added or updated. An organization can have a collection of addresses, each with a nickname. The address that an organization provides when registering is treated by the system as the organization's own address and the system sets the nickname of that address to the organization's orgEntityName. Y
DataArea/Organization/ContactList/ContactEntry/ContactName/LastName string lastName Last name of the contact person. N
DataArea/Organization/ContactList/ContactEntry/ContactName/PersonTitle string personTitle Title of the contact person, for example, Dr., Mr. or Ms. N
DataArea/Organization/ContactList/ContactEntry/ContactName/FirstName string firstName First name of the contact person. N
DataArea/Organization/ContactList/ContactEntry/ContactName/MiddleName string middleName Last name of the contact person. N
DataArea/Organization/ContactList/ContactEntry/Telephone[1] string phone1 The organization's primary phone number. N
DataArea/Organization/ContactList/ContactEntry/Telephone[1]/@type string phone1Type The type of phone used for the organization's primary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters. N
DataArea/Organization/ContactList/ContactEntry/Telephone[1]/@publish string publishPhone1 Specifies whether the primary phone number is listed. N
DataArea/Organization/ContactList/ContactEntry/Telephone[2] string phone2 The organization's secondary phone number. N
DataArea/Organization/ContactList/ContactEntry/Telephone[2]/@type string phone2Type The type of phone used for the organization's secondary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters. N
DataArea/Organization/ContactList/ContactEntry/Telephone[2]/@publish string publishPhone2 Specifies whether the primary phone number is listed. N
DataArea/Organization/ContactList/ContactEntry/Email[1] string email1 The organization's primary email address. N
DataArea/Organization/ContactList/ContactEntry/Email[2] string email2 The organization's secondary email address. N
DataArea/Organization/ContactList/ContactEntry/Fax[1] string fax1 The organization's primary fax number. N
DataArea/Organization/ContactList/ContactEntry/Fax[2] string fax2 The organization's secondary fax number. N
DataArea/Organization/ContactList/ContactEntry/Address/@type string addressType The purpose of the address. Valid values are: S: shipping B: billing SB: shipping and billing (The default value) N
DataArea/Organization/ContactList/ContactEntry/Address/City string city The city. N
DataArea/Organization/ContactList/ContactEntry/Address/StateOrProvinceName string state The state or province. N
DataArea/Organization/ContactList/ContactEntry/Address/Country string country The country or region. N
DataArea/Organization/ContactList/ContactEntry/Address/PostalCode string zipCode The zip code or postal code. N
DataArea/Organization/ContactList/ContactEntry/Address/AddressLine[1] string address1 The first line of the street address. N
DataArea/Organization/ContactList/ContactEntry/Address/AddressLine[2] string address2 The second line of the street address. N
DataArea/Organization/ContactList/ContactEntry/Address/AddressLine[3] string address3 The third line of the street address. N
DataArea/Organization/ContactList/ContactEntry/Address/UserData/UserDataField USERDATA - Used to pass additional parameters to the target command. N
DataArea/Organization/ContactList/ContactEntry/UserData/UserDataField USERDATA - Used to pass additional parameters to the target command. N

* Namespace prefixes ignored for simplicity.


Examples


Response

Responses of this inbound Web service are in the form of ConfirmBOD BODs.

A response to adding or updating an organization contains the following information:

XPath* Type Description
DataArea/BOD/BODSuccessMessage - This element will be present if the request was successful.
DataArea/BOD/BODSuccessMessage/UserArea/Organization/OrganizationIdentifier/UniqueID string Member ID of the organization

A response to adding or updating an address for organization will contain the following information:

XPath* Type Description
DataArea/BOD/BODSuccessMessage - This element is present if the request was successful.

* Namespace prefixes ignored for simplicity.


Examples


Exceptions

All exceptions are in the form of ConfirmBOD BODs with a ResponseCriteria element under the Confirm verb. They contain the following information:

XPath* Type Description
DataArea/Confirm/ResponseCriteria/ChangeStatus/Code string The correlation identifier. Can be used to uniquely identifie an exception in the server logs.
DataArea/Confirm/ResponseCriteria/ChangeStatus/ReasonCode string The reason code, which is either a WebSphere Commerce system error code WebSphere Commerce system error codeif available, or the EC message key plus an optional secondary error code if the WebSphere Commerce system error code is unavailable (usually in the case of application exceptions).
DataArea/Confirm/ResponseCriteria/ChangeStatus/Reason string The exception message.

* Namespace prefixes ignored for simplicity.

Message mapping file used: SyncOrganizationBODMapping.xml


Examples

Related reference

Inbound Web services provided


+

Search Tips   |   Advanced Search