partner_location_id_from_gln

Get partner location id from GLN number

Example

1
{{ '123' | partner_location_id_from_ref }} => 123

Input

Type Parameter Description Required
string gln The GLN number of the location. Comes before the | sign. Required
string requiredPartnerRole Required partner role. Must be one of: supplier, customer, forwarder, producer  
string requiredLocationRole Required location role. Must be one of: warehouse, invoice_to, primary  
bool failWithMultipleLocations defaults to true - if multiple locations matching criteria is found, throw an error  
string partnerId Optional - only search for locations belonging to this partner  

Output

Type Description
mixed The location ID or null if not found