The infer task is similar to a V-lookup in Excel or Google Sheets. Using data in your job and a reference source, look up a value in the reference table by using a relationship between data and data in the reference table.
**The append and infer task templates are similar, click HERE to see which one meets your requirements.
Section 1: What inference mapping to use and How to do the look up and matching
- What inference mapping would you like to use: Select the reference data source
- Matching mode: Select Standard or Advanced (see advanced options screenshot below) #1 Select Advanced #2 Set a number for how many of the criteria must match in order for records to be considered matching.
- Compare the input value from: Select the attribute from the input data source to compare
- To the look-up values from: Select the attribute from the reference data source to match to the attribute in #3
- Using the match method of: Options are: Exact match, Fuzzy match, Excludes, Begins with, Ends with or Contains.
Section 2: What inferred value to output
- Output value from: Choose an attribute from the reference data source to write.
- Output value from custom text: If an attribute is not selected to output in #1, you can set a custom text output by entering text here.
- If more than one match is found: Options are: Write single value without using priority, Write single value using priority, Write single value using counter, Write all matching values ( up to 300), or Write value based on random selection. If selecting to use priority, the reference data source must include a priority column and set as a whole number attribute type for conflict resolution. For details on using the "Write single value using counter" option, refer to Assigning Leads using Even Distribution or "Round Robin" Style
- Write output to: Choose an attribute in the input data source to write the inferred value, or select #6 Add Attribute to create a new attribute to house the inferred value.
- Copy unmatched input data to output: Select this checkbox to write the unmatched data to the attribute in #4 Write Output to.
- Add Attribute: Select this to create an attribute for this job.
Section 3: Advanced Configurations
- Do not fail when the reference data source has no data: Select this option to continue with the job if the reference data source has no data. Prevents a job from failing entirely if the reference data source is empty. This is most commonly used when the reference data source used is an output from a job.
- Filter Reference Data: Use this option to filter the reference data.
- Allow match on blanks : Select this option to enable blank matching on the identified attributes. Each Criteria will be listed.
- Case Sensitive: Select this option to match attributes for each criteria based on case sensitivity.
- This task requires the use of a Reference Data Source that contains the relationships between attribute A and attribute B. For example, the Openprise reference Reference – States, Provinces, Regions contains state and country relationships. This can be used to infer missing country information if the state information is available.
- Matching can be done on multiple attributes, eg. infer a value for attribute A by matching on attributes B1, B2, B3, … etc.
- You can output more than one attribute, and you can also output custom text.
- It is best not to overwrite the existing value in Attribute A, so instead use a filter for attribute A = Has no value to infer a value for attribute A only if it is empty, or write the results to a new attribute.
- PLEASE NOTE: If you have 2 actions that write back (output value) to the SAME field, there is no guarantee that the actions are evaluated in order. Therefore the second action can overwrite the first, or the first action can overwrite the second.
- For Example: Let's assume that Action 1 is evaluated before Action 2. If Action 1 matches on City & State and writes to the 0P Country field AND Action 2 matches on City, State and Postal Code fields and writes to the 0P Country field, the value retained in the 0P Country field will be from Action 2. However, if Action 2 finds no match, the value from Action 1 will be retained.
- Infer missing country attribute if there is recognizable state value.
- For example, if State = "California", then infer Country = "United States".
- Use the Openprise reference Reference – States, Provinces, Regions.
- Infer missing postal code from a known city and state data.
- For example, if City = "Redwood City" and State = "California", then infer Postal Code = "94065".
- Use the Openprise reference Reference – US ZIP Codes.
Openprise has a special value that can be used in reference tables along with the Infer value task to perform wildcard matching. The value is “OP_MATCH_ANY”. The following example illustrates how this feature is used.
Example: Suppose I want to assign a score using State and City. When State = NY, and City = New York, I want to assign a score of 2. For all other cities where State = NY, I want to assign a score of 1.
- Begin by creating a Data Source reference table, with the contents as shown below. I've named my reference Data Source “Infer Value OP_MATCH_ANY”. Remember to import the data after you create the Data Source definition.
Note the use of "OP_MATCH_ANY", which is a special value that allows wildcard matching.
- Then, I create a Task that uses the Infer value task template and looks like this:
NOTE: I have configured the Advanced Configuration section to allow matching on blanks for "Matching Criteria 2" which is the "City" match. This is to ensure that a score of 1 is set for a City that is blank but State that is NY. Without that checkbox, we will only assign a score of 1 if the State is NY and City has any value other than New York or blank.
- The result of running the above Task is shown below. You can see that Openprise will prioritize a full match of both criteria over a wildcard match, thus achieving the results desired.
If you have any additional questions, please feel free to contact us at email@example.com.