Outbound Email API

Purpose: You can generate a generic outbound XML message, rather than an actual email, for certain notifications. This XML message includes additional information that is not included in the standard email notice. Generating the XML message enables you to produce a reformatted HTML email and include additional promotional information.

Note: Generating the generic outbound XML message is currently supported only for:

• order confirmations

• shipment notifications

• return confirmations

• credit card credit acknowledgements

• soldout notifications

• backorder notifications (first, second, and continue)

• stored value card notifications

In this topic:

Process Overview

Outbound Email API Setup

System Control Values

Other Setup

Sample Outbound Email XML Messages

Sample Order Confirmation XML Message

Sample Shipment Notification XML Message

Sample Return Notification XML Message

Sample Credit Card Credit Notification XML Message

Sample Backorder Notification XML Message

Sample Soldout Notification XML Message

Sample Stored Value Card Notification XML Message

Outbound Email XML Message (CWEmailOut)

Process Overview

Generated when? The system produces the Outbound Email XML Message (CWEmailOut) at the same time as it would generate an actual email notification, specifically:

order confirmations: the ORDR_ASYNC background job generates the message.

shipment and return confirmations: if the E-mail Shipment/Return Confirmation Notification Immediately (K07) system control value is set to Y, the BILL_ASYNC background job generates these notifications; otherwise, you can use the Sending Internet Order Ship Confirmation (ESCF) to generate the notifications for a specified date range.

credit card credit acknowledgements: when you process a credit card credit through Processing Refunds (MREF), Processing A/R Refunds (MARC), or Processing Refunds by Order Number (MRFO).

backorder notifications: when you generate backorder notices through Generate Backorder Cards (GBOC), Working with Backorders Pending Cancellation (WBPC), or Working with Backorder First Notices (WBFN).

soldout notifications: when you use Printing Soldout Notifications (MSON).

stored value card notifications: when the SVC_OUT job processes an approved stored value card activation request. See Stored Value Card Notification Email for additional requirements.

EMAIL_OUT process: The functions listed above pass the required information to the EMAIL_OUT process in Working with Integration Layer Processes (IJCT). This process then provides the name of the WebSphereMQ queue required to generate the Outbound Email XML Message (CWEmailOut).

Guidelines: The same rules that govern whether to generate actual email confirmations apply to the generation of the Outbound Email XML Message (CWEmailOut). See When Does the System Generate an Email Notification? for details.

“From” email address not used: The “from” email address is not included in the Outbound Email XML Message (CWEmailOut). See Additional Information on Email Notifications for a discussion of the “from” email address.

Correspondence history: The Write Outbound Email to Email Repository (H99) controls whether to save a record of each outbound email notification or Outbound Email XML Message (CWEmailOut) in the Correspondence History file. The record consists of “header” information, but does not include the contents of the message. See Email Repository Overview for a discussion.

Order Transaction History message: The system writes the same type of order transaction history message when it generates an Outbound Email XML Message (CWEmailOut) as when it generates an actual email, such as: Ord Conf to ekaplan@commercialware.com. See the Display Order History Screen for information on how to review these messages.

Outbound Email API Setup

The setup related to the outbound email API is described below.

System Control Values

In order to generate the Outbound Email XML Message (CWEmailOut) the related email generation system control value cannot be blank:

Order Acknowledgement Program (G50)

Shipment Confirmation Program (G51)

Return Confirmation E-Mail Program (H53)

Credit Card Credit Acknowledgement E-Mail Program (H08)

Backorder Notification E-Mail Program (G95)

Soldout Notification E-Mail Program (G96)

Stored Value Card Email Notification Program (I30)

Additionally, the following system control values apply to both the Outbound Email XML Message (CWEmailOut) and to actual email generation:

E-Mail Order Confirmations for All Orders (H51)

E-Mail Shipment Confirmations for All Orders (H52)

Write Outbound Email to Email Repository (H99)

Suppress Email Address Search (J09)

E-mail Shipment/Return Confirmation Notification Immediately (K07)

For more information: See the description of each system control value.

Other Setup

Integration layer process: Use Working with Integration Layer Processes (IJCT) to set up the EMAIL_OUT process, including Creating a Process Queue that specifies the WebSphereMQ queue.

Important: In order to generate the Outbound Email XML Message (CWEmailOut) for backorder, soldout, credit card credit, or stored value card notifications, the outbound XML version for the EMAIL_OUT process must be set to 2.0.

Email template setup: Use Working with E-Mail Notification Templates (WEMT) to set the Use email API flag for the email template at the company level, and to enter the text to include. The Use email API flag indicates to generate the Outbound Email XML Message (CWEmailOut) rather than an actual email for this type of notification.

Entity-level override: You can also use Working with Entities (WENT) to override the text in the email template for any of the system-generated email notifications. This text overrides the template set up at the company level. See Email Template Override at Entity Level for more information.

Sample Outbound Email XML Messages

A sample of each type of Outbound Email XML Message (CWEmailOut) is presented below:

Sample Order Confirmation XML Message

Sample Shipment Notification XML Message

Sample Return Notification XML Message

Sample Credit Card Credit Notification XML Message

Sample Backorder Notification XML Message

Sample Soldout Notification XML Message

Sample Stored Value Card Notification XML Message

Sample Order Confirmation XML Message

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2005-01-12" time_created="15:11:17">

<Email notification_type="OC" notification_type_desc="Order Confirmation" email_addr="ekaplan@commercialware.com" company="27" company_desc="EZK Mail Order" entity="1" entity_desc="AVIAN CREATIONS">

<CustomerSoldTo sold_to_nbr="1060" sold_to_company="COMMERCIALWARE" sold_to_fname="GLORIA" sold_to_lname="MUNDI" sold_to_addr1="257 LOVELL STREET" sold_to_city="WORCESTER" sold_to_state="MA" sold_to_state_name="MASSACHUSETTS" sold_to_postal="01602" sold_to_country="USA" sold_to_country_name="UNITED STATES" sold_to_alternate_id="ABCDEFG" sold_to_cust_class="18" sold_to_cust_class_desc="LOYALTY">

<CustomerSoldToHistory sold_to_LTD_nbr_orders="537" sold_to_LTD_order_dollars="3737031" sold_to_LTD_nbr_sales="462" sold_to_LTD_sales_dollars="2342701" sold_to_first_buyer="N" sold_to_last_src="SOURCE" sold_to_last_src_desc="2005 SOURCE"/>

</CustomerSoldTo>

<CustomerShipTo ship_to_company="COMMERCIALWARE" ship_to_fname="FRANK" ship_to_lname="HALSEY" ship_to_addr1="24 PRIME PARK WAY" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_name="MASSACHUSETTS" ship_to_postal="01760" ship_to_country="USA" ship_to_country_name="UNITED STATES"/>

<Order order_nbr="10484" order_date="2005-01-12" order_source="SOURCE" order_source_desc="2005 SOURCE" order_offer="OFR" order_offer_desc="2005 OFFER" order_process_date="2005-01-12" order_ship_to="1" ost_discount="850" ost_tax="765" ost_merch="7650" ost_freight="765" ost_addl_freight="234" ost_total_amt="9414">

<OrderDetails>

<OrderDetail odt_item="PEN23" odt_item_desc="COMFORT-GRIP PEN" odt_SKU="BLK" odt_SKU_desc="BLACK INK" odt_item_class="OFC" odt_item_class_desc="OFFICE SUPPLIES" odt_set_master="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_price="450" odt_qty="10" odt_extended_price="4500" odt_availability_msg="In stock." odt_seq_nbr="1" odt_line_nbr="1"/>

<OrderDetail odt_item="MOSAIC KIT" odt_item_desc="MOSAIC KIT" odt_alias_item="MALIAS" odt_item_class="CRT" odt_item_class_desc="CREATIVITY TOYS" odt_set_master="Y" odt_set_component_seq="1" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_price="2250" odt_qty="1" odt_extended_price="2250" odt_availability_msg="In stock." odt_seq_nbr="2" odt_line_nbr="2"/>

<OrderDetail odt_item="SEAGLASS" odt_item_desc="SEAGLASS PIECES FOR MOSAIC" odt_SKU="BLUE" odt_SKU_desc="COBALT BLUE" odt_set_master="N" odt_set_component_seq="1" odt_free_gift="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_qty="1" odt_availability_msg="Backordered" odt_expected_ship_date="2005-01-13" odt_seq_nbr="3" odt_line_nbr="3"/>

<OrderDetail odt_item="SEAGLASS" odt_item_desc="SEAGLASS PIECES FOR MOSAIC" odt_SKU="GRN" odt_SKU_desc="GREEN" odt_set_master="N" odt_set_component_seq="1" odt_free_gift="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_qty="1" odt_availability_msg="Backordered" odt_expected_ship_date="2005-01-13" odt_seq_nbr="4" odt_line_nbr="4"/>

<OrderDetail odt_item="GROUT" odt_item_desc="SANDED GROUT FOR MOSAIC" odt_set_master="N" odt_set_component_seq="1" odt_free_gift="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_qty="1" odt_availability_msg="Backordered" odt_expected_ship_date="2005-01-13" odt_seq_nbr="5" odt_line_nbr="5"/>

<OrderDetail odt_item="MUG" odt_item_desc="COLLECTIBLE COFFEE MUG" odt_item_class="KIT" odt_item_class_desc="KITCHEN GOODS" odt_set_master="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_price="900" odt_qty="1" odt_extended_price="900" odt_availability_msg="No longer available." odt_seq_nbr="6" odt_line_nbr="6"/>

<OrderDetail odt_item="BEDROOM" odt_item_desc="BEDROOM DECORATOR KIT" odt_set_master="N" odt_offer="OFR" odt_offer_desc="2005 OFFER" odt_price="900" odt_qty="1" odt_extended_price="900" odt_availability_msg="Exp Date" odt_expected_ship_date="2005-01-19" odt_seq_nbr="7" odt_line_nbr="7"/>

</OrderDetails>

<OrderPayments order_payment_count="2">

<OrderPayment opm_payment_type="98" opm_payment_type_desc="CREDIT/COUPON" opm_gift_certificate_cpn="206301"/>

<OrderPayment opm_payment_type="5" opm_payment_type_desc="VISA" opm_credit_card="****************7890" opm_credit_card_exp_date="12/05"/>

</OrderPayments>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="We have received your order for the following items listed"/>

<BeforeBodyTextLine before_line_msg="below. Typical order processing time for in-stock items"/>

<BeforeBodyTextLine before_line_msg="is approximately 24 hours. Please be assured that we will"/><BeforeBodyTextLine before_line_msg="ship your order as soon as possible."/>

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Thank you for your order. Please think of us for all your"/>

<AfterBodyTextLine after_line_msg="pet supply and household needs."/>

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Shipment Notification XML Message

 

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2008-02-15" time_created="16:25:01">

<Email notification_type="SC" notification_type_desc="Shipment Confirmation" email_addr="kbottger@commercialware.com" company="554" company_desc="KAB Co2" entity="554" entity_desc="554 ENTITY">

<CustomerSoldTo sold_to_nbr="2" sold_to_fname="BERNADETTE" sold_to_minitial="T" sold_to_lname="MIRANDA" sold_to_addr1="109 TURNER LN" sold_to_city="TEMPLETON" sold_to_state="MA" sold_to_state_name="MASSACHUSETTES" sold_to_postal="01468-1566" sold_to_country="USA" sold_to_country_name="UNITED STATES OF AMERICA" sold_to_cust_class="CC" sold_to_cust_class_desc="CUSTOMER CLASS">

<CustomerSoldToHistory sold_to_LTD_nbr_orders="124" sold_to_LTD_order_dollars="658345" sold_to_LTD_nbr_sales="124" sold_to_LTD_sales_dollars="356200" sold_to_first_buyer="N" sold_to_last_src="554" sold_to_last_src_desc="554 DEFAULT SOURCE CODE" />

</CustomerSoldTo>

<CustomerShipTo ship_to_fname="BERNADETTE" ship_to_minitial="T" ship_to_lname="MIRANDA" ship_to_addr1="109 TURNER LN" ship_to_city="TEMPLETON" ship_to_state="MA" ship_to_state_name="MASSACHUSETTES" ship_to_postal="01468-1566" ship_to_country="USA" ship_to_country_name="UNITED STATES OF AMERICA" />

<Order order_nbr="432" order_date="2008-02-15" order_source="554" order_source_desc="554 DEFAULT SOURCE CODE" order_offer="554" order_offer_desc="554 DEFAULT OFFER" order_ship_to="1">

<OrderPayments order_payment_count="1">

<OrderPayment opm_payment_type="4" opm_payment_type_desc="VISA CREDIT CARD" opm_credit_card="****************" opm_credit_card_exp_date="09/09" />

</OrderPayments>

<Invoice invoice_nbr="187" invoice_ship_to="1" ist_ship_date="2008-02-15" ist_ship_merch="3000" ist_ship_tax="150" ist_ship_total_amt="3150">

<InvoiceDetails>

<InvoiceDetail idt_order_dtl_seq_nbr="1" idt_line_nbr="2" idt_item="IT8M" idt_item_desc="SOLID OAK CUTTING BOARD" idt_ship_qty="2" idt_price="1000" idt_extended_price="2000" />

<InvoiceDetail idt_order_dtl_seq_nbr="2" idt_line_nbr="1" idt_item="SKU" idt_item_desc="ORGANIC COTTON BASEBALL CAP" idt_SKU="RED WMNS SMLL" idt_SKU_desc="RED WMNS SMLL SKU DESCRIPTION" idt_ship_qty="1" idt_price="1000" idt_extended_price="1000" />

</InvoiceDetails>

<TrackingNumbers>

<TrackingNumber tracking_nbr="4324620080215" tracking_ship_via="2" tracking_ship_via_desc="UPS GROUND" />

<TrackingNumber tracking_ship_via="1" tracking_ship_via_desc="UNITED STATES POSTAL SERVICE" />

</TrackingNumbers>

</Invoice>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="GardenPets.com wants to inform you that one or more of the" />

<BeforeBodyTextLine before_line_msg="items on your recent order with us has shipped successfully." />

<BeforeBodyTextLine before_line_msg="You can check the status of your order online at" />

<BeforeBodyTextLine before_line_msg="www.gardenpets.com. For most orders, we provide a link" />

<BeforeBodyTextLine before_line_msg="directly to the package delivery service so you can track" />

<BeforeBodyTextLine before_line_msg="your parcel right to your doorstep." />

<BeforeBodyTextLine before_line_msg="For questions or comments you can refer to our online help" />

<BeforeBodyTextLine before_line_msg="desk at www.gardenpets.com, email us at" />

<BeforeBodyTextLine before_line_msg="service@gardenpets.com, or call our toll free number at" />

<BeforeBodyTextLine before_line_msg="888-555-1212." />

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Thank you for choosing gardenpets.com!" />

<AfterBodyTextLine after_line_msg="We hope to do more business with you in the future." />

<AfterBodyTextLine after_line_msg="--Your friends at GardenPets" />

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Return Notification XML Message

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2005-01-12" time_created="15:41:00">

<Email notification_type="RC" notification_type_desc="Return Confirmation" email_addr="ekaplan@commercialware.com" company="27" company_desc="EZK Mail Order" entity="1" entity_desc="AVIAN CREATIONS">

<CustomerSoldTo sold_to_nbr="1060" sold_to_company="COMMERCIALWARE" sold_to_fname="GLORIA" sold_to_lname="MUNDI" sold_to_addr1="257 LOVELL STREET" sold_to_city="WORCESTER" sold_to_state="MA" sold_to_state_name="MASSACHUSETTS" sold_to_postal="01602" sold_to_country="USA" sold_to_country_name="UNITED STATES" sold_to_alternate_id="ABCDEFG" sold_to_cust_class="18" sold_to_cust_class_desc="LOYALTY">

<CustomerSoldToHistory sold_to_LTD_nbr_orders="537" sold_to_LTD_order_dollars="3737031" sold_to_LTD_nbr_sales="464" sold_to_LTD_sales_dollars="2349451" sold_to_first_buyer="N" sold_to_last_src="SOURCE" sold_to_last_src_desc="2005 SOURCE"/>

</CustomerSoldTo>

<CustomerShipTo ship_to_company="COMMERCIALWARE" ship_to_fname="FRANK" ship_to_lname="HALSEY" ship_to_addr1="24 PRIME PARK WAY" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_name="MASSACHUSETTS" ship_to_postal="01760" ship_to_country="USA" ship_to_country_name="UNITED STATES"/>

<Order order_nbr="10484" order_date="2005-01-12" order_source="SOURCE" order_source_desc="2005 SOURCE" order_offer="OFR" order_offer_desc="2005 OFFER" order_ship_to="1">

<OrderPayments order_payment_count="2">

<OrderPayment opm_payment_type="98" opm_payment_type_desc="CREDIT/COUPON" opm_gift_certificate_cpn="206301"/>

<OrderPayment opm_payment_type="5" opm_payment_type_desc="VISA" opm_credit_card="****************7890" opm_credit_card_exp_date="12/05"/>

</OrderPayments>

<Invoice invoice_nbr="7554" invoice_ship_to="1" ist_ship_date="2005-01-12" ist_ship_merch="-2250" ist_ship_tax="-225" ist_ship_freight="-135" ist_ship_total_amt="-2610">

<InvoiceDetails>

<InvoiceDetail idt_order_dtl_seq_nbr="1" idt_line_nbr="1" idt_item="PEN23" idt_item_desc="COMFORT-GRIP PEN" idt_SKU="BLK" idt_SKU_desc="BLACK INK" idt_item_class="OFC" idt_item_class_desc="OFFICE SUPPLIES" idt_ship_qty="-5" idt_price="450" idt_extended_price="-2250"/>

</InvoiceDetails>

</Invoice>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="We have received the following returned items and will"/>

<BeforeBodyTextLine before_line_msg="be crediting your account as indicated below."/>

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Thank you for your business, and please think of us for"/>

<AfterBodyTextLine after_line_msg="all of your pet supply and household needs."/>

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Credit Card Credit Notification XML Message

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2009-01-15" time_created="17:12:37">

<Email notification_type="C1" notification_type_desc="C/C Credit Acknowledgment" email_addr="ekaplan@commercialware.com" company="27" company_desc="EZK Mail Order" entity="1" entity_desc="AVIAN CREATIONS">

<CustomerSoldTo sold_to_nbr="299" sold_to_company="JACKSON CONSULTING" sold_to_fname="OPHELIA" sold_to_minitial="Q" sold_to_lname="JACKSON" sold_to_addr1="24 PRIME PARK WAY" sold_to_addr2="SUITE 250" sold_to_city="NATICK" sold_to_state="MA" sold_to_state_name="MASSACHUSETTS" sold_to_postal="01760" sold_to_country="USA" sold_to_country_name="UNITED STATES" sold_to_alternate_id="1234567890" sold_to_cust_class="LY" sold_to_cust_class_desc="LOYALTY CUSTOMERS LEVEL 2">

<CustomerSoldToHistory sold_to_LTD_nbr_orders="947" sold_to_LTD_order_dollars="6238896" sold_to_LTD_nbr_sales="533" sold_to_LTD_sales_dollars="2884059" sold_to_first_buyer="N" sold_to_last_src="MEMBERS" sold_to_last_src_desc="MEMBERSHIP PROGRAM"/>

</CustomerSoldTo>

<CustomerShipTo ship_to_company="JACKSON" ship_to_fname="OPHELIA" ship_to_minitial="Q" ship_to_lname="JACKSON" ship_to_addr1="24 PRIME PARK WAY" ship_to_addr2="SUITE 250" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_name="MASSACHUSETTS" ship_to_postal="01760" ship_to_country="USA" ship_to_country_name="UNITED STATES"/>

<Order order_nbr="13475" order_date="2008-09-23" order_source="SOURCE" order_source_desc="WELCOME TO SPRING" order_offer="OFR" order_offer_desc="FIRST SIGNS OF SPRING 2009" order_ship_to="1">

<OrderPayments order_payment_count="1">

<OrderPayment opm_payment_type="8" opm_payment_type_desc="AMEX" opm_credit_card="****8888" opm_credit_card_exp_date="12/15"/>

</OrderPayments>

<Invoice invoice_nbr="9228" invoice_ship_to="1" ist_ship_date="2008-09-23" ist_ship_merch="-745" ist_ship_tax="-75" ist_ship_total_amt="-820" cc_credit_amt="820">

<InvoiceDetails>

<InvoiceDetail idt_order_dtl_seq_nbr="2" idt_line_nbr="1" idt_item="PEN23" idt_item_desc="COMFORT GRIP GEL WRITER" idt_SKU="BLK" idt_SKU_desc="BRIGHT BLACK" idt_alias_item="PEN23OFR" idt_ship_qty="-1" idt_price="745" idt_extended_price="-745"/>

</InvoiceDetails>

<TrackingNumbers></TrackingNumbers>

</Invoice>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="This is to let you know that"/>

<BeforeBodyTextLine before_line_msg="we have credited your credit card as follows:"/>

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Credits should appear on your next statement"/>

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Backorder Notification XML Message

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2009-01-30" time_created="11:29:39">

<Email notification_type="B1" notification_type_desc="Backorder 1st Notice" email_addr="ekaplan@commercialware.com" company="27" company_desc="EZK Mail Order" entity="1" entity_desc="AVIAN CREATIONS">

<CustomerSoldTo sold_to_nbr="1174" sold_to_fname="Charles" sold_to_lname="Cantor" sold_to_addr1="24 PRIME PARK WAY" sold_to_city="NATICK" sold_to_state="MA" sold_to_state_name="MASSACHUSETTS" sold_to_postal="01760" sold_to_country="USA" sold_to_country_name="UNITED STATES" sold_to_alternate_id="000000008" sold_to_cust_class="99" sold_to_cust_class_desc="PREFERRED">

</CustomerSoldTo>

<CustomerShipTo ship_to_fname="Charles" ship_to_lname="Cantor" ship_to_addr1="24 PRIME PARK WAY" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_name="MASSACHUSETTS" ship_to_postal="01760" ship_to_country="USA" ship_to_country_name="UNITED STATES"/>

<Order order_nbr="13639" order_date="2009-01-30" order_source="SOURCE" order_source_desc="WELCOME TO SPRING" order_offer="OFR" order_offer_desc="FIRST SIGNS OF SPRING 2009" order_process_date="2009-01-30" order_ship_to="1" ost_tax="2344" ost_merch="21100" ost_freight="2110" ost_addl_freight="234" ost_total_amt="25788">

<OrderDetails>

<OrderDetail odt_item="GT-2120" odt_item_desc="STABILITY RUNNING SHOE" odt_SKU="BLUE 7.5 B" odt_SKU_desc="BLUE SIZE 7.5 WIDTH B" odt_set_master="N" odt_offer="OFR" odt_offer_desc="FIRST SIGNS OF SPRING 2009" odt_price="10100" odt_qty="1" odt_extended_price="10100" odt_availability_msg="Backordered" odt_expected_ship_date="2009-02-15" odt_seq_nbr="2" odt_line_nbr="2" odt_backorder_qty="1"/>

<OrderDetail odt_item="SOCKS" odt_item_desc="BREATHABLE SPORT SOCKS" odt_set_master="N" odt_free_gift="Y" odt_offer="OFR" odt_offer_desc="FIRST SIGNS OF SPRING 2009" odt_qty="1" odt_availability_msg="Backordered" odt_expected_ship_date="2009-02-26" odt_seq_nbr="3" odt_line_nbr="3" odt_backorder_qty="1"/>

<OrderDetail odt_item="GT-2120" odt_item_desc="STABILITY RUNNING SHOE" odt_SKU="BLUE 7.0 WIDE" odt_SKU_desc="BLUE SIZE 7 REAL WIDE" odt_set_master="N" odt_offer="OFR" odt_offer_desc="FIRST SIGNS OF SPRING 2009" odt_price="10100" odt_qty="1" odt_extended_price="10100" odt_availability_msg="Backordered" odt_expected_ship_date="2009-02-02" odt_seq_nbr="4" odt_line_nbr="4" odt_backorder_qty="1"/>

</OrderDetails>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="We’re sorry the following item(s) are currently backordered"/>

<BeforeBodyTextLine before_line_msg="We will notify you if we are unable to ship them within 30 days."/>

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Thank you for your business."/>

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Soldout Notification XML Message

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2009-01-30" time_created="11:26:45">

<Email notification_type="S1" notification_type_desc="Soldout Notification" email_addr="ekaplan@commercialware.com" company="27" company_desc="EZK Mail Order" entity="1" entity_desc="AVIAN CREATIONS">

<CustomerSoldTo sold_to_nbr="1174" sold_to_fname="Charles" sold_to_lname="Cantor" sold_to_addr1="24 PRIME PARK WAY" sold_to_city="NATICK" sold_to_state="MA" sold_to_state_name="MASSACHUSETTS" sold_to_postal="01760" sold_to_country="USA" sold_to_country_name="UNITED STATES" sold_to_alternate_id="000000008" sold_to_cust_class="99" sold_to_cust_class_desc="PREFERRED">

</CustomerSoldTo>

<CustomerShipTo ship_to_fname="Charles" ship_to_lname="Cantor" ship_to_addr1="24 PRIME PARK WAY" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_name="MASSACHUSETTS" ship_to_postal="01760" ship_to_country="USA" ship_to_country_name="UNITED STATES"/>

<Order order_nbr="13637" order_date="2009-01-30" order_source="SOURCE" order_source_desc="WELCOME TO SPRING" order_offer="OFR" order_offer_desc="FIRST SIGNS OF SPRING 2009" order_process_date="2009-01-30" order_ship_to="1" ost_tax="1233" ost_merch="11000" ost_freight="1100" ost_addl_freight="234" ost_total_amt="13567">

<OrderDetails>

<OrderDetail odt_item="GYM_PLAY" odt_item_desc="PLAYGYM FOR PARROTS" odt_SKU="2" odt_SKU_desc="PARROTLET/BUDGIE" odt_set_master="N" odt_offer="OFR" odt_offer_desc="FIRST SIGNS OF SPRING 2009" odt_price="5000" odt_qty="1" odt_extended_price="5000" odt_availability_msg="No longer available." odt_expected_ship_date="2009-02-06" odt_seq_nbr="4" odt_line_nbr="4" odt_soldout_qty="1"/>

</OrderDetails>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="We are sorry to notify you that the following item is no longer available."/>

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="We hope to see you again soon."/>

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Sample Stored Value Card Notification XML Message

 

<Message source="CWDIRECT" target="CWINTEGRATE" type="CWEmailOut" date_created="2009-02-16" time_created="09:48:51">

<Email notification_type="SV" notification_type_desc="Stored Value Card" email_addr="kbottger@commercialware.com" company="554" company_desc="KAB Co2 Karen Bottger Company" entity="554" entity_desc="554 ENTITY">

<CustomerSoldTo sold_to_nbr="4" sold_to_fname="NONA" sold_to_lname="NONNIE" sold_to_addr1="SANFORD STREET" sold_to_city="MEDWAY" sold_to_state="MA" sold_to_state_name="MASSACHUSETTES" sold_to_postal="02053" sold_to_country="USA" sold_to_country_name="UNITED STATES OF AMERICA">

<CustomerSoldToHistory sold_to_LTD_nbr_orders="10" sold_to_LTD_order_dollars="33000" sold_to_LTD_nbr_sales="4" sold_to_LTD_sales_dollars="21000" sold_to_first_buyer="N" sold_to_last_src="554" sold_to_last_src_desc="554 SOURCE CODE" />

</CustomerSoldTo>

<CustomerShipTo ship_to_fname="NONA" ship_to_lname="NONNIE" ship_to_addr1="SANFORD STREET" ship_to_city="MEDWAY" ship_to_state="MA" ship_to_state_name="MASSACHUSETTES" ship_to_postal="02053" ship_to_country="USA" ship_to_country_name="UNITED STATES OF AMERICA" />

<Order order_nbr="963" order_date="2009-02-16" order_source="554" order_source_desc="554 SOURCE CODE" order_offer="554" order_offer_desc="554 OFFER" order_ship_to="1">

<OrderPayments order_payment_count="1">

<OrderPayment opm_payment_type="1" opm_payment_type_desc="CASH/CHECK PAY TYPE" />

</OrderPayments>

<Invoice invoice_nbr="347" invoice_ship_to="1" ist_ship_date="2009-02-16" ist_ship_merch="10000" ist_ship_freight="1000" ist_ship_total_amt="11000">

<InvoiceDetails>

<InvoiceDetail idt_order_dtl_seq_nbr="1" idt_line_nbr="1" idt_item="SVCE" idt_item_desc="STORED VALUE CARD PHYSICAL W EMAIL" idt_ship_qty="1" idt_price="10000" idt_extended_price="10000">

<StoredValueCards>

<StoredValueCard svc_card_nbr="7413741414771852" svc_card_type="E" svc_issue_amt="10000" svc_activation_date="2009-02-16" svc_activation_time="09:48:51" />

</StoredValueCards>

</InvoiceDetail>

</InvoiceDetails>

<TrackingNumbers>

<TrackingNumber />

</TrackingNumbers>

</Invoice>

 

<OrderMessages>

<OrderMessage oms_seq_nbr="1" oms_message="Happy Birthday Mom!" oms_print_flag="G" />

<OrderMessage oms_seq_nbr="2" oms_message="We hope you enjoy the gift card. Buy something fun!" oms_print_flag="G" />

<OrderMessage oms_seq_nbr="3" oms_message="Much love," oms_print_flag="G" />

<OrderMessage oms_seq_nbr="4" oms_message="Toni and Tina" oms_print_flag="G" />

</OrderMessages>

</Order>

<EmailTemplateText>

<BeforeBodyTextLines>

<BeforeBodyTextLine before_line_msg="Dear Valued Customer:" />

<BeforeBodyTextLine before_line_msg="A stored value card has been purchased for you. You can use" />

<BeforeBodyTextLine before_line_msg="this email as your stored value card when purchasing" />

<BeforeBodyTextLine before_line_msg="merchandise from our web site at www.eShop.com or directly" />

<BeforeBodyTextLine before_line_msg="from our catalog. Just reference the Stored Value Card" />

<BeforeBodyTextLine before_line_msg="Number listed below when applying payment to the order." />

<BeforeBodyTextLine before_line_msg="Don't forget to save or print this email in order to take" />

<BeforeBodyTextLine before_line_msg="advantage of your Stored Value Card for future purchases." />

</BeforeBodyTextLines>

<AfterBodyTextLines>

<AfterBodyTextLine after_line_msg="Regards," />

<AfterBodyTextLine after_line_msg="Your friends at eShop.com." />

<AfterBodyTextLine after_line_msg="Visit us at www.eShop.com today!" />

</AfterBodyTextLines>

</EmailTemplateText>

</Email>

</Message>

Outbound Email XML Message (CWEmailOut)

 

The system generates this message, rather than an actual email, when the Use email API flag is set to Y for an email template. See Process Overview and Outbound Email API Setup for more information, and see Sample Outbound Email XML Messages for samples of each email notification message.

For more information: See XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.

Note:

• Certain special characters are substituted in text fields. See Translating Special Characters in Outbound Messages.

• Numeric fields include an implied decimal. For example, a dollar value of $20.50 is presented as 2050.

Attribute Name

Type

Length

Comments

Message

Included in all notice types.

source

alpha

20

CWDIRECT

target

alpha

20

CWINTEGRATE

type

alpha

20

CWEmailOut

date_created

numeric

8

YYYY-MM-DD format.

time_created

numeric

6

HH:MM:SS format.

Email

Included in all notice types.

notification_type

alpha

2

Possible values are:

B1 = Backorder 1st Notice

B2 = Backorder 2nd Notice

B3 = Backorder Continue Notice

C1 = C/C Credit Acknowledgement

OC = Order Confirmation

RC = Return Confirmation

SC = Shipment Confirmation

S1 = Soldout Notification

SV = Stored Value Card

notification_type_

desc

alpha

25

The description of the notification type. See the notification_type, above, for possible descriptions.

email_addr

alpha

50

The email address to receive the notification related to the order. See Working with an Order-Level Email Address for more information on how the system determines the email address to assign to an order.

company

numeric

3

The code identifying the company where the order activity has taken place.

company_desc

alpha

30

The description of the company from the Company file.

entity

numeric

3

The code identifying the entity which is associated with the division assigned to the source code on the order header. See Working with Entities (WENT) for more information on entities, and see Working with Source Codes (WSRC) for information on how you assign a division to a source code.

entity_desc

alpha

25

The description of the entity from the Entity file.

CustomerSoldTo

Included in all notice types.

sold_to_nbr

numeric

9

The number identifying the customer who placed the order. See Creating and Updating Sold-to Customers (WCST) for a discussion on the following fields.

sold_to_company

alpha

30

The company, if any, that is part of the customer’s address.

sold_to_fname

alpha

15

The customer’s first name.

sold_to_minitial

alpha

1

The customer’s middle initial.

sold_to_lname

alpha

25

The customer’s last name.

sold_to_addr1

alpha

32

The first line of the customer’s address.

sold_to_addr2

alpha

32

The second line, if any, of the customer’s address.

sold_to_addr3

alpha

32

The third line, if any, of the customer’s address.

sold_to_addr4

alpha

32

The fourth line, if any, of the customer’s address.

sold_to_apt

alpha

10

The apartment code for the customer’s address.

Available in XML version: 3.0 (release 17 in CWDirect).

sold_to_city

alpha

25

The city where the customer lives.

sold_to_state

alpha

2

The two-letter code for the customer’s state or province.

sold_to_state_name

alpha

25

The description of the state, as set up through Setting Up the Country File (WCTY).

sold_to_postal

alpha

10

The customer’s postal or zip code.

sold_to_country

alpha

3

The three-letter code for the customer’s country.

sold_to_country_

name

alpha

30

The description of the country, as specified through Setting Up the Country File (WCTY).

sold_to_alternate_id

alpha

15

The alternate customer number, if any, specified in the Customer Sold To file; see Alt cust (Alternate customer number) for a discussion.

sold_to_cust_class

alpha

2

The Class assigned to the customer.

sold_to_cust_class_

desc

alpha

30

The description of the customer class, as specified through Setting Up the Customer Class File (WCCL).

CustomerSoldToHistory

The CustomerSoldToHistory element is not included in backorder or soldout notifications.

sold_to_LTD_nbr_

orders

numeric

5

The Life-to-date Orders quantity from the Display Customer Order History Screen. Includes the current order in the case of an order confirmation.

sold_to_LTD_order_dollars

numeric

13.2

The life-to-date Orders amount from the Display Customer Order History Screen. Consists of merchandise dollar value only. Includes the current order in the case of an order confirmation.

sold_to_LTD_nbr_

sales

numeric

5

The life-to-date Sales quantity from the Display Customer Order History Screen. In the case of a shipment confirmation, includes the current shipment.

sold_to_LTD_sales_dollars

numeric

13.2

The life-to-date Sales amount from the Display Customer Order History Screen, which includes merchandise dollar value only. In the case of a shipment confirmation, includes the current shipment.

sold_to_first_buyer

alpha

1

Valid values are:

Y = This is the customer’s first order

N = This is not the customer’s first order

sold_to_last_src

alpha

9

In the case of an order confirmation, this is the source code used on the header of the order that generated the confirmation. For a shipment or return confirmation, this is the source code used on the last order placed by the customer.

sold_to_last_src_

desc

alpha

30

The description of the source code, as set up through Working with Source Codes (WSRC).

CustomerShipTo

Included in all notice types. The information in this element is different from the CustomerSoldTo if the customer specified an alternate shipping address on the order:

• order ship-to: see Assigning an Order Shipping Address

• permanent ship-to: see Using a Permanent Shipping Address

• recipient customer: Adding a Recipient Order

Each separate ship-to generates a separate message.

ship_to_company

alpha

30

Ship to company.

ship_to_fname

alpha

15

The first name of the ship to customer.

ship_to_minitial

alpha

1

The middle initial of the ship to customer.

ship_to_lname

alpha

25

The last name of the ship to customer.

ship_to_addr1

alpha

32

Address line 1 of the customer’s address.

ship_to_addr2

alpha

32

Address line 2 of the customer’s address.

ship_to_addr3

alpha

32

Address line 3 of the customer’s address.

ship_to_addr4

alpha

32

Address line 4 of the customer’s address.

ship_to_apt

alpha

10

The apartment code for the customer’s address.

Available in XML version: 3.0 (release 17 in CWDirect).

ship_to_city

alpha

25

The city for the customer’s address.

ship_to_state

alpha

2

The state code for the customer’s address.

ship_to_state_name

alpha

25

The state name for the customer’s address.

ship_to_postal

alpha

10

The postal code for the customer’s address.

ship_to_country

alpha

3

The country code for the customer’s address.

ship_to_country_

name

alpha

30

The country name for the customer’s address.

Order

Included in all notice types.

order_nbr

numeric

8

The unique number identifying the order in your company.

order_date

numeric

8

The processing date for the order. The current system date defaults when you create an order, but you can override it. YYYY-MM-DD format.

order_source

alpha

9

The source code used on the order header, indicating how the order originated and controlling shipping charges and other order settings. Defined in and validated against the Source Code file; see Working with Source Codes (WSRC) for more information.

order_source_desc

alpha

30

The description of the source code from the Source Code file.

order_offer

alpha

3

The offer associated with the order_source, as defined in the Source Code file. The offer controls item pricing information for the order.

order_offer_desc

alpha

30

The description of the offer from the Offer file; see Working with Offers (WOFR).

order_process_date

numeric

8

The date when the customer wants to receive the order. This is the Arrival date, which defaults to the current system date at order entry. YYYY-MM-DD format.

Included only for order confirmations.

order_ship_to

numeric

3

Identifies the individual shipping address on the order. Set to 1 for an order that has a single shipping address.

ost_discount

numeric

5.2

The total discount amount applied to merchandise on the order ship-to. See Order Inquiry Header Screen for a description of how this field is calculated.

Included only for order confirmations.

ost_tax

numeric

7.2

The total sales tax for the order, based on the value of the merchandise and, optionally, freight and special handling charges. If the order is subject to VAT, tax will generally be included in the item prices rather than in the Tax field.

Included only for order confirmations.

ost_merch

numeric

9.2

The total value of the items on the order, excluding freight, additional charges, service charges, tax (but including hidden tax), handling, and duty. The merchandise total does not include items that are canceled, soldout, or returned, or included in a store pickup request.

Included only for order confirmations.

ost_freight

numeric

7.2

The total charge for shipping the order, not including additional freight charges. You can define additional freight charges for a carrier to include standard freight; in this case, this field is blank.

This field also includes service charges by ship via, if any, and order weight charges based on the ship via defined for each ship to customer on the order.

The system calculates freight charges based on the freight method defined for the source code.

Included only for order confirmations.

ost_addl_freight

numeric

7.2

The total dollar amount for freight charges, in addition to the base freight charge for the order. Additional freight charges are set for the carrier, as defined in the Ship Via file. If the additional freight charges include the standard freight charges, there is no ost_freight.

Examples of additional freight charges are overnight shipping, second day delivery, etc. If there is a C.O.D. charge on the order, it is included in this field.

The Add'l freight field in Order Inquiry corresponds to the Frt+ field in Order Entry.

Included only for order confirmations.

ost_hand

numeric

7.2

The cost of any special handling on the order, such as personalizing, monogramming, or engraving, and any gift wrapping charges.

If there are any duty charges on the order, they are also included in the Handling total.

Included only for order confirmations.

ost_addl_charge

numeric

7.2

This field can include charges or credits. Additional charges might include:

• Additional source code charge

• Credits

• Additional shipper/item charge

• Dollar discounts

See Order Inquiry Header Screen for a discussion.

Included only for order confirmations.

ost_total_amt

numeric

9.2

The total amount the customer owes for the order, including:

• Merchandise

• Freight

• Additional freight and C.O.D. charges

• Taxes

• Handling

• Duty

• Additional charges

The total does not include charges for canceled, returned or sold out items, or those included in a store pickup request.

Included only for order confirmations.

OrderDetail

The OrderDetail element is not included in the shipment, return, credit card credit confirmation, or stored value card messages. For backorder notifications, only the backordered lines are included; for soldout notifications, only the sold out lines are included.

Note: If you pre-bill items, the Pre Billed Amount Item (J72) is included in the outbound XML order or shipment notification message. See the Pre Billed Amount Item (J72) system control value for a discussion.

odt_item

alpha

12

The code identifying the item that the customer ordered. See Performing Initial Item Entry (MITM) for a discussion of the following fields.

odt_item_desc

alpha

40

The description of the item from the Item file.

odt_SKU

alpha

14

The item’s identifying characteristics, such as its color and size.

odt_SKU_desc

alpha

40

The description of the SKU. if any, from the SKU file.

odt_alias_item

alpha

12

An alternate item code you use to sell the item within a particular offer. See the Work with Alias Screen for a discussion. Included only if the customer ordered by this alias.

odt_item_class

alpha

3

The item class, if any, assigned to the item. Defined in and validated against the Item Class file, as set up through Working with Item Classes (WICL). See Performing Initial Item Entry (MITM) for a discussion of setting up items.

odt_item_class_desc

alpha

30

The description of the item class, if any.

odt_set_master

alpha

1

Indicates if the item is a set master. Valid values are:

Y = This is a master item for a set (the Kit type is S) or continuity item (the Kit type is C)

N = This is not a set master or continuity master item

See Working with Sets for more information.

odt_set_component_seq

numeric

3

A sequence number that identifies a set master or continuity master and its related component items. For example, the first set master and its component items have an odt_set_component_seq of 1; if there is an additional set on the order, the master and components have an odt_set_component_seq of 2.

odt_free_gift

alpha

1

Indicates if the system added the item to the order as a free gift, such as through a price table or source code. Valid values are:

Y = The system added the item to the order as a free gift

N = The item was manually entered as a “no-charge” item

This flag is not included for priced items.

odt_offer

alpha

3

The offer on the order detail line. See the Ofr at the Display Order Detail Screen (Reviewing Order Line Detail).

odt_offer_desc

alpha

30

The description of the offer on the order detail line.

odt_source

alpha

9

The source code assigned to the order line. A source code appears here only if:

• the Order Entry operator entered a source code at the line level, or

• the Use Source Code from Order Header When Creating Order Lines (D73) system control value is set to Y, or

• the Load Source from Mailing History (D20) system control value is set to Y and the offer entered on the detail line is not associated with the source code on the order header, and the system found an associated source code in the customer's mail history.

• the Update Source Code from Mail History (J94) system control value is set to Y and the system found a match between the SKU/offers or item/offers for the item on the order line and the customer’s mail history.

The source code at the line level controls demand and sales information/posting for that item, whereas the source code on the order controls how items are priced and freight is calculated.

odt_source_desc

alpha

30

The description of the source code on the order detail line, if any.

odt_price

numeric

7.2

The per-unit selling price of this item, after applying all discounts and repricing. This price reflects any coupon discount amount or dollar discount by offer or source if the Prorate Dollar Discounts and Coupons (D90) system control value is set to Y.

odt_qty

numeric

5

The quantity ordered.

odt_extended_price

numeric

11.2

The actual selling price * the order quantity.

odt_availability_msg

alpha

80

Indicates the item’s availability status. Possible messages are:

Exp date = This is a drop ship item. In this situation, an expected ship date (odt_expected_ship_date) is also indicated. Included only if the Assign Drop Ship Expected Ship Date (I59) system control value is set to Y.

Backordered = There is currently no on-hand inventory. In this situation, an expected ship date (odt_expected_ship_date) is also indicated.

No longer available. = The item is sold out.

Soldout items are not included in the message if the Exclude S/O on ord conf (Exclude soldout items on order confirmations) flag for the order type is set to Y.

In stock = For items you stock in inventory, this message indicates that there is an available quantity on-hand. This is also the status indicated for a set master, non-inventory item, membership item, or gift certificate.

odt_expected_ship_

date

numeric

8

The next date when you expect to receive the item on a purchase order and have it available to fulfill orders. Included only for drop ship and backordered items. See FTC -- # of Days for Items without Expected Ship Date (C71) and FTC -- # of Days to Add for Drop Ships (C68) for more information on how this date is calculated in different situations. YYYY-MM-DD format.

odt_seq_nbr

numeric

5

A unique number to identify the order line in the Order Detail file. Typically the same as the odt_line_nbr unless you delete an order line; in this case, the system assigns a new order line number to subsequent order lines, but retains the sequence number.

odt_line_nbr

numeric

3

A unique number to identify the order line on the screen.

odt_backorder_qty

numeric

5

The total quantity of the order line that is backordered.

Note: Included in the message only for a first, second, or continue backorder notice.

Available in XML version: 2.0 (release 12.5 in CWDirect).

odt_soldout_qty

numeric

5

The total quantity of the order line that is sold out.

Note: Included in the message only for a soldout notification.

Available in XML version: 2.0 (release 12.5 in CWDirect).

OrderPayments

The OrderPayments element is not included for backorder or soldout notifications.

order_payment_

count

numeric

2

The number of payment methods on the order.

Only active payment methods are included in the message. As a result, if you deactivate an order payment method (even if you have already charged it for a shipment) it is omitted from the message and not included in the order_payment_count.

OrderPayment

The OrderPayment element is not included for backorder or soldout notifications; however, the other notification types include all active payment methods. For example, credit card credit notices include all payment methods on the order, not just the one receiving the credit or included on the credit invoice.

opm_payment_type

numeric

2

The numeric code identifying the pay type used on the order. Defined in and validated against the Pay Type file; see Working with Pay Types (WPAY).

opm_payment_type_desc

alpha

30

The description of the pay type, as set up through Working with Pay Types (WPAY).

opm_pay_plan

alpha

5

The code identifying the flexible payment method (deferred or installment billing) used on the order, if any. Set up through Working with Flexible Payment Options (WFPO); see Deferred/Installment Billing Overview for a discussion.

opm_pay_plan_desc

alpha

40

The description of the flexible payment method, as set up through Working with Flexible Payment Options (WFPO).

opm_deferral_days

numeric

3

The number of days to defer billing, if this is a deferred payment option that specifies a # of days for deferral rather than a Fixed deferral date.

opm_deferral_date

numeric

8

The date when billing will occur, if this is a deferred payment option that specifies a Fixed deferral date rather than a # of days for deferral. YYYY-MM-DD format.

opm_nbr_

installments

numeric

3

The total number of installments specified for the installment payment option.

opm_installment_

interval

numeric

3

The Interval, which identifies the number of days to wait between installments, specified for the installment payment option.

opm_gift_certificate_cpn

numeric

7

The number identifying a gift certificate, coupon, or merchandise credit.

opm_credit_card

alpha

20

The credit card number used. All but the last four positions are replaced with asterisks (*). If the complete credit card number does not exceed four positions, none of it is replaced with asterisks. It is possible for the credit card number to be four positions or fewer if, for example, it is a “dummy” credit card, such as one you might use for orders you receive through an integration with Amazon.com.

opm_credit_card_

exp_date

numeric

4

The expiration date, if any, specified for the credit card. MM/YY format.

Invoice

This element is included only for shipment, return, credit card credit, and stored value card notices. There is a separate confirmation message for each invoice number and ship-to on an order. As a result, there is a single Invoice element in each message.

The Consolidated Invoice (B49) system control value controls whether each shipment billed against an order on the same day is assigned to the same invoice number. Similarly, the Consolidated Credit Invoice (K06) system control value controls whether each return billing against an order on the same day is assigned to the same credit invoice number. See these system control values for discussions.

If the invoice represents a credit for a return, dollar values are negative and are preceded by minus signs; however, the cc_credit_amt included for a credit card credit notice is a positive amount.

See the Display Invoice Header Screen for a general discussion of the fields in the Invoice Header file.

Note:

Pre-bill? If you pre-bill items, a shipment confirmation XML message is generated when you pre-bill. See the Pre Billed Amount Item (J72) system control value for a discussion.

Immediate notices and consolidating invoices: If you generate shipment and return confirmations immediately (based on the setting of the E-mail Shipment/Return Confirmation Notification Immediately (K07) system control value) and if you also consolidate invoices (based on the setting of the Consolidated Invoice (B49) system control value) or consolidate credit invoices (based on the setting of the Consolidated Credit Invoice (K06) system control value), then it is possible for the billing async job to generate the shipment or return confirmation email message multiple times in a single day, adding the newly-billed or returned items to the email each time. See the discussion under the E-mail Shipment/Return Confirmation Notification Immediately (K07) system control value for more information.

invoice_nbr

numeric

7

A unique number to identify the invoice.

invoice_ship_to

numeric

3

Identifies the order ship-to address associated with the invoice. Set to 1 if there is only one shipping address.

ist_ship_date

numeric

8

The date the shipment or return was processed by the BILL_ASYNC job. YYYY-MM-DD format.

ist_ship_merch

numeric

9.2

The total merchandise value of the shipment or return, excluding tax, freight, additional freight, or handling.

ist_ship_tax

numeric

7.2

The total tax amount billed for the shipment or credited for the return. Includes GST and PST, if any. Tax rates vary by delivery location, and their calculation depends on the laws governing their application. The system stores tax rules in the System Control file, Customer file, SCF and other tax files. This field does not include hidden tax.

ist_ship_freight

numeric

7.2

The total freight amount billed for the shipment or credited for the return.

ist_ship_addl_ freight

numeric

7.2

The total dollar amount billed or credited for freight charges exceeding the order's base freight charge. This is a shipper-level charge directly associated with the order, as opposed to the line item. Additional freight is defined for the shipper in the Ship Via file.

Examples of additional freight charges that might apply include charges for overnight shipping, second day delivery, padded van, etc.

Additional freight charges might include the standard freight charges, depending on how you have set up the shipper. In this case, the Freight field will be blank.

The Add'l freight field in Order Inquiry corresponds to the Frt+ field in Order Entry.

ist_ship_hand

numeric

7.2

The cost of any special handling on the shipment or credited for the return, such as personalizing, monogramming, or engraving, and any gift wrapping charges. Any duty charges on the invoice are also included in this total.

ist_ship_addl_ charge

numeric

7.2

The total additional charges billed or credited. See the Add'l charges (Additional charges) field for a discussion.

ist_ship_total_amt

numeric

9.2

The total merchandise, tax, freight, additional freight, handling, and additional charges billed or credited on the invoice.

cc_credit_amt

numeric

9.2

The total amount of the credit applied to the customer’s credit card. If there were multiple payment methods credited (for example, if the customer paid with a coupon and a credit card), this total might be less than the total credit amount to the Invoice.

This is a calculated field and is not stored in the Invoice file.

Note: Included only when the message represents a credit card credit. Unlike the other credit amounts included in the Invoice element, the credit card credit amount is presented as a positive dollar value (for example, 922 rather than -922).

Available in XML version: 2.0 (release 12.5 in CWDirect).

InvoiceDetail

This element is included only for shipment, return, credit card credit, and stored value card notices. There is a separate InvoiceDetail element for each item shipped or returned on the invoice.

If the invoice represents a credit for a return, dollar values and quantities are negative and are preceded by minus signs.

See the Second Display Invoice Detail Screen for a general discussion of the fields on the Invoice Detail file.

idt_order_dtl_seq_

nbr

numeric

5

A unique number identifying the order detail line for the item shipped or returned.

idt_line_nbr

numeric

3

A unique number identifying the Invoice Detail line for the item shipped or returned.

idt_item

alpha

12

The actual code identifying the item. If the customer ordered using an item alias, it is indicated in the idt_alias_item, below.

idt_item_desc

alpha

40

The description of the item from the Item file.

idt_SKU

alpha

14

The item’s unique characteristics, such as its color or size. Included only if the item has SKU’s.

idt_SKU_desc

alpha

40

The description of the SKU from the SKU file.

idt_item_class

alpha

3

The item class, if any, assigned to the item. Defined in and validated against the Item Class file, as set up through Working with Item Classes (WICL). See Performing Initial Item Entry (MITM) for a discussion of setting up items.

idt_item_class_desc

alpha

30

The description of the item class.

idt_alias_item

alpha

12

An alternate item code you use to sell the item within a particular offer. See the Work with Alias Screen for a discussion. Included only if the customer ordered by this alias.

idt_ship_qty

numeric

5

The total quantity of the item shipped or returned on this invoice.

idt_price

numeric

7.2

The single-unit price charged or credited for the item on this invoice.

idt_extended_price

numeric

11.4

The total merchandise value charged or credited for the item on this invoice.

StoredValueCard

Included only in stored value card notices.

Available in XML version: 2.0 in CWDirect release 12.5 or later.

svc_card_nbr

alpha

20

The activated stored value card number.

From the Card # field in the Stored Value Card file.

Note: Credit card encryption allows you to encrypt the stored value card number in the CWDirect database. If you use credit card encryption, the stored value card number will be unencrypted and unformatted in this email since the customer needs to read the stored value card number for future purchases. See Using Credit Card Encryption and Data Security for an overview.

svc_activation_date

numeric

6

The date the stored value card was activated.

From the Activation date field in the Stored Value Card file.

svc_issue_amt

numeric

7.2

The dollar amount activated for the stored value card.

From the Issue amount field in the Stored Value Card file.

svc_activation_time

numeric

6

The time the stored value card was activated.

From the Activation time field in the Stored Value Card file.

svc_card_type

alpha

3

The type of stored value card that was activated.

Valid values:

E = Physical card with email notification.

V = Virtual card.

From the Card type field in the Stored Value Card file.

svc_id_nbr

alpha

16

The PIN number assigned to the card.

From the ID # field in the Stored Value Card file.

Available in XML version: 4.0 (release 18 in CWDirect).

TrackingNumber

CWDirect release earlier than 12.0: This element is included for shipment confirmations if a tracking number exists in the Manifest Upload Audit file.

CWDirect release 12.0 and later: This element is included for shipment confirmations if a ship via code exists in the Manifest Upload Audit file; the system includes the TrackingNumber element and its tags even if there is no tracking number for the Manifest Upload Audit record.

Brokered Backorder? If a shipment occurred through the Brokered Backorder Integration with Locate version 5.1 or higher, then the tracking number and ship via for a shipment confirmation are from the Order Transaction History file rather than the Manifest Upload Audit file.

The TrackingNumber element is included only in the shipment, credit card credit, and stored value card notices; however, the element is empty for credit card credit and stored value card notices.

PC manifesting updates the Manifest Upload Audit file; see PC Manifest Socket Interface for a discussion.

tracking_nbr

alpha

30

The shipment tracking number, if any, from the Manifest Upload Audit file, or from the Order Transaction History file if the shipment occurred through the Brokered Backorder Integration with Locate version 5.1 or higher.

tracking_ship_via

numeric

2

The ship via code from the Manifest Upload Audit file, or from the Order Transaction History file if the shipment occurred through the Brokered Backorder Integration with Locate version 5.1 or higher.

tracking_ship_via_

desc

alpha

30

The description of the ship via from the Ship Via file. See Working with Ship Via Codes (WVIA) for a discussion.

OrderMessage

The OrderMessage element is included for shipment, return, credit card credit, and stored value card notifications only.

For more information: See Adding Order Messages.

Available in XML version: 2.0, in CWDirect release 12.5 or later.

oms_seq_nbr

numeric

3

A unique number to identify the message line on the order.

oms_message

alpha

60

A message for or about the order.

oms_print_flag

alpha

1

Determines whether the order message line prints or is available for internal use only.

Valid values are:

B = Print on both invoice and pick slip

C = Print on refund check only

G = Gift message

I = Print on invoice only

N or blank = Do not print

P = Print on pick slip only

R = Print on detachable area of refund check not visible to the customer

U = Print on the document defined by the user, such as a custom pick slip. If there is no user-defined document, the message does not print anywhere in CWDirect.

Y = Message has printed on refund check

Z = Message has printed on detachable area of refund check not visible to the customer

BeforeBodyTextLine

The text in this element and in the AfterBodyTextLine element comes from the entity associated with the order, if you have set up an email template for the entity; otherwise, it comes from the company. See Email Template Override at Entity Level for a discussion of setting an email template at the entity level, and see Working with E-Mail Notification Templates (WEMT) for a discussion of setting up an email template at the company level.

before_line_msg

alpha

60

The contents of the Text to print above items for the email notification template. You can specify up to ten lines of text.

AfterBodyTextLine

after_line_msg

alpha

60

The contents of the Text to print below items for the email notification template. You can specify up to three lines of text.

CS17b_01 CWDirect 18.0.x 2018 OTN