Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

General requirements / services

A W2P system is integrated into WEBSALE V8. With this system, a user can design his print templates online via web access. After the design, the W2P system transfers a unique document number (DocID) to the shop.

When the user places the order in the shop, the final print template (PDF file) is created by the W2P system via the DocID and transferred to the WEBSALE server via FTP. The PDF file is then collected by the ERP system for production. The W2P system serves as an alternative to the upload system. A user can use either the upload system or the W2P system for a product. Both are not possible at the same time and must be intercepted/synchronised accordingly.

File upload and upload system

A file upload (to a current order) is offered after a successfully completed order. Only the order number is used as a reference. The upload ID is no longer displayed to the orderer, but is still generated and passed on to the technical systems (ERP system, W2P system, etc.).

The upload system is extended by 2 functions:

  1. An upload is now only possible via the order number.

  2. An upload is not possible if the print template was created via the W2P system. For this purpose, a corresponding blocking flag is set by the shop if it has received a DocID from the W2P system.

Labelling of W2P products in the shop

For each article/set top article, 2 new parameters must be defined at variant level in the ERP system.

Parameter "W2P”

"y": Article is W2P-capable
"n" or empty: Article is not W2P-capable

On the single product view and per shopping basket item a button "W2P design" is offered or hidden due to this flag.

"W2PCost"

Optional design costs. A W2P design technically exists if the shop has received a DocID from the W2P system. Only then are the optional design costs displayed and added to the final total. The costs are displayed globally below the shopping basket and transferred to the ERP system as global costs (analogous to the delivery costs or the climate-neutral costs).

W2P call and execution

The W2P call takes place via an additional button on the product page and on the shopping basket page. If the orderer is not logged in, then a pop-up with 2 options is displayed when the W2P button is clicked.

  1. "Login in the shop" and forwarding to the login page. After registration, the customer is immediately redirected to the W2P system.

  2. "No registration" and direct forwarding to the W2P system.

Appropriate information texts in the pop-up are intended to make the advantages of registration clear to the customer.

Due to the forwarding to the W2P system, the shop is left. Therefore, a "back link" or a "cancel link" is always offered on the W2P pages, which takes the orderer back to the shop´s basket page. A W2P design button is also offered in the shopping basket so that the customer can carry out a W2P design again or change a design that has already been completed. A completed design can also be deleted in the shopping basket.

Document thumbnail

If the user confirms the W2P design with the W2P system, the shop is called up by the W2P system via redirect with a unique DocID. For this purpose, the shop displays a document thumbnail in the shopping cart, which was generated by the W2P system.

Final print template

After the user has placed an order, the shop sends the order to the W2P system via DocID. The W2P system then generates the final print template and transfers it to the shop server via FTP.

Transfer of the W2P print template

The W2P system transfers the print template via FTP to the WEBSALE server. In addition, a synchronisation file for the ERP system is required.

Name of the sync file: finished.sync

Content of the sync file: A single line with date and time (creation date of the sync file) in the format "YYYY/MM/DD HH:MM".

Example: 2012/03/31 10:09

Both files are transferred to the client's upload directory.

The upload directory has the following structure:

  • FTP root

  • UploadID (directory)

    • finished.sync (file)

    • PositionID (directory)

      • Printfile1 (file)

      • Printfile2 (file)

      • ...

      • PrintfileN (file)

    • ...

  • next UploadID (directory)

    • finished.sync (file)

    • PositionID (directory)

      • Printfile1 (file)

      • Printfile2 (file)

      • ...

      • PrintfileN (file)

    • ...

The shop passes two parameters to the W2P system when it is called, the UploadID and the PositionID. Below the FTP root, there are directories with the same name that have already been created by the shop. The finished.sync file must be copied below the UplodID directory. The print file is copied below the PositionID directory.

Example:
UploadID: AABB11CC
PositionID: 33DD55AA
Print file: abc.pdf

  • FTP root (directory)

    • AABB11CC (directory)

      • finished.sync (file)

      • 33DD55AA (directory)

        • abc.pdf (file)

Shop timeout

The Shop-SessionID has a timeout of 2 hours. To ensure that the shop timeout is not reached during a W2P design, the W2P system calls the shop in the background at regular intervals (e.g. every 30 minutes).

Calling the W2P system and data transfer

The following interfaces are implemented

  • Initialisation (via SOAP/SSL)

  • Forwarding from the shop to the W2P system

  • Forwarding from the W2P system to the shop

  • Order print template (via SOAP/SSL)

Initialisation

If an orderer clicks on the button "Create print template", the shop calls the W2P system in the background (server-to-server) via SOAP request. The XML structures and the WSDL are created and specified by the W2P provider. The shop transmits the following data to the W2P system:

Global data

Parameter

Required field

Comment

ShopID

yes

Specified by WEBSALE

SubshopID

yes

Language

yes

Language of the subshop. 2 character code according to ISO 639-1

UserIndex

no

Is transferred if the orderer is registered.

SuccessURL

yes

Link to the shop if the print template has been completed.

CancelURL

yes

Link to the shop, if user cancels the design.

KeepAliveURL

yes

Calling the shop in the background to reset the session timeout.

SuccessURL and CancelURL both link to the shopping basket. Possibly these could also link to 2 different shop pages later.

Item data

Parameter

Required field / Value

Comment

ProdIndex

yes

Master article number

DepVarIndex

yes

Technical variant number. Spaces of the original ERP system number have been replaced by dots.

Number

yes

Variant-dependent article number

Type

yes

Single
SetParent
SetChild

Single: The product is a normal product (not a set).

SetParent: The product is a set top article.

SetChild: The product is a set sub-article.

Name

yes

Article name

VarName (Multiple)

no

Variant name, e.g. "Page number".

VarValue (Multiple)

no

Variant value, e.g. "4-sided".

Billing address data

The billing address data is transmitted as name/value pairs.
The technical designations of WEBSALE are used as names. Empty data fields are not transferred.

Parameter

Required field

Comment

Name

yes

Name

Value

yes

Value

Example XML structure

<W2PInit>
  <Common>
    <ShopID>diedruckerei</ShopID>
    <SubshopID>01-aa</SubshopID>
    <Language>en</Language>
    <UserIndex></UserIndex>              (empty, user is not logged in)
    <SuccessURL><http://www.diedruckerei.de/?websale8=diedruckerei.....</SuccessURL>>
    <CancelURL><http://www.diedruckerei.de/?websale8=diedruckerei.....</CancelURL>>
    <KeepAliveURL><http://www.diedruckerei.de/?websale8=diedruckerei.....</KeepAliveURL>>
  </Common>
  <Products>
    <Product>
      <ProdIndex>PFYDL44</ProdIndex>
      <DepVarIndex>&lt;PFYDL44&gt;&lt;PFYDL44090.04...250&gt;</DepVarIndex>
      <Number>PFYDL4409004250</Number>
      <Type>SetParent</Type>.
      <Name>Folded flyer, DIN-long (portrait format)</Name>
      <Variations>
        <Variation>
          <Name>Paper</Name>
          <Value>90g/m² picture print</Value>
        </Variation>
        <Variation>
          <Name>Number of pages</Name>
          <Value>4-page</Value>
        </Variation>
        <Variation>
          <Name>Circulation</Name>
          <Value>250</Value>
        </Variation>
      </Variations>
    </Product>
    <Product>
      <ProdIndex>ZPLXXXXDD01</ProdIndex>
      <DepVarIndex>&lt;ZPLXXXXD01&gt;&lt;ZPLXXXX.DD...01&gt;</DepVarIndex>
      <Number>ZPLXXXXDD01</Number>
      <Type>SetChild</Type>
      <Name>DataCheck</Name>.
      <Variations>
        <Variation>
          <Name>DataCheck</Name>
          <Value>withDataCheck</Value>
        </Variation>
      </variations>
    </Product>
    <Product>
      <ProdIndex>ZPLA300YY12</ProdIndex>
      <DepVarIndex>&lt;ZPLA300YY12&gt;&lt;ZPLA3.00YY...12&gt;</DepVarIndex>
      <Number>ZPLA300YY12</Number>
      <Type>SetChild</Type>
      <Name>Production Time</name>.
      <Variations>
        <Variation>
          <Name>Production Time</Name>.
          <Value>1-2 working days</Value>
        </variation>
      </variations>
    </Product>
      ...
      ...
  </Products>
  <AddressData>
    <Entry>
      <Name>FirstName</Name>
      <Value>Max</Value>
    </Entry>
    <Entry>
      <Name>LastName</Name>
      <Value>Musterman</Value>
    </Entry>
    ...
  </addressData>
</W2PInit>
  • If a product has the type "Single", then no further products follow after the first product.

  • For products without variants, the "Variations" section and the "DepVarIndex" parameter are missing.

  • The SOAP request is made exclusively via SSL connection to the W2P system.

If successful, the W2P system responds with a unique TicketID.
If the W2P system responds with an error or if the W2P system cannot be reached, the orderer is shown a corresponding message that online design is not possible at the moment.

Forwarding from the shop to the W2P system

If the W2P system responds with a TicketID during initialisation, the orderer will be forwarded to the W2P system. The forwarding URL is permanently stored in the shop configuration. In addition, the TicketID is transferred to the W2P system in encrypted form.

Link: <W2P-URL>&w2pdata=<1>TicketID</1><2>DocID</2>.

The DocID is optional and is only passed on the shopping cart page in case the orderer wants to change an already completed design afterwards.

The data of "w2pdata" are not transferred in plain text, but Blowfish-encoded and then hex-coded. For this purpose, a common key with 16 characters is stored in the shop configuration and in the W2P system.

Forwarding from the W2P system to the shop

If the orderer cancels the design, the W2P system links to the "CancelURL".

After a completed design, the W2P system links to the SuccessURL and passes the DocID and the thumbnail URL.

Link: <SuccessURL>&w2pdata=<1>DocID</1><2>Thumbnail-URL</2>

The data from "w2pdata" is not passed in plain text, but Blowfish-encoded and then hex-encoded.

Order print template
If the order is executed by the user, the final creation of the print template is done by the W2P system. For this purpose, the shop calls the W2P system in the background (server-to-server) via SOAP request. The XML structures and the WSDL are created and specified by the W2P provider.

Parameter

Required field

Comment

TicketID

yes

Transferred to the shop by the W2P system during initialisation.

DocID

yes

UserIndex

yes

User is always logged in at this time.

UploadID

yes

PositionID

yes

Example XML structure

<W2POrder>
  <TicketID>xyz</TicketID>
  <DocID>abcdefg123</DocID>
  <UserIndex>123456</UserIndex>
  <UploadID>AABBCCDD</UploadID>
  <ItemID>1234CCDD</ItemID>
</W2POrder>

The SOAP request is made exclusively via SSL connection to the W2P system.

If the W2P system responds with an error or if the W2P system cannot be reached, then:

  • an error logging in the shop

  • a notification is sent to the shop admin by email.

Note
The DocID is also stored in the order data. Possibly the W2P provider could offer a page on which the customer (by entering the DocID) can subsequently generate the print template.

Change or delete product

If the user selects the function "Change product" or "Delete product" in the shopping basket for a product with an existing DocID, his design in the W2P system becomes invalid (DocID is deleted) and he must carry it out again, if desired. The orderer can be informed by a JavaScript pop-up or similar that he must carry out his design again if he wishes to change or delete the product.

Unable to render {include} The included page could not be found.
  • No labels