E-Commerce Catalog Requests

Purpose: The CWServiceIn web service allows an external system to post the E-Commerce Catalog Request Message (CWCatRequest) directly to Order Management System and receive responses without the need of any queues.

The main purposes of the e-commerce catalog request job:

• receive and process catalog requests for sold to customers.

• create the sold to customer if the customer does not exist.

• update the sold to customer if the customer information is updated.

Additionally, if the response_required field is Y, the system sends an E-Commerce Catalog Request Response message back to the web storefront.

Duplicate catalog requests: If the Edit for Duplicate Catalog Requests (E46) system control value is selected, the system checks for duplicate catalog requests, based on match code. If a duplicate catalog request exists, the system does not create the duplicate catalog request. However, the system will still send an E-Commerce Catalog Request Response Message (CWCatreqResponse) back to the web storefront.

E-Commerce catalog requests in error: If the E-Commerce Catalog Request Message (CWCatRequest) contains an error, the system places the catalog request in the Catalog Request Interface table. You can correct the errors using the Working with the Catalog Request Interface (WCRU) menu option.

CTI Telephone Scan table: If you create a new sold to customer in an e-commerce catalog request and the Use Computer Telephony Integration (F26) system control value is selected, the system creates a record in the CTI Telephone Scan table.

Oracle Retail Customer Engagement customer integration: When you use the Oracle Retail Customer Engagement customer integration, if you create a customer through a catalog request, Order Management System sends the customer information to Oracle Retail Customer Engagement so that the customer records in the two systems are synchronized. See the Customer Engagement Customer Integration for more information.

In this chapter:

E-Commerce Catalog Request Setup

Customer Creation/Update Logic in E-Commerce Catalog Requests

- Creating/Updating Sold To Customers in E-Commerce Catalog Requests

- E-Commerce Catalog Request Response

E-Commerce Catalog Request Message (CWCatRequest)

E-Commerce Catalog Request Response Message (CWCatreqResponse)

E-Commerce Catalog Request Setup

The CWServiceIn web service allows an external system to post the E-Commerce Catalog Request Message (CWCatRequest) directly to Order Management System and receive responses without the need of any queues.

Web service authentication? Use the Working with Web Service Authentication (WWSA) menu option to define a valid user for basic web service authentication. If you use Oracle Identity Cloud Service for password authentication, in addition to creating the web service authentication user in Work with Web Service Authentication (WWSA), you must also create a corresponding user profile in Oracle Identity Cloud Service and assign the user to the corresponding web service role defined for the Order Management application.

Web service type? You can use the CWServiceIn web service as a SOAP-based web service or a RESTful web service.

Setup for the CWServiceIn SOAP-Based Web Service

Setup for the CWServiceIn RESTful Web Service

Setup for the CWServiceIn SOAP-Based Web Service

The CWServiceIn web service’s .wsdl (Web Services Definition Language) file, which is located on your application server, controls the function of the CWServiceIn web service. You send the E-Commerce Catalog Request Message (CWCatRequest) to the URL, or endpoint, specified in the wsdl. The CWServiceIn web service routes the messages sent to the endpoint and dispatches them to the E-Commerce Cancel process. When the E-Commerce Cancel process generates a response, the CWServiceIn web service routes the response.

SOAP envelope and message type: You need to embed each inbound message in the SOAP (Simple Object Access Protocol) message tags in order for the CWServiceIn web service to receive and process it correctly. Also, the type attribute in the inbound message identifies the Order Management System process, so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Catalog Request Message (CWCatRequest) is CWCatRequest.

Determine the endpoint: The endpoint is typically set to http://server:port/CWDirectCPService/services/CWServiceIn, where server:port identifies the application server where the wsdl is located and CWServiceIn is the name of the web service to call.

Sample Inbound Message in SOAP Envelope

The CWServiceIn web service requires that the inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Catalog Request Message (CWCatRequest) embedded in a SOAP envelope is presented below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://dom.w3c.org">

<soapenv:Header />

<soapenv:Body>

<dom:performAction type="xsd:string">

<![CDATA[

 

 

 

<Message type="CWCatRequest" target="string" source="string">

<CatRequest sold_to_opt_in="O1" sold_to_fax_phone="5085550100" sold_to_evening_phone="5085550101" sold_to_day_phone="5085550102" allow_mail="N" allow_email="N" allow_rent="N" sold_to_email="catreq@example.com" sold_to_zip="01581" sold_to_country="US" sold_to_state="MA" sold_to_city="Westborough" sold_to_apartment="1A" sold_to_address4="Address line 4" sold_to_address3="Address line 3" sold_to_address2="Address line 2" sold_to_address1="1234 Sample St" sold_to_busres="B" sold_to_company="Catalog Request" sold_to_suffix="" sold_to_lname="Brown" sold_to_initial="R" sold_to_fname="Thomas" sold_to_prefix="Mr" source_code="SOURCE" offer_id="001" response_required="Y" company_code="7">

<CustOwnerships>

<CustOwnership cust_own_confirm_date="07212015" cust_own_entry_date="07212014" cust_own_active="Y" cust_own_desc="2014 Subaru Outback" cust_own_ID="CAR"/>

<CustOwnership cust_own_confirm_date="01011986" cust_own_entry_date="12191985" cust_own_active="Y" cust_own_desc="1967 RAISED RANCH" cust_own_ID="HOUSE"/>

<CustOwnership cust_own_confirm_date="07212015" cust_own_entry_date="07212014" cust_own_active="Y" cust_own_desc="2011 SEA RAY" cust_own_ID="BOAT"/>

</CustOwnerships>

</CatRequest>

</Message>

 

]]>

</dom:performAction>

</soapenv:Body>

</soapenv:Envelope>

Setup for the CWServiceIn RESTful Web Service

You POST the E-Commerce Catalog Request Message (CWCatRequest) to the web service’s URL, or endpoint, of the RESTful service. The web service routes the messages sent to the endpoint and dispatches them to the E-Commerce Cancel process. When the E-Commerce Cancel process generates a response, the CWServiceIn web service routes the response.

Message type: The type attribute in the inbound message identifies the Order Management System process, so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Catalog Request Message (CWCatRequest) is CWCatRequest.

Determine the endpoint: The individual URL for the CWServiceIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/application/CWServiceIn, where server:port identifies the application server where the RESTful service is located and CWServiceIn is the name of the web service to call.

Sample Inbound Message using RESTful Web Service

The CWServiceIn RESTful web service does not require that inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Catalog Request Message (CWCatRequest) when using a RESTful web service is presented below.

<Message type="CWCatRequest" target="string" source="string">

<CatRequest sold_to_opt_in="O1" sold_to_fax_phone="5085550100" sold_to_evening_phone="5085550101" sold_to_day_phone="5085550102" allow_mail="N" allow_email="N" allow_rent="N" sold_to_email="catreq@example.com" sold_to_zip="01581" sold_to_country="US" sold_to_state="MA" sold_to_city="Westborough" sold_to_apartment="1A" sold_to_address4="Address line 4" sold_to_address3="Address line 3" sold_to_address2="Address line 2" sold_to_address1="1234 Sample St" sold_to_busres="B" sold_to_company="Catalog Request" sold_to_suffix="" sold_to_lname="Brown" sold_to_initial="R" sold_to_fname="Thomas" sold_to_prefix="Mr" source_code="SOURCE" offer_id="001" response_required="Y" company_code="7">

<CustOwnerships>

<CustOwnership cust_own_confirm_date="07212015" cust_own_entry_date="07212014" cust_own_active="Y" cust_own_desc="2014 Subaru Outback" cust_own_ID="CAR"/>

<CustOwnership cust_own_confirm_date="01011986" cust_own_entry_date="12191985" cust_own_active="Y" cust_own_desc="1967 RAISED RANCH" cust_own_ID="HOUSE"/>

<CustOwnership cust_own_confirm_date="07212015" cust_own_entry_date="07212014" cust_own_active="Y" cust_own_desc="2011 SEA RAY" cust_own_ID="BOAT"/>

</CustOwnerships>

</CatRequest>

</Message>

Customer Creation/Update Logic in E-Commerce Catalog Requests

In addition to creating a catalog request, the E-Commerce Catalog Request Message (CWCatRequest) allows you to create or update a sold to customer.

Creating/Updating Sold To Customers in E-Commerce Catalog Requests

Creation sold to logic: If you receive a catalog request from the web storefront for a customer that does not exist, the system creates a new customer.

If the Edit for Duplicate Catalog Requests (E46) system control value is selected, the system checks for duplicate catalog requests, based on match code. If a duplicate catalog request exists, the system does not create the duplicate catalog request. However, the system will still send a catalog request response back to the web storefront. See Checking for Duplicate Catalog Requests.

When you create a new customer through the E-Commerce Catalog Request Message (CWCatRequest), the system creates the new customer in the Customer Sold To table. The current and original mail type fields are set to C (catalog request). If the Track Customer History at Entity Level (F89) system control value is selected, the system also creates a Customer Entity record for the entity associated with the source code.

Opt in/opt out flag: If the catalog request received from the web storefront does not contain a value in the bill_to_opt_in flag, the system defaults the setting of the Default Opt In/Opt Out Flag (G97) system control value.

Update sold to logic: If the catalog request is for an existing customer and the value of an existing field changes, such as the Email address field, the system updates the customer. See Creating and Updating Sold-to Customers (WCST).

Customer ownership: You can create or update customer ownership records for the sold to customer using the CustOwnership element in the E-Commerce Catalog Request Message (CWCatRequest). Customer ownership allows you to capture and confirm information about the products a customer currently owns or previously owned.

The system looks at the Company, Customer #, and Ownership ID fields in the Customer Ownership table to determine if the customer ownership record on the catalog request is a new record or updated record.

• If the company, customer number, and ownership ID values on the catalog request match a record in the Customer Ownership table, the system updates the Active flag, Entry date, Confirm date, and Description fields for the existing customer ownership record.

• If the company, customer number, and ownership ID values on the catalog request do not match a record in the Customer Ownership table, the system creates a new customer ownership record for the sold to customer.

If a value is not defined for the cust_own_ID field, the system creates a customer note indicating the customer ownership record was not created/updated: Missing Ownership ID: Ownership Description. The system does not place the e-commerce catalog request in an error status because of customer ownership errors.

Note: If the catalog request contains errors, the system places the catalog request in the Catalog Request Interface table. You will need to correct the errors in the Working with the Catalog Request Interface (WCRU) menu option. If this happens, the system does not retain the customer ownership information when you correct the errors and reprocess the catalog request.

See Working with Customer Ownership for more information on creating and updating customer ownership records for a sold to customer.

E-Commerce Catalog Request Response

The response_required field in the E-Commerce Catalog Request Message (CWCatRequest) indicates if the system sends an E-Commerce Catalog Request Response Message (CWCatreqResponse) back to the web storefront.

0, blank, or a value other than 1 indicates a catalog request response message is not sent to the web storefront.

1 indicates a catalog request response message is sent to the web storefront.

The catalog request response message indicates the company and customer number used to create the catalog request.

The customer_number in the catalog response message identifies the sold to customer on the catalog request.

• If the customer_ number is 000000000, the catalog request did not process correctly and needs to be corrected through the Working with the Catalog Request Interface (WCRU) menu option.

• If the system created a new customer, the customer_number identifies the newly assigned customer number; otherwise the customer_number identifies the existing sold to customer.

SO10_05 OMSCS 19.0 December 2019 OHC