Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Anypoint Partner Manager Tutorial: Designing a Transaction

Anypoint Partner Manager V1.0 was deprecated in March 2021. Its End of Life is March 31, 2022. Support for Anypoint Partner Manager 1.0 continues in accordance with the Product Support and Maintenance Terms but is not available for new customers or upgrades. For the latest version of Anypoint Partner Manager, contact your Customer Success Manager to determine how you can migrate to the current version.

This tutorial:

  • Illustrates the role Anypoint Partner Manager (APM) plays in B2B transaction processing.

  • Introduces Transaction Designer, an APM feature that enables you to design the elements of a transaction from beginning to end.

  • Provides instructions for using Transaction Designer to configure APM so that you can simulate a transaction and see how APM processes it.

td overview
Figure 1. Transaction Overview

The elements required to process a transaction are shown in Transaction Overview. In this tutorial, you will create and configure these elements in this order:

Before You Begin

Verify that you have the following:

  • Anypoint Platform user account with APM access

    If you are unable to access APM, see your MuleSoft account administrator for assistance.
  • Anypoint Studio with Mule 3.8.4 and the following connectors:

    • Partner Manager 6.5.0

    • AS2 v2.1.0

    • FTPS v2.0.0

    • EDIFACT EDI

    • RosettaNet

    • X12 v1.2.2

    • Object Store v2.1.0

Download Tutorial Materials

  1. Download link: APM Tutorial Materials.

  2. Click Anypoint Partner Manager Tutorial Materials.zip to expand it.

Get Started

  1. Start APM. The Transaction Monitoring Page appears.

  2. In the left-hand navigation pane, click Partner Configuration. The Partner Configuration Page appears.

partner configuration
Figure 2. Partner Configuration Page

Configure a Supplier

This tutorial works with two partners: a Supplier and a Buyer.

The Supplier is AAZFasteners, a fictional retailer of nuts and bolts, also identified on the Partner Configuration Page as YOUR COMPANY.

In your copy of APM, YOUR COMPANY is probably not named AAZFasteners. However, for illustration purposes, we refer to YOUR COMPANY as AAZFasteners throughout this tutorial. If you want to change the name of YOUR COMPANY to AAZFasteners, see Create and Configure Partners. However, the tutorial will work without making this change.

The other partner in this tutorial is the Buyer, a fictional retailer of home supplies. In Create the Buyer Partner, we create this partner, identifying it as AcmeHomeSupply. In the tutorial, AcmeHomeSupply uses APM to order products from AAZFasteners. In the following sections, you will:

Add Identifiers

Identifiers are values, communicated in messages, that can be used to uniquely identify a specific partner. Some identifiers are defined by standards bodies, such as DUNS numbers, which are assigned by Dun and Bradstreet. Others are mutually defined between partners. AS2 uses identifiers to identify the sender and receiver of a transmission. X12 and EDIFACT use identifiers to identify the sender and receiver of an EDI document.

For these partners, we use two identifiers:

  • X12-ISA

  • AS2

In the following sections, we add identifiers for the supplier. We will add buyer identifiers in Add Buyer Identifiers.

Add Supplier X12-ISA Identifier

  1. On the Partner Configuration Page, click AAZFasteners.

img-company-information-yc
Figure 3. Company Information Page
  1. In the Partners section of the left-hand navigation pane on the Company Information Page, click Identifiers.

    The Identifiers Page appears.

img-identifiers-aaz
Figure 4. Identifiers Page
  1. On the Identifiers Page, click New.

    The New Identifier Page appears.

img-identifier-new
Figure 5. New Identifier Page
  1. In the Type box, click the down-arrow.

    A list of identifier types appears.

  2. From the list, select X12-ISA.

    More identifier boxes appear.

    (The specific boxes that appear depend on your choice in this step.)

  3. In the Interchange ID Qualifier (ISA) listbox, click the down-arrow.

    A list of qualifiers appears.

  4. AAZFasteners and AcmeHomeSupply do not use standards-based identifiers, so ZZ (Mutually Defined) is the appropriate choice.

  5. In the Interchange ID (ISA) box, type AAZ.

  6. Click Save to save the new identifier.

img-identifiers-x12-added-aaz2
Figure 6. Identifiers Page (X12-ISA Identifier Added)

Note that the Identifier you added in the preceding steps (X12-ISA) now appears.

Add Supplier AS2 Identifier

  1. On the [img-identifiers-x12-added-aaz], click New.

    The New Identifier Page appears.

  2. In the Type box, click the down-arrowhead.

    A list of identifier types appears.

  3. From the list, select AS2.

    The AS2 Identity box appears.

  4. In the AS2 Identity box, type AAZ.

  5. Click Save to save the new identifier.

Upload Certificates

APM provides for the uploading of certificates to verify the identity of a partner.

Upload the Supplier Certificate

  1. On the [img-identifiers-x12-added-aaz], in the left-hand navigation pane, in the PARTNERS section, click Certificate.

    The Certificate Page appears.

img-certificate
Figure 7. Certificate Page
  1. Click Choose File.

    A file selection window specific to the operating system of the computer you are using appears.

  2. In the selection window, navigate to the folder to which you downloaded the tutorial materials in Download Tutorial Materials.

  3. In the Certificates folder, select HomeOrg.p12.

    HomeOrg.p12 appears in the Certificate box.

  4. Click Upload Certificate.

    The Certificate Page refreshes, displaying details of the uploaded certificate.

Design a Target Channel

A channel provides a means of specifying, for a given partner:

Type

Source or Target, As created in Channels or in Transaction Designer. Source Channel settings are always specific to the origin of a document. Target Channel settings are always specific to the destination.

Document

As created in Document Types or in Transaction Designer

Document Map

As created in Maps or in Transaction Designer

Endpoint

As created in Endpoints or in Transaction Designer

In this section, you create a template for any transaction in which you receive a purchase order from a partner and send it to your HTTP endpoint. Later, in Design a Source Channel, you will use this template as the starting point from which you configure a transaction specific to receiving a purchase order from AcmeHomeSupply.

Start Transaction Designer

  1. In the CONFIGURATION section of the left-hand navigation pane on the Endpoints Page (or any other APM Configuration page), click Transaction Designer.

img-td-aaz
Figure 8. Transaction Designer Page
  1. On the Transaction Designer Page, click Create Template.

img-td-new-aaz
Figure 9. Transaction Design Page

Create the Target Channel

On the Target Channel side of the Transaction Design Page, click Create New Channel.

img-td-target-channel-in-progress-aaz
Figure 10. Target Channel In-Progress Page

Create the Source Document Type for the Target Channel

The terms document, file, and message are used interchangeably in the B2B world to reflect an instance of a structured payload being passed through a system to convey information about a transaction. For consistency, we use the term document to represent these instances.

APM enables you to categorize and configure specific Document Types. In this section, you create a Source Document Type for the Target Channel.

To Create the Source Document Type for the Target Channel

  1. On the Target Channel In-Progress Page, in the Source Document panel of the Target Channel section, click New Document.
    The Source Document Page appears.

img-td-new-source-doc-aaz
Figure 11. Source Document Page
  1. On the Source Document Page, in the Standard listbox, click the down-arrow, then select JSON.

    The Message Type box appears.

  2. In the Message Type box, type PurchaseOrder.

  3. Click Save.

    The Target Channel In-Progress Page appears, displaying the Document Type you added.

Configure Endpoints

An endpoint is the entry point to a service, a process, or a queue or topic destination in service-oriented architecture. In APM, an endpoint defines the protocol, address, and other details specific to an exchange of messages between partners.

Configure the Target Endpoint

  1. On the Target Channel In-Progress Page, click New Endpoint.

    The Endpoint Page appears.

img-td-new-endpoint-aaz
Figure 12. Endpoint Page
  1. In the Protocol listbox, click the down-arrow to expand the list of available protocols.

    From the list, click HTTP.

    Notice that the the Type box, is populated with the appropriate value (SEND).

    The Endpoint Page expands to include more settings.

  2. Scroll down to the Operation Settings section.

    In the Host box, type 0.0.0.0.

  3. In the Port box, type 8086.

  4. In the Path box, type /PurchaseOrder.

  5. In the Authentication listbox, click the down-arrow to expand the list of available methods.

    From the list, click None.

  6. Click Save.

Save the Transaction

  1. In the Transaction Name box, type TargetPurchaseOrder.

  2. Click Save Template.

    The Save transaction Page appears.

td save transaction aaz
Figure 13. Save transaction Page
  1. On the Save transaction Page, click Close.

Configure a Buyer

Create the Buyer Partner

  1. On the Target Channel In-Progress Page, in the left-hand navigation pane, click Partners.
    The Partner Configuration Page appears.

  2. On the Partner Configuration Page, click Create New Partner.
    The Company Information Page appears.

img-company-information
Figure 14. Company Information Page
  1. On the Company Information Page, in the Company Name box, type AcmeHomeSupply.

  2. Click Save.

Add Buyer Identifiers

Make sure you are configuring AcmeHomeSupply, not AAZFasteners.

Add Buyer X12-ISA Identifier

To add this identifier, perform steps in Add Supplier X12-ISA Identifier, substituting Acme for AAZ.

Add Buyer AS2 Identifier

To add this identifier, perform steps in Add Supplier AS2 Identifier, substituting Acme for AAZ.

Upload the Buyer Certificate

To add the certificate, perform steps in Upload the Supplier Certificate, substituting partner.cer for HomeOrg.p12.

Create the Buyer Send Endpoint

  1. On the Certificate Page, in the CONFIGURATION section of the left-hand navigation pane, click Endpoints.

    The Endpoints Page appears.

endpoints
Figure 15. Endpoints Page
  1. On the Endpoints Page, click New.

    The Add New Endpoint Page appears.

    endpoint-add
    Figure 16. Add New Endpoint Page
  2. In the Protocol listbox, click the down-arrow to expand the list of available protocols.

    From the list, click AS2.

  3. In the Type listbox, click the down-arrow to expand the list of available Types.

    From the list, click Send.

    The Add New Endpoint Page expands to enable configuration of additional settings.

  4. Select Default for AcmeHomeSupply.

  5. In the URL box, enter http://localhost:8089/850

  6. Make sure that the following checkboxes are selected:

    • Message Encrypted

    • Message Signed

    • MDN Required

  7. Click Save

    The Endpoints Page appears.

Design a Source Channel

Start Transaction Designer

  1. In the CONFIGURATION section of the left-hand navigation pane on the Endpoints Page (or any other APM Configuration page), click Transaction Designer.

img-td-aaz
Figure 17. Transaction Designer Page
  1. On the Transaction Designer Page, click Start from template.

    The Pick a Template Page appears.

img-td-pick-a-template-acme
Figure 18. Pick a Template Page
  1. On the Pick a Template Page, select TargetPurchaseOrder.

The Name box shows that you are working on a copy of the TargetPurchaseOrder template, as opposed to the template itself. This enables you to build your transaction without changing the template from which you are starting it.
You can edit a template from the Pick a Template Page, but you must be working with YOUR COMPANY - in this case, AAZFasteners - to do so
img-td-new-acme
Figure 19. Transaction Design Page

Create the Source Channel

On the Source Channel side of the Transaction Design Page, click Create New Channel.

img-td-source-channel-in-progress-acme
Figure 20. Source Channel In-Progress Page

Create the Source Document

  1. On the Source Channel In-Progress Page, click New Document.
    The Source Document Page appears.

img-td-new-source-doc-acme
Figure 21. Source Document Page
  1. On the Source Document Page, in the Standard listbox, click the down-arrow, then select X12.

  2. In the Version listbox, select 4010.

  3. In the Message Type listbox, select PO (850 Purchase Order).

  4. Click Save.
    The Source Channel in-progress Page appears, displaying the Document Type you added.

img-td-source-channel-in-progress-doc-added-acme
Figure 22. Source Channel in-progress Page

Create the Buyer Receive Endpoint

  1. On the Source Channel in-progress Page, click Possible Endpoints.

img-td-possible-endpoints-acme
Figure 23. Possible Endpoints Page
  1. On the Possible Endpoints Page, click Add New Endpoint.

    The Endpoint Page appears.

img-td-endpoint-acme
Figure 24. Endpoint Page
  1. In the Protocol listbox, click the down-arrow to expand the list of available protocols.

    From the list, click AS2.

  2. Notice that the the Type box, is populated with the appropriate value (RECEIVE).

    The Endpoint Page expands to include more settings.

  3. Select the Default for AcmeHomeSupply checkbox.

  4. In the URL box, type http://localhost:8085/edi.

  5. Check the Message Encrypted and Message Signed checkboxes.

  6. Click Save.

    The Possible Endpoints Page appears.

  7. On the Possible Endpoints Page, click the left end of the AS2-Receive endpoint row.

    On the Possible Endpoints Page the row expands to identify that a property is missing.

img-td-possible-endpoints-no-property-acme
Figure 25. Possible Endpoints Page

Note that, on the Possible Endpoints Page, the warning 1 property cannot be found in the document type appears.

Add a Property

  1. On the Possible Endpoints Page, click the Property icon (identified by a gold arrow in the figure). The Linked Endpoint Properties Page appears.

td linked endpoint properties acme
Figure 26. Linked Endpoint Properties Page
  1. On the Linked Endpoint Properties Page, click New Property.

    The Add Property Page appears.

  1. In the Property Type listbox, click the down-arrow.

  2. In the drop-down list, scroll down to select Direction (system).

  3. In the Property Source Type box, select Constant.

  4. In the Path box, type INBOUND.

  5. Click Save Property.

  6. Click Save.

  7. Click Save.

    Note that Resolution status is Complete.

td source channel in progress endpoint added acme
Figure 27. Source Channel in-progress Page

Configure the Map

A map is a file that contains information necessary to transform one document type to another. In this walkthrough, we upload a map to transform a source document of the type we created in the previous section to a target document of the type we created in the previous section.

  1. On the Source Channel in-progress Page, click New Map.

    The Map Page appears.

td new map acme
Figure 28. Map Page
  1. On the Map Page, click the Target Document box.

    The Pick a document Page appears.

  2. On the Pick a document Page, click the row that corresponds to the Target Document Type - that is, the row for which the value in the Name column is JSON-PurchaseOrder-AAZFasteners.

    The Map Page appears, with JSON-PurchaseOrder-AAZFasteners in the Target Document box.

  3. In the Mapping Type box, click DataWeave.

    For more information, see DataWeave.

  4. Click Save.

td source channel in progress map added acme
Figure 29. Source Channel in-progress Page
  1. On the Source Channel in-progress Page, Click the Mapping Script box.

    The Map Script window appears.

  2. Click Choose File, then navigate to the folder you created when you unzipped EDI Demo in Download Tutorial Materials.

    In the Maps folder, select apm-tutorial-850_4010_IN.dwl.

    apm-tutorial-850_4010_IN.dwl appears in the Schema box.

  3. Click Save.

The Source Channel in-progress Page appears.

Add the Target Channel

  1. On the Source Channel in-progress Page, click Use Existing Channel.

    The Pick a Target Channel box appears.

  2. On the Pick a Target Channel box, pick the JSON channel you created in Design a Target Channel.

    The Source Channel in-progress Page appears, displaying the completed Target Channel.

  3. Click Save.

The Save Transaction Page appears.

td save transaction
Figure 30. Save Transaction Page
  1. Click Close.

  2. In the left-hand navigation pane, click Transaction Designs.

td designs acme
Figure 31. Transaction Designer Page

Configure an S3 Bucket (optional)

Configuring an Amazon Simple Storage Service (Amazon S3) bucket enables you to view message payloads in Monitor the Transaction. You will add configuration data from the bucket in Configure APM Routing Engine in Anypoint Studio.

Copy APM Information

In order to identify your APM environment and its API Key to Anypoint Studio:

Copy your Environment ID

  1. On the B2B Transactions Page, in the left-hand navigation pane, click Administration, then click Environments.

  2. In the row that corresponds to the environment with which you are working, click copy.

Identify or Create an API Key

In order to create a Mule project, you must enter an API Key.

If you have an existing API Key, use it. If you do not know the API Key, consult your organization’s MuleSoft administrator.

If your organization has not created an API Key, you can use APM to create one.

The API Key is used by every Mule application across your entire Master Organization that communicates with Anypoint Partner Manager. Therefore, before you create a new API Key, coordinate with your organization’s MuleSoft administrator to ensure that none of your organization’s processes are using an existing API Key because, if they are, creating a new API Key will cause them to cease functioning. In that case, instead of creating a new API Key, use the existing API Key.

To obtain a key, see Create a New API Key.

Configure APM Routing Engine in Anypoint Studio

For information about using Anypoint Studio, see Anypoint Studio.

Import Applications

Import the Routing Engine Application

  1. In Anypoint Studio, click File.
    The File Menu appears.

  2. On the File Menu, click Import.
    The Import Source Selection Window appears.

  3. In the Import Source Selection Window, select Anypoint Studio generated Deployable Archive (.zip).

  4. Click Next.
    The Import Mule Project Window appears.

  5. In the Import Mule Project Window, browse to the location to which you downloaded the archive in Download Tutorial Materials.

  6. Click to expand APM Tutorial Materials, and then click Apps to expand that folder.

  7. In the Apps folder, click apm-tutorial-routing-engine.zip, then click Open.
    The Project Name box auto-populates.
    NOTE: The Project Name must be unique with respect to any previously-imported projects. If it is not, Finish will not be enabled. If this is the case, change the Project Name so that Finish is enabled.

  8. Click Finish.
    The project appears in the Anypoint Studio Package Explorer pane.

Import the Mock Partner Application

To import the mock partner application, repeat the steps in Import the Routing Engine Application, substituting apm-acme-mock.zip for the Routing Engine App in Step 7.

Insert APM Environment Information

  1. In Anypoint project (expand if necessary), expand the src/main/app, double-click apm.prod.edi.properties.
    Project properties appear in the Anypoint Studio Canvas.

  2. In Line 2, replace {Insert environment id} with the environment ID you copied in Copy your Environment ID.

  3. In Line 3, replace {Insert API Key} with the API Key you copied in Identify or Create an API Key.

  4. In Anypoint Studio, click File, then click Save All.

Start the Applications

  1. In Package Explorer (Anypoint Studio), right-click apm-routing-engine-nm.

  2. Click Run As.

  3. Click Mule Application (configure).

  4. On the General tab, in the Mule domains/projects to launch pane, select both apm-routing-engine-nm and AS2-partnermock.

  5. Click Run.
    When both applications have deployed, proceed to Send a Message.

Send a Message

  1. Choose and install the Postman app specific to your operating system from getpostman.com.

  2. In Postman, import apm-tutorial-postman-collection.json from the location to which you downloaded in Download Tutorial Materials, then select the archive and click Open.

    The Postman user interface looks something like Postman User Interface.

  3. In the imported collection, select INBOUND-850.

  4. Click Send.

  5. Go to Monitor the Transaction to see how APM displays transaction information.

  6. If you send another request from Postman, increment the request number in the four places it appears. In Postman User Interface, this number is 47530. We have added yellow highlighting where the number appears in the figure.

td postman
Figure 32. Postman User Interface

Monitor the Transaction

In Anypoint Manager, in the left navigation pane, click Transaction Monitoring
The Transaction Monitoring Page appears.

transaction monitoring successful transaction
Figure 33. Transaction Monitoring Page

The Transaction Monitoring Page should confirm that:

  • An XML purchase order as read from the company’s filesystem and transformed to an X12 850 document.

  • The 850 was sent to a supplier over AS2.

  • The AS2 Connector listened for (on an AS2 endpoint) and received an X12 997 document that identifies whether the 850 was accepted or rejected.

Inspect a Payload

APM enables you to view a transmission payload. For example, in Transaction Monitoring Page, click the Payload icon in the right pane (identified in the figure by the gold arrow). The Transmission Payload Page appears, presenting payload data.

transmission payload
Figure 34. Transmission Payload Page

More Information

For more information, see: