> For the complete documentation index, see [llms.txt](https://amfdocs.mftlabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amfdocs.mftlabs.io/agile-messaging-framework/tutorials/usecases/uc07.md).

# UC07

### **SFTP --> SFG --> AMF --> SFG --> MFG**

**Use Case:** Partner13 (Sender) send files to SFG via SFTP protocol, We Zip and deliver those files to the Partner14 (Receiver) using HTTP protocol (MFG) from SFG via AMF (Agile Messaging Framework).&#x20;

**Sequence Diagram**

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FVwHEoEzT1aLZx0Fqjplp%2FUC07.drawio.png?alt=media&amp;token=74bdffb2-53b2-4ca1-be0d-6920328a2540" alt=""><figcaption></figcaption></figure>

**Steps:**

A. Onboard Partner13 and Partner14 in SFG using AMF.

B. Onboard Partner13 SFTP profile in SFG using AMF (Customer Initiated Communication Profiles (Inbound)).

C. Create Message Types or use the existing one in AMF.

D. Create Message Mapping with Sender, Receiver and Message Type with a file pattern.

E. Create Zip Action as Action type.

F. Create Mailbox Action as Action type.

G. Create Workflow Definition and add Actions (Created in **step E** and **step F**) as step1 and step2.

H. Create Workflow Rule with Sender, Receiver, Message Type and Workflow Definition Name (Created in **step G**).

I. Verify the Message activity in AMF once Partner13 uploads the file to SFG via SFTP protocol. If everything was configured correctly, the file will be Mailboxed to Partner14 via HTTP protocol (MFG).

**Process:**

**A. Onboard Partner13 and Partner14 in SFG via AMF:**

Login to **AMF**

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FSoJqciZicXR33Hcf2HQA%2F0?alt=media)

Go to Onboarding -> **Users**

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2F79LE6sdcli4PkAuoa8RT%2F1?alt=media)

Click on + icon at the top right corner

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FYocPCqrV6IqHcXPuqWOj%2F2?alt=media)

Select Customer and give details of Partner13, select User Type, Authentication Type and click next.

1. **User Type**: Which Zone does the Partner belong to send or receive files? (DMZ or Trusted).
2. **Authentication Type**: Where do we store the Partner’s credentials? (LDAP or local (SFG/AMF) or both.

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FlZbQL27Dcn99zyw8WvCZ%2F3?alt=media" alt=""><figcaption></figcaption></figure>

Select the provider Partner belongs to and click next

1. **AMF:** AMF provider is used to onboard Partners which use UFA
2. **IBM: This** will come from the provider’s config. We can choose several types based on the provider's config.
3. **Open Ldap:** We need to select this if we selected the Authentication Type as LDAP in step **2.**

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FhzRGna4A6cv9MTydxKPC%2F4?alt=media" alt=""><figcaption></figcaption></figure>

Verify the Partner’s details and click **Onboard User**.

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FblPDmpfk5xcPbHLftu0q%2F5?alt=media" alt=""><figcaption></figcaption></figure>

**B. Onboard Partner13 SFTP in SFG using AMF (Customer Initiated communication profiles (Inbound)).**

Double click on the **Partner13**

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FLpVtECXqOzFyW0v0tkI1%2F6?alt=media" alt=""><figcaption></figcaption></figure>

Click on **+** icon in the top right corner

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FPoN3dNV4C1dlVbWZ0mWn%2F7?alt=media" alt=""><figcaption></figcaption></figure>

Give details of the SFTP Inbound and click save

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FLSeK2BqfpX6TQIqzFCCM%2F8?alt=media" alt=""><figcaption></figcaption></figure>

Once the Onboarding was done, we can see the status as completed.

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FR6hjhwLZXJTCLiRKreXE%2F9?alt=media" alt=""><figcaption></figcaption></figure>

**C. Create Message Type or use the existing one in AMF:**

Go to Message Types under Onboarding

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FuZ6dWdQuDYdzQar3pENI%2F10?alt=media" alt=""><figcaption></figcaption></figure>

Click on + icon in the right corner to add a new Message Type

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FRqPdHaBSJLfO5mlc3YT0%2F11?alt=media" alt=""><figcaption></figcaption></figure>

**Note**: In this scenario we will use the existing message type (GENERIC)

**D. Create Message Mapping with Sender, Receiver and Message Type with a file pattern:**

Go to Message Mapping under Onboarding

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2F0KSbOPNw1YstVfy6Xii9%2F12?alt=media)

Click on +icon at the top right corner

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FsOCibsR0FBxiQDlWhKgw%2F13?alt=media)

Select Sender, Receiver, and Message Type, give pattern of the files that Partner13 will send and click save.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2F1lBkhIkhCkPTVyfzcRHA%2F14?alt=media)

**E. Create Zip Action as Action type**

Go to Actions under Onboarding-> **Workflow**

<figure><img src="https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FnTGeWDFHJ28SIBOrdUlD%2F0?alt=media" alt=""><figcaption></figcaption></figure>

Click on + icon to create new action

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FjpcLzZeuPwBGYNWTMRjU%2F1?alt=media)

Give Name, select ZIP as Action Type.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FGFFyuWD0IJMog3GmnSxp%2F2?alt=media)

**F. Create** **Mailbox Action as Action Type.**

Give Name, select Mailbox as Action Type.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FSbcexLW8nilSt32l9MlA%2F3?alt=media)

* **Mailbox Path**: Path of the receiver (Partner14) mailbox
* **Extraction Count**: Option to add extraction for sent file (default value is 1).

**G. Create Workflow definition and add Actions (Created in step E and step F) as step1 and step2.**

Go to Definitions under Onboarding->Workflow.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FDoxFD6DM6NolhuCjPJvt%2F4?alt=media)

Click on + icon at the top right corner.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FXlt2B0bEfZeALZCRU7oI%2F5?alt=media)

Give Workflow Name, Description and click save.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FZgzSh0msxZNuwtDxiK8E%2F6?alt=media)

Double click on the Workflow Definition Name.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FxrMvkhCAgUKW6RwGlvYA%2F7?alt=media)

Click on the + icon at the top right corner.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FADAaabUMVSwjBvjLM5zv%2F8?alt=media)

Select the action that we created in **step E**  as step1  and click save.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2F1ZJGGFvT5dHMBP6MUCSk%2F9?alt=media)

Select the action that we created in **step F**  as step2  and click save.

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FflUcRWt1hkyY003jdKts%2F10?alt=media)

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FYW2UTVEe21HXHJGwQCPY%2F11?alt=media)

**H. Create Workflow Rule with Sender, Receiver, Message Type and Workflow Definition**

**Name (Created in step G).**&#x20;

Go to Rules under Onboarding -> Workflow

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FHlR9zplF1ROKY0WkLtoJ%2F12?alt=media)

Click on + icon at the top right

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FFf3l13Zoh0evmphIGGzN%2F13?alt=media)

Give Sender, Receiver, Message Type and Workflow (Created in **step G**) and click on save

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FAwhjl2p6HA6nPgv2FacG%2F14?alt=media)

**I. Verify the Message activity in AMF once the Partner13 uploads the file to SFG via SFTP protocol. If everything was configured correctly, the file will be Mailboxed to Partner14 via HTTP Protocol (MFG).**

Go to Message activity under Track N Trace

Here we can see the file Mailboxed to the Partner14

![](https://529847091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3lEcft4Hj193xOMx83Gm%2Fuploads%2FdeWY3tkD1cgJeQhCKDhv%2F15?alt=media)
