# Create an L/G

Use this page to open the new L/G form, enter a basic letter-of-guarantee request, or locate a
saved L/G before continuing with lifecycle work.

## What an L/G is

An L/G is the product's record for a letter of guarantee. Create the record or locate an existing
one before you work with its approval, activation, return, closure, or other lifecycle stages.
The L/G lifecycle includes `NA`, `Requested`, `Awaiting Approval`, `Rejected Approval`, `Approved`,
`Running`, `Due for Return`, `Returned`, `Cancelled`, `Liquidated`, `Expired`, `Closed`, and
`Valid Inclusion`.

| If you need to… | Go to |
|---|---|
| Enter a new letter-of-guarantee request | [Enter and save the basic request](#enter-and-save-the-basic-request) |
| Find a saved L/G by scope or stage | [Find a new or saved L/G](#find-a-new-or-saved-lg) |
| Continue approval, stage, return, closure, liquidation, cancellation, extension, deduction, or increase work | [L/G lifecycle](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-lifecycle) |
| Use the finance-route list and record view for reference work | [L/G finance view](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-finance-view) |
| Work with the L/G surface in a sales-job record | [Sales job record](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/sales-job-record) |
| Review the sales-job L/G relationship and history | [Sales job contacts, guarantees, and history](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/sales-job-contacts-guarantees-and-history) |

The create route and saved-record list are separate entry points. The L/G list is a list screen,
and the L/G details screen is a form screen; their available controls vary with the route and the
record state.

```mermaid
flowchart LR
    A[Need an L/G] --> B[Open the new form]
    A --> C[Open the saved-record list]
    B --> D[Enter the basic request]
    D --> E[Continue with saved-record work]
    C --> F[Choose a scope and stage view]
    F --> G[Open the matching row]
    G --> E
```

## Before you start

An L/G page appears only when the application, subscription, record, and permission conditions
allow that surface. Have the following ready before you choose a route.

| Check | What must be true | Why it matters |
|---|---|---|
| Route | Use the finance routes for a new form or the saved-record list. | The route determines whether you enter a request or locate an existing record. |
| Subscription | The details form is available only when the subscription condition allows it. | A blocked subscription prevents the details form from opening. |
| Record | Saved-record recommendations require a saved L/G at or after `Requested`. | The recommendation fields belong to saved-record work, not the initial entry. |
| Permission | Your account must have permission to view the page and use the relevant action. | A permission restriction can stop the page or an action before you can work. |
| Request information | Have the beneficiary, issuer, requested value, expiry information, and any configured request values ready. | These values are the information used by the create form. |

The details form also requires its L/G details record to be present. The new-form controls are
shown for the new-form route condition. In a sales-job record, the L/G list appears in the L/G
tab when that tab is selected.

Extension, deduction, increase, return, and edit controls appear in their corresponding popup
states. Recommendation controls appear only for a saved record at or after `Requested` and when
the relevant recommendation setting applies.

> **Note:** The create task and the lifecycle task are different. First create or locate the L/G;
> then use [L/G lifecycle](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-lifecycle) for later stage work.

## Find a new or saved L/G

Use the new route when you are entering a request. Use the saved-record list when you need to
identify an existing L/G by its scope, stage, or row values.

Prerequisites

- You have access to the applicable finance or sales-job surface.
- For a saved record, you know enough of its beneficiary, issuer, job, or stage to recognise its row.

Steps

1. Choose the route that matches your task.

   | If you need to… | Open |
   |---|---|
   | Enter a new request | The new L/G form |
   | Locate a saved record | The Financial LGs All Jobs list |

   ![The L/G entry points for opening a new form or saved-record list](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/2e0b3b9365c1ce341b46cf73e5167c17.png)

2. If you opened the new form, continue to [Enter and save the basic request](#enter-and-save-the-basic-request).

3. If you opened the Financial LGs All Jobs list, choose the scope that answers your search.

   | If you need to search… | Select |
   |---|---|
   | Across the available L/G records | **All** |
   | Company L/G records | **Company LGs** |
   | Principal L/G records | **Principal LGs** |

   ![The Financial LGs All Jobs list with its scope controls](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/79fc519b737e14734a18590a6768fbab.png)

4. Select the stage view that answers your search.

   | If you need to find records that are… | Select |
   |---|---|
   | In any listed stage | **All** |
   | Draft | **Draft** |
   | Waiting for approval | **Awaiting Approval** |
   | Approved | **Approved** |
   | Active | **Active** |
   | Due for return | **Due for Return** |
   | Expired | **Expired** |
   | Returned | **Returned** |
   | Closed | **Closed** |
   | Cancelled | **Cancelled** |
   | Liquidated | **Liquidated** |

   ![The Active stage view](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/d3698204457260f2efa0428d6cd88eff.png)

   The list stays open when you switch between **Draft** and **Active**. The **Active** view shows
   records whose stage is `Running`.

   ![The Draft stage view](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/9a0337054da28ba18498f1186f684f88.png)

5. Identify the row using the visible values under `L/G no.`, `Beneficiary`, `L/G issuer`, `Bank`,
   `Requested value`, `Issued value`, `Current value`, `Issue date`, `Expiry date`, `Job No`,
   `Stage`, `L/G type`, and `Increase amount`.

6. Open the matching record.

**Result:** You are on the new L/G form or on the saved-record list with a scope and stage view
selected. A matching saved row is identifiable from its visible values.

## Understand the create form

The new L/G form collects the parties, type, and requested value that make up the basic request.
Use the required marker shown beside each field.

| Visible field or option | What you see |
|---|---|
| **Beneficiary** | A required marker appears beside the field. |
| **LG Issuer** | A required marker appears beside the field. |
| **On Behalf of** | The field is visible without a required marker; its available choices appear when you open it. |
| **LG Type** | The field is visible without a required marker. |
| **Requested LG Value** | A required marker appears beside the field. |
| **Beneficiary Permitted To Extend** | A visible option appears without a label. |
| **Save** | Saves the form through the available save action. |
| **Save and Close** | Saves through the available save-and-close action. |

The form also includes **Expiry Date**. The available **LG Type** choices are **Bid bond**, **Down payment
guaranty**, **Performance bond**, and **Warranty bond**. The choices in **On Behalf of** depend on the
available records when the form is opened.

## Enter and save the basic request

Use this procedure to enter the values required for the initial request. The form requires
**Expiry Date** for a new or upgraded L/G, and the date cannot be earlier than today. The requested
value cannot be below `0`; **On Behalf of** and **LG Type** depend on the new or editable L/G
configuration.

Prerequisites

- You are on the new L/G form.
- You have the beneficiary, issuer, requested value, expiry date, and any configured values ready.

Steps

1. In **Beneficiary**, select the beneficiary for the guarantee.
2. In **LG Issuer**, select the issuer.
3. In **Expiry Date**, enter a date that is today or later.
4. In **On Behalf of**, select the available party when your configuration provides this field.
5. In **LG Type**, select the applicable type.

   | If the guarantee is for… | Select |
   |---|---|
   | A bid bond | **Bid bond** |
   | A down payment guarantee | **Down payment guaranty** |
   | A performance bond | **Performance bond** |
   | A warranty bond | **Warranty bond** |

6. In **Requested LG Value**, enter the requested value as a number that is `0` or greater.
7. If the form shows an extension option, select it when the request is extendable.
8. Choose how to save the request.

   | If you want to… | Select |
   |---|---|
   | Commit the request and remain on the form | **Save** |
   | Commit the request and leave the form | **Save and Close** |

9. If you leave the form while it has unsaved changes, choose an option in the `Do you want to save your changes?` dialog.

   | If you want to… | Select |
   |---|---|
   | Keep the changes | **Save** |
   | Leave without saving | **Don't Save** |

   ![The completed new L/G form and its save controls](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/f6646e7ce82dfaf6cb5c7aea90c8f14d.png)

**Result:** The request values are entered, and the available **Save** and **Save and Close** controls
remain visible.

## Handle route and configuration differences

The same L/G feature can look different because the route, subscription, permission, your
configuration, and selected list layout determine which surfaces and rules are available.

| Difference | What to expect |
|---|---|
| Finance route versus sales-job route | The finance route opens the L/G list directly. The list appears inside a sales-job record when the L/G tab is selected. |
| Subscription or not-found condition | The details form is available only when the subscription allows it and the record is found. |
| New form versus saved record | New-form controls appear on the new-form page. Recommendation fields appear for a saved record at or after `Requested` when the relevant recommendation setting applies. |
| Required markers | **On Behalf of**, **LG Type**, **Extension Period**, **Expiration date**, **Reason**, **LG Deduction Date**, **LG Deduction Percentage**, and **Returned On** can show required markers according to your configuration. The requested value can also be configured as required. |
| Popup state | Extension, deduction, increase, return, and edit controls appear in their named popup states. |
| Selected list layout | The visible list columns follow the selected table layout, so another layout can show a different set of columns. |

Use the required marker beside each field. On the new L/G form, **Beneficiary**, **LG Issuer**, and
**Requested LG Value** show required markers, while **On Behalf of** and **LG Type** do not.

## When saving or locating goes wrong

| What you see | What it means or what to do |
|---|---|
| `Your request was completed successfully` | The product's success message for a completed request. |
| `An error occurred while processing your request` | The product reported a processing error. Review the form values and try the action again. |
| `You don’t have permission` | Your account lacks permission for the attempted action. Ask your administrator to review access. |
| `Please Add Extension to activate the LG` | Add the required extension before activating the L/G. |
| `LG has one or more extensions or deductions and cannot be reverted to the requested stage` | The L/G has extension or deduction work that prevents reverting it to the requested stage. |
| `LG still needs confirmation` | Complete the required confirmation before continuing. |
| `Please choose a date after the current expiry date` | Choose a date after the current expiry date. |
| `There is a pending increase you can edit` | Edit the pending increase before starting another increase. |
| `Forbidden characters detected. Please remove them and try again.` | Remove the forbidden characters from the value and retry. |
| `You are not allowed to View this page!` | The page refused the view request. Check your permission for the route. |

The visible list controls include **Refresh**, **Table Layout**, and **Settings**. If saving does
not produce the expected record, use the visible response and contact your administrator when the
result does not match the expected route or permission.

## After the L/G is saved

A saved L/G is the hand-off point from basic entry to record work. At or after `Requested`, saved
record fields and recommendation controls become relevant when their record and configuration
conditions apply. Saved-record tabs and stage actions also require the applicable record and route
conditions.

Continue with [L/G lifecycle](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-lifecycle) for approval, stage, return, closure, liquidation,
cancellation, extension, deduction, and increase work. Use [L/G finance view](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/l-g-finance-view)
for the finance reference view.

### Use the saved-record tabs

Saved-record tabs hold the follow-up and shared maintenance surfaces for an L/G. Select the tab
that matches the work you need to do, then use the owning page for the detailed procedure.

Prerequisites

- You have a saved L/G record open, or you have opened an existing L/G from the saved-record list.
- The applicable route and record conditions allow the tab to appear.

Steps

1. Select the tab that matches the work you need to do.

   | If you need to… | Select |
   |---|---|
   | Open the record's comment surface | **Comments** |
   | Open the attached-file surface | **Attachment** |
   | Work with extensions | **LG Extensions** |
   | Work with deductions | **LG Deductions** |
   | Work with increases | **LG Increase** |
   | Review modification history | **Last Modifications** |

   ![The saved-record tab choices for follow-up work](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/d3698204457260f2efa0428d6cd88eff.png)

**Result:** The applicable saved-record tab is open, ready for the follow-up work supported by that
surface.
