Create Forecast - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API creates a Forecast in Smart Materials. A Forecast defines parameters like work packages, warehouses, and so on of a Forecast Run.

SHARED Tip A Forecast Run is a combination of Forecast header code and a unique run number.

Required Privilege: API_CREATE_FAHEADER

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL: POST https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Forecasts

Specify values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the Forecast is created.

Element

Description

Type

Required

Notes

FahCode

Name of the Forecast specifies what the Forecast does
and is attached to a
run number.

String

Required

RunNumber

Unique number attached to a FahCode

Decimal

Required

For a new Forecast, run number
is 1. However, when the
same forecast with
similar selections is specified
again, then you must create
only a new run number.

Shortage

Specifies acceptable short quantities used in Bill of Materials allocation.

Allowed values are:

  • 2-Pass Optimized (Any)

  • 2-Pass Optimized (1)

  • 2-Pass Optimized (2)

  • 2--Pass CIP

  • 1-Pass Single (Any)

  • Only Entire Drawings.

String

Optional

Default value is 2-Pass Optimized (Any).

Allocate Level

Defines the pre-receiving level of material that a Forecast Run should check.

Allowed values are:

  • Only Inventory: Material should be present in the inventory
    of the warehouse that is assigned to a Forecast Run.

  • Shipped Items: Already shipped material
    i.e., field
    'Actual Ship'
    must be filled in expediting.

  • Approved Purchase Orders: Specifies approved
    purchase orders.
    In case of notices of commitment,
    approved change order is considered
    till no approved purchase order is created.

  • Approved Requisitions: Material of the latest approved PO
    requisition supplements are also
    considered. An unapproved supplement
    must not exist. The difference of Total Release
    Qty and Last Total
    Release Qty is used as quantity.

  • All Requisitions: This works in the same way as
    Approved Requisitions (ER) except that the
    latest supplement is considered
    regardless of whether
    it has been approved or not.

String

Optional

Forecast Run starts with the inventory level and look
out for material till the level allocated here.

For this search,
list positions with outstanding
quantities
are considered.

Default value is Only Inventory.

SplitType

Defines Forecast Run split type. Allowed values are:

  • None (default)

  • Node Name

  • Node Attribute

  • Position Attribute.

String

Optional

AttrId

Unique ID of the used attribute, when the split type is NA or PA.

Decimal

Optional

To view existing attributes, use:

GET

https://{host}/Smat/V1/
Projects(':project')
/Disciplines
(':discipline')
/Nls(':language')
/Attributes

DtpId

Unique ID of the delivery type

Decimal

Optional

To view existing delivery types, use:

GET

https://{host}/Smat/V1/
Projects(':project')
/Disciplines
(':discipline')/Nls
(':language')
/DeliveryTypes

Priority

Type of priority specified for the assigned nodes
in the work packages of the Forecast Run.

Allowed values are:

  • INSTALL_PAY_ITEM (CIP)

  • ISSUED FIRST

  • NODE ATTRIBUTE

  • WEIGHT (CIP)

  • NULL.

String

Optional

Default value is NULL.

SortOrder

Allows you to calculate the weight of nodes assigned to a work package.

Allowed Values are:

  • HeaviestFirst:Weight calculation is mandatory,
    and the attribute set order of
    assigned work
    package is descending.

  • HeaviestLast: Weight calculation is
    mandatory, and the
    attribute set order of assigned
    work packages
    is ascending.

  • None: No weight calculation is required.

String

Optional

Default value is None.

WeightAttrId

Unique ID of the weight
attribute.
Weight attribute determines the
node attribute.
The calculated weight is assigned
to the node attribute.

Decimal

Optional

TagNoOption

Tag number option. Allowed values are:

  • Ignore Tag Number

  • Not Ignore Tag Number.

String

Optional

Default value is
Not Ignore Tag Number.

DdId

Unique ID of the delivery designation

Decimal

Optional

To view available delivery designations,
use:

GET https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/DeliveryDesignations

AllPositionInd

Allowed values are Y and N.

  • If value Y is passed,
    positions that
    are not forecasted,
    are also traced.

String

Optional

PositionsWithFullSiteQty

Allowed values are Y and N.

  • If value Y is passed,
    the BOM positions that
    are completely reserved
    or issued, are
    no longer considered
    by the Forecast Run.

String

Optional

SubstInd

Indicates when the substitution/ transformation
must be done automatically
by the Forecast Run.

Allowed values are Y, N, and A.

  • Y: consider substitution/ transformation

  • N: do not consider substitution /transformation

  • A: consider substitution/ transformation automatically.

String

Optional

Default value is N.

ExcludeMIRQtyInd

Indicates whether the issued quantities on unposted MIRs by BOM
are to be considered for the list positions in the Forecast Run.

Allowed values are Y and N.

  • If value Y is passed, it will consider MIR by BOM issue quantities
    for the list positions over
    an unposted MIR by
    BOM in Forecast and Reservation Run.

String

Optional

BestQuantityInd

Allowed values are Y and N.

  • If value Y is passed, the
    best quantity of the list position is
    calculated using the best quantity logic.

String

Optional

If StatId is not passed,
then BestQuantityInd should be set to Y.

UseOnlySiteStatusInd

Allowed values are Y and N.

  • If value Y is passed,
    only those issue
    statuses which are marked as Use on Site are considered.

String

Optional

If BestQuantityInd is set to N,
then UseOnlySiteStatusInd
automatically sets to value N.

OnlyEndnodesInd

Allowed values are Y and N.

  • If value Y is passed,
    only terminal BOM
    nodes are processed.

String

Optional

StatId

Unique ID of the issue status.

  • If BestQuantityInd is set
    to N, then StatId is
    a mandatory parameter.

Decimal

Optional

To view existing Issue status, use:

GET https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/IssueStatus

LstId

Unique ID of the list status

Decimal

Required

To view existing list status, use:

GET https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/ListStatus

WeightInd

Allowed values are Y and N.

  • If value Y is passed,
    weight information is calculated
    and appears in the
    Forecast Run result.

String

Optional

CostInd

Allowed values are Y and N.

  • If value Y is passed,
    cost information is calculated
    and appears in the
    Forecast Run result.

String

Optional

HourInd

Allowed values are Y and N.

  • If value Y is passed,
    hour information is calculated
    and appears in the
    Forecast Run result.

String

Optional

StartDate

Item shipments whose
Promised on Site date is
greater than this
given start date are retrieved.

Date Time Offset

Optional

The acceptable format is YYYY-MM-DD.

EndDate

Item shipments whose
Promised on Site date
is smaller than this
given end date are retrieved.

Date Time Offset

Optional

The acceptable format is YYYY-MM-DD.

IgnoreNullDateInd

Allowed values are Y and N.

  • If value is passed and prediction
    on site is NULL, then
    the item shipment is ignored.

String

Optional

AutoAssignWhInd

Auto assign warehouse to the Forecast.
Allowed values are Y and N.

  • If value Y is passed, then
    all the warehouses that
    are assigned to the
    login user get assigned
    to the given Forecast.

String

Required

Forecast requires multiple collections which are as follows:

Element

Description

Type

Required

Notes

ListNodes

Collection of list nodes that you can assign to a work package.

To view existing list nodes, use:

GET

https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)/Listnodes

String

Optional

  • You can assign only those list nodes
    to a work package that are selected and assigned in
    screen C.10.18 for the login discipline.

  • If no list node is assigned to screen C.10.18,
    then you can assign list nodes to work package from screen B.20.03.

AssignedWarehouses

Collection of Forecast warehouses

Collection

Optional

To view existing warehouses, use:

GET

https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/Warehouses

AssignedWorkpacks

Collection of Forecast work packages

Collection

Required

To view existing work packages, use:

GET

https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/Workpackages

  • AssignedWarehouses Entity Type

Element

Description

Type

Required

Notes

OrderSeq

Sequence of the warehouses considered while forecasting.

Decimal

Optional

WhCode

Name or code of the warehouse

String

Optional

To view existing warehouses,
use:

GET

https://{host}/Smat/V1/Projects(':project')
/Disciplines(':discipline')/Nls(':language')
/Warehouses

BnlCode

Name or code of the bin location

String

Optional

To view existing bin locations,
use:

GET https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/BinLocations

  • AssignedWorkpacks Entity Type

Element

Description

Type

Required

Notes

OrderSeq

Sequence of the work packages considered while forecasting

Decimal

Optional

AttrSort

If the priority for a work package is Attribute,
AttrSort controls the sort order.

String

Optional

Default value is Ascending.

PriorityType

Priority type specified for work package in the current Forecast Run.

Allowed values are:

  • ATTRIBUTE

  • WEIGHT (CIP)

  • INSTALL_PAY_ITEM (CIP)

  • ISSUED FIRST

  • WORK PACKAGE.

String

Optional

Default value
is WORK PACKAGE.

ApiAttributes

List of attributes attached to the Forecast Run.

This attribute list is used to create where condition for list positions.

Collection

Optional

ApiCommodityCodes

List of attached commodity codes.

These commodity codes
and sizes are used to
create where condition for ident.

Collection

Optional

WpId

Unique ID of the work package

Integer

Optional

To view existing warehouses, use:

GET

https://{host}/Smat/V1/Projects(':project')
/Disciplines
(':discipline')/Nls(':language')
/Warehouses

  • Api Attrributes Entity type

Element

Description

Type

Required

Notes

AttrCode

Name or code of the attribute

String

Required

To view existing attributes,
use:

GET

https://{host}/Smat/V1/Projects(':project')
/Disciplines(':discipline')/Nls(':language')
/Attributes

AttrValue

Value of the attribute

String

Optional

  • ApiCommodityCodes Entity Type

Element

Description

Type

Required

Notes

CommodityCode

Name or code of the commodity

String

Required

To view existing commodity codes,
use:

GET

https://{host}/Smat/V1/Projects(':project')
/Disciplines(':discipline')/Nls(':language’)
/Commodities

Size (1-5)

Value of inputs of the geometric details

String

Optional

Five values are allowed.

Sample Code

POST https://in-smatapi.ingrnet.com/API21/Smat/v1/Projects('M06_1108')/Disciplines('PIPE')/Nls('ENGLISH')/Forecasts

{

"FahCode":"FAHCODE380",

"RunNumber":2,

"Shortage":"2-Pass Optimized(Any)",

"AllocateLevel":"Shipped Items",

"SplitType":"PA",

"AttrId":5571,

"DtpId":5701,

"Priority":"ISSUED FIRST",

"SortOrder":"HeaviestFirst",

"WeightAttrId":5130,

"TagNoOption":"Ignore Tag Number",

"AllPositionsInd": "Y",

"PositionsWithFullSiteQty":"Y",

"SubstInd":"Y",

"ExcludeMIRQtyInd":"Y",

"BestQuantityInd":"Y",

"UseOnlySiteStatusInd":"Y",

"OnlyEndnodesInd":"Y",

"StatId":5626,

"LstId":5046,

"WeightInd":"Y",

"CostInd":"Y",

"HourInd":"Y",

"StartDate":"2018-04-16",

"EndDate":"2018-04-16",

"IgnoreNullDateInd":"Y",

"ListNodes":

[

"MTO_FF"

],

"AssignedWarehouses":

[

{

"OrderSeq":2,

"WhCode":"RM_STD_WAREHOUSE"

}

],

"AssignedWorkpacks":

[

{

"OrderSeq":1,

"WpId": 2222,

"AttrSort":"ASC",

"PriorityType":"WP",

"ApiAttributes":

[

{

"AttrCode":"E_XCX_CONDUCTOR",

"AttrValue":"05"

}

],

"ApiCommodityCodes":

[

{

"Size1":"1.25",

"Size2":"S-XXS",

"Size3":"20",

"Size4":"28.5MM",

"Size5":"44929142",

"CommodityCode":"165201ETOF2E205"

},

{

"Size1":"20",

"Size2":"9.5MM",

"Size3":"S-XXS",

"Size4":"25.4MM",

"Size5":"52848838",

"CommodityCode":"165201EFOF2J042"

}

]

}

],

"AutoAssignWhInd":"N"

}

Success Response

Status: 200 OK

{

"@odata.context":"https://in-smatapi.ingrnet.com/API21/SMAT/V1/$metadata#Projects('M06_1108')/Disciplines('PIPE')/Nls('ENGLISH')/Forecasts/$entity",

"FahId":65698,

"ProjId":"M06_1108",

"FahCode":"FAHCODE381",

"RunNumber":2,

"LstId":5046,

"Shortage":"2-Pass Optimized(Any)",

"SplitType":"PA",

"AllPositionsInd":"Y",

"SubstInd":"Y",

"BestQuantityInd":"Y",

"UseOnlySiteStatusInd":"Y",

"WeightInd":"Y",

"CostInd":"Y",

"HourInd":"Y",

"SplitResult":null,

"StatId":5626,

"AttrId":5571,

"StartDate":null,

"EndDate":null,

"AllocateLevel":"Shipped Items",

"DtpId":5701,

"Priority":"ISSUED FIRST",

"WeightAttrId":5130,

"SortOrder:"HeaviestFirst",

"TagNoOption":"Ignore Tag Number",

"DdId":null,

"OnlyEndnodesInd":"Y",

"PositionsWithFullSiteQty":"Y",

"IgnoreNullDateInd":"Y",

"ExcludeMIRQtyInd":"Y",

"JobStatus":"NEW",

"JobStartDate":null,

"JobEndDate":null,

"ParentFahId":null,

"ListNodes":[]

"AutoAssignWhInd":"Y"

}

Element

Description

Type

FahId

Unique ID of the Forecast

Integer

ProjId

Unique ID of the Project

String

JobStartDate

Start date of the Forecast job

Date Time Offset

JobEndDate

End date of the Forecast job

Date Time Offset

ParentFahId

Unique ID of the parent Forecast

Integer

JobStatus

Status of the job, and job here is to run the Forecast

String

WpId

Unique ID of the work package

Decimal

BnlCode

Name or code of the bin location

String

ROSDate

Date and time when the work package is Required on Site

Date Time Offset

BOMPath

BOM path of the list node

String

SplitResult

Value of the split type

String

WptfId

Workpack to forecast ID

Integer

BOMDetails

Collection of the attributes assigned to a BOM

Collection

LnId

Unique ID of th list node

Integer

ApccId

Unique ID of the ApiCommodityCodes

Decimal

ApaId

Unique ID of the ApiAttributes

Decimal

After creating Forecast Header, NLS description can be added using NlsDescription.